WM_CTLCOLORSCROLLBAR

This message is sent to the parent window of a scroll bar when the control is about to be drawn. By responding to this message, the parent window can set the text and background colors of the child window by using the display-context handle given in the wParam parameter.

Parameters

wParam

Contains a handle to the display context for the child window.

lParam

The lParam parameter contains the handle to the child window.

Comments

The DefWindowProc function selects the default system colors.

If an application processes the WM_CTLCOLORSCROLLBAR message, it must return a handle to the brush that is to be used for painting the control background. Note that failure to return a valid brush handle will place the system in an unstable state.

The WM_CTLCOLORSCROLLBAR message is never sent between threads. It is only sent within one thread.

See Also

WM_CTLCOLORBTN, WM_CTLCOLORDLG, WM_CTLCOLORLISTBOX, WM_CTLCOLORMSGBOX, WM_CTLCOLORSTATIC