Set hLibrary = LoadLibraryA( "your_dll.dll" )
Set hBitmap = LoadBitmapA( hLibrary, "#Resource_Id" )
Call FreeLibrary( hLibrary )
Gupta/Centura Team Developer - Software and programming, include Oracle Connection as back office.
Monday, August 23, 2004
Load image from library or a resource from .DLL
Set difference text color for each tab folder
Here is sample code to make different color of text label for each tab folder, dont forget to add Set bStaticsAsWindows = TRUE, which can add at the SAM_AppStartup
bStaticsAsWindows
!!CB!! 174
Set hWndLabel = SalGetFirstChild( hWndForm, TYPE_BkgdText | TYPE_Picture )
While hWndLabel != hWndNULL
Set sDummy = ''
Call SalWindowGetProperty( hWndLabel, 'TabChildNames', sDummy )
If sDummy = 'tabNameEmployee'
Call SalColorSet( hWndLabel, COLOR_IndexWindowText, COLOR_Red )
Else If sDummy = 'tabNameEditCov'
Call SalColorSet( hWndLabel, COLOR_IndexWindowText, COLOR_Blue )
If SalGetType( hWndLabel ) = TYPE_Picture
Call SalColorSet( hWndLabel, COLOR_IndexWindowText, COLOR_Blue )
! If SWTabsIsAssociatedWithTab( picTabs, 1, hWndLabel )
Call SalColorSet( hWndLabel, COLOR_IndexWindowText, COLOR_Red )
! Else
Call SalColorSet( hWndLabel, COLOR_IndexWindowText, COLOR_Blue )
! Call SalColorSet( hWndLabel, COLOR_IndexWindowText, COLOR_Blue )
Set hWndLabel = SalGetNextChild( hWndLabel, TYPE_BkgdText | TYPE_Picture )
bStaticsAsWindows
(From Centura/Gupta/SQL Windows Help)
The bStaticsAsWindows variable alters the configuration of static objects. Static objects are background text, lines, and frames. In SQLWindows 4.0 and later, static objects are painted. This change improves runtime performance when creating and painting form windows and dialog boxes.
The bStaticsAsWindows variable allows you to force an application to create lines, frames, and background text as real windows. By setting this variable to TRUE, you eliminate the performance advantage of the SQLWindows 4.0 and later implementation.
Setting this variable to TRUE
Before creating a top level window, go to the On SAM_AppStartup portion of the SQLWindows Outline. Under Global Declarations, set bStaticsAsWindows to TRUE. Since bStaticsAsWindows is a global system variable, the value will persit until you change it.
The bStaticsAsWindows variable alters the configuration of static objects. Static objects are background text, lines, and frames. In SQLWindows 4.0 and later, static objects are painted. This change improves runtime performance when creating and painting form windows and dialog boxes.
The bStaticsAsWindows variable allows you to force an application to create lines, frames, and background text as real windows. By setting this variable to TRUE, you eliminate the performance advantage of the SQLWindows 4.0 and later implementation.
Setting this variable to TRUE
Before creating a top level window, go to the On SAM_AppStartup portion of the SQLWindows Outline. Under Global Declarations, set bStaticsAsWindows to TRUE. Since bStaticsAsWindows is a global system variable, the value will persit until you change it.
Subscribe to:
Posts (Atom)