Microsoft Windows CE 3.0  

WM_DRAWITEM

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This message is sent to the owner window of an owner-drawn button or menu when a visual aspect of the button or menu has changed.

WM_DRAWITEM
idCtl= 
(UINT)
wParam; 
lpdis= 
(LPDRAWITEMSTRUCT)
lParam;

Parameters

idCtl
Identifier of the control that sent the WM_DRAWITEM message. If the message was sent by a menu, this parameter is zero.
lpdis
Long pointer to a DRAWITEMSTRUCTstructure containing information about the item to be drawn and the type of drawing required.

Return Values

An application should return TRUE if it processes this message.

Default Action
The DefWindowProcfunction draws the focus rectangle for an owner-drawn list box item.

Remarks

In the case of a menu item, the receiver of this message is responsible for erasing the background if necessary.

In Windows CE version 2.0, the hDCmember of the DRAWITEMSTRUCTstructure pointed to by the lParamis initialized to the grayed or highlighted status of the current item.

The itemActionmember of the DRAWITEMSTRUCTstructure 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 hDCmember of the DRAWITEMSTRUCTstructure is in the default state.

Requirements

Runs On Versions Defined in Include Link to
Windows CE OS 1.0 and later Winuser.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

DefWindowProc, DRAWITEMSTRUCT