Copyright © 2002-2009 MultiMedia Soft 
Return to index  
 
abmSetSurfaceColorDesc function 
 
Remarks
Sets the surface color characteristics of the given element.
Return value
None.
Syntax
void abmSetSurfaceColorDesc
HWND hWndBtn
short nElement, 
SURFACE_COLOR_DESC *pdesc 
); 
 
 
Parameters
Description
hWndBtn
Windows handle associated to the button.
nElement
Number representing the element whose color will be changed. Supported values are the following:  
Mnemonic constant
Meaning
SURFACE_BACK (0)
Sets the color of the button surface
SURFACE_MO (1)
Sets the color of the button surface when the mouse is over the button To avoid color changing when the mouse is over the button set it to BLACK RGB (0, 0, 0) (default).
SURFACE_FOCUS (2)
Sets the color of the button surface when it has the input focus but the mouse is outside the button. To avoid color changing when the button has the input focus set it to BLACK RGB (0, 0, 0) (default).
SURFACE_INTERIOR (3)
Sets the color of the interior of the button surface when the SpecialEffect property has a non-zero value.
SURFACE_DISABLED (4)
Sets the color of the disabled button surface
SURFACE_PRESSED (5)
Sets the color of the pressed button surface
pdesc
Address of the the SURFACE_COLOR_DESC structure that contains the new color settings.
 
 
Visual Basic example 
Dim colorDesc As SURFACE_COLOR_DESC 
colorDesc.color = RGB (0, 255, 0) 
colorDesc.nGradientType = COLOR_GRADIENT_CLASSIC 
colorDesc.nGradientFactor = 4 
colorDesc.nRender3D = COLOR_RENDER_BEST_3D 
abmSetSurfaceColorDesc btn1.hWnd, SURFACE_BACK, colorDesc 
 
With this code, after the call to the abmSetSurfaceColorDesc function, the button btn1 will have a light green background with the best 3D rendering available. 
 
Visual C++ example 
SURFACE_COLOR_DESC colorDesc; 
colorDesc.color = RGB (0, 255, 0); 
colorDesc.nGradientType = COLOR_GRADIENT_CLASSIC; 
colorDesc.nGradientFactor = 4; 
colorDesc.nRender3D = COLOR_RENDER_BEST_3D; 
abmSetSurfaceColorDesc (btn1.GetSafeHwnd (), SURFACE_BACK, (long) &colorDesc); 
 
With this code, after the call to the abmSetSurfaceColorDesc function, the button btn1 will have a light green background with the best 3D rendering available. 
 
 
 
 
 
 
 
 
Copyright © 2002-2009 MultiMedia Soft 
Return to index