The WM_DRAWITEM message is 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.
Syntax
WM_DRAWITEM
WPARAM wParam
lpDrawItem = (LPDRAWITEMSTRUCT) 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.
- lpDrawItem
-
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.
Notification Requirements
| Minimum DLL Version |
None |
|---|
| Header | Declared in Winuser.h, include Windows.h |
|---|
| Minimum operating systems |
Windows 95, Windows NT 3.1 |
|---|
See Also