abmGetSurfaceColorDesc function
|
Remarks
|
Retrieves the surface color characteristics of the given element.
|
|
Return value
|
None.
|
|
Syntax
|
void abmGetSurfaceColorDesc (
HWND hWndBtn,
short nElement,
SURFACE_COLOR_DESC *pdesc
);
|
Parameters
|
Description
|
|
hWndBtn
|
Windows handle associated to the button.
|
|
nElement
|
Number representing the element whose color is requested. Supported values are the following:
|
Mnemonic constant
|
Meaning
|
|
SURFACE_BACK (0)
|
Gets the color of the button surface
|
|
SURFACE_MO (1)
|
Gets 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)
|
Gets 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)
|
Gets the color of the interior of the button surface when the SpecialEffect property has a non-zero value.
|
|
SURFACE_DISABLED (4)
|
Gets the color of the disabled button surface
|
|
SURFACE_PRESSED (5)
|
Gets the color of the pressed button surface
|
|
|
pdesc
|
Address of the the SURFACE_COLOR_DESC structure that in output will contain the color settings.
|
|
Visual Basic example
Dim colorDesc As SURFACE_COLOR_DESC
bmGetSurfaceColorDesc btn1.hWnd, SURFACE_BACK, colorDesc
With this code, after the call to the abmGetSurfaceColorDesc function, the colorDesc structure will be filled with the color settings of the button Btn1 when in normal state (not pressed and with the mouse outside its area).
Visual C++ example
SURFACE_COLOR_DESC colorDesc;
abmGetSurfaceColorDesc (btn1.GetSafeHwnd (), SURFACE_BACK, &colorDesc);
With this code, after the call to the abmGetSurfaceColorDesc function, the colorDesc structure will be filled with the color settings of the button Btn1 when in normal state (not pressed and with the mouse outside its area).