BCX_SETCOLOR statement
Purpose: BCX_SETCOLOR sets the foreground and background color
of a handle to a device context(HDC) of a handle to a control(HWND).
Syntax:
BCX_SETCOLOR(ForegroundRGBColor, _
BackgroundRGBColor, _
[, hDC, hWnd])
Parameters:
- ForegroundRGBColor RGB(r,g,b) expression for foreground color to be set.
- BackgroundRGBColor RGB(r,g,b) expression for background color to be set.
- hDC [OPTIONAL] The handle to a device context(HDC)
on which the colors are to be set.The argument for this parameter is automatically added
if only the foreground and background color is given.
- hWnd [OPTIONAL] The handle to the control(HWND)
containing the HDC on which the colors are to be set.The argument for this parameter
is automatically added if only the foreground and background color is given.
|
Example:
SELECT CASE Msg
CASE WM_CTLCOLORLISTBOX
FUNCTION = BCX_SETCOLOR(0, RGB(214,225,255))
emits the C code as:
return Set_Color(0,RGB(214,225,255),wParam,lParam);