WM_CTLCOLORLISTBOX

This message is sent to the parent window of a list box when the list box 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_CTLCOLORLISTBOX 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_CTLCOLORLISTBOX message is never sent between threads. It is only sent within one thread.

See Also

WM_CTLCOLORBTN, WM_CTLCOLORDLG, WM_CTLCOLORMSGBOX, WM_CTLCOLORSCROLLBAR, WM_CTLCOLORSTATIC