Skip to content

Latest commit

 

History

History
92 lines (56 loc) · 2.66 KB

wm-ctlcolorlistbox.md

File metadata and controls

92 lines (56 loc) · 2.66 KB
title description ms.assetid keywords topic_type api_name api_location api_type ms.topic ms.date
WM_CTLCOLORLISTBOX message (Winuser.h)
Sent to the parent window of a list box before the system draws the list box. By responding to this message, the parent window can set the text and background colors of the list box by using the specified display device context handle.
e128e77f-e966-44c4-9f0e-efcf421b6c82
WM_CTLCOLORLISTBOX message Windows Controls
apiref
WM_CTLCOLORLISTBOX
Winuser.h
HeaderDef
reference
05/31/2018

WM_CTLCOLORLISTBOX message

Sent to the parent window of a list box before the system draws the list box. By responding to this message, the parent window can set the text and background colors of the list box by using the specified display device context handle.

WM_CTLCOLORLISTBOX

    WPARAM wParam;
    LPARAM lParam; 

Parameters

wParam

Handle to the device context for the list box.

lParam

Handle to the list box.

Return value

If an application processes this message, it must return a handle to a brush. The system uses the brush to paint the background of the list box.

Remarks

By default, the DefWindowProc function selects the default system colors for the list box.

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

If a dialog box procedure handles this message, it should cast the desired return value to a INT_PTR and return the value directly. If the dialog box procedure returns FALSE, then default message handling is performed. The DWL_MSGRESULT value set by the SetWindowLong function is ignored.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Winuser.h (include Windows.h)

See also

Other Resources

RealizePalette

SelectPalette

DefWindowProc