BCX_SETCOLOR statement
Purpose: BCX_SETCOLOR sets the foreground and background color of a HDC handle to a device context of a HWND handle to a control. Note well that this function is limited to use only with static and edit controls. It does not work with button controls.
Syntax: BCX_SETCOLOR(ForegroundRGBColor, _ BackgroundRGBColor, _ [, hDC, hWnd]) Parameters:
|
Example:
GUI"BCX_SETCOLOR"GLOBALForm1ASHWNDGLOBALhStc1ASCONTROLGLOBALhStc2ASCONTROLSUBFORMLOAD()Form1=BCX_FORM("BCX_SETCOLOR",0,0,110,110)hStc1=BCX_LABEL("File List",Form1,1000,7,12,40,16)hStc2=BCX_LABEL("File List",Form1,1001,7,30,40,16)BCX_SET_FORM_COLOR(Form1,RGB(0,0,250))CENTER(Form1)SHOW(Form1)ENDSUBBEGINEVENTSSELECTCASECBMSGCASEWM_CTLCOLORSTATICIFhStc1=(HWND)CBLPARAMTHENFUNCTION=BCX_SETCOLOR(RGB(255,0,0),-1)ENDIFIFhStc2=(HWND)CBLPARAMTHENFUNCTION=BCX_SETCOLOR(RGB(0,0,0),RGB(255,255,255))ENDIFENDSELECTENDEVENTS