<< Return to Main Index

< Return to Class Index

CGXControl::OnGridCtlColor

virtual HBRUSH OnGridCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);

pDC

Contains a pointer to the display context for the child window. May be temporary.

pWnd

Contains a pointer to the control asking for the color. May be temporary.

nCtlColor

Contains one of the following values, specifying the type of control:
CTLCOLOR_BTN   Button control
CTLCOLOR_DLG   Dialog box
CTLCOLOR_EDIT   Edit control
CTLCOLOR_LISTBOX   List box control
CTLCOLOR_MSGBOX   Message box
CTLCOLOR_SCROLLBAR   Scrollbar control
CTLCOLOR_STATIC   Static control

Return Value

Returns a handle to the brush that is to be used for painting the control background if you processed this method. If it is NULL, the grid will check the interior and text color settings of the current cell and create a brush with these settings.

Return Value

Called when the grid receives a WM_CTLCOLOR message. The grid passes the attributes of the WM_CTLCOLOR message to this method.

CGXControl

Class Overview | Class Members