Partager via


WM_DRAWITEM

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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.

Syntax

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 DRAWITEMSTRUCT structure containing information about the item to be drawn and the type of drawing required.

Return Value

An application should return TRUE if it processes this message.

Remarks

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

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

In Windows CE 2.0, the hDC member of the DRAWITEMSTRUCT structure pointed to by the lParam is initialized to the grayed or highlighted status of the current 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

Header winuser.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

Combo Boxes Messages
SendMessage
DefWindowProc
DRAWITEMSTRUCT