Export (0) Print
Expand All

WM_DRAWITEM message

Sent to the parent window of an owner-drawn button, combo box, list box, or menu when a visual aspect of the button, combo box, list box, or menu has changed.

A window receives this message through its WindowProc function.


WM_DRAWITEM

    WPARAM wParam;
    LPARAM lParam; 

Parameters

wParam

Specifies the identifier of the control that sent the WM_DRAWITEM message. If the message was sent by a menu, this parameter is zero.

lParam

Pointer to a DRAWITEMSTRUCT structure containing information about the item to be drawn and the type of drawing required.

Return value

If an application processes this message, it should return TRUE.

Remarks

By default, the DefWindowProc function draws the focus rectangle for an owner-drawn list box item.

The itemAction member of the DRAWITEMSTRUCT structure specifies the drawing operation that an application should perform.

Before returning from processing this message, an application should ensure that the device context identified by the hDC member of the DRAWITEMSTRUCT structure is in the default state.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

See also

Reference
DRAWITEMSTRUCT
Other Resources
DefWindowProc

 

 

Community Additions

ADD
Show:
© 2014 Microsoft