Export (0) Print
Expand All

NM_CUSTOMDRAW (header) notification code

Sent by a header control to notify its parent window about drawing operations. This notification code is sent in the form of a WM_NOTIFY message.


NM_CUSTOMDRAW

    lpNMCustomDraw = (LPNMCUSTOMDRAW) lParam;

Parameters

lParam

A pointer to an NMCUSTOMDRAW structure that contains information about the drawing operation. The dwItemSpec member of this structure contains the index of the item being drawn and the lItemlParam member of this structure contains the item's lParam.

Return value

The value your application can return depends on the current drawing stage. The dwDrawStage member of the associated NMCUSTOMDRAW structure holds a value that specifies the drawing stage. You must return one of the following values.

Return codeDescription
CDRF_DODEFAULT

The control will draw itself. It will not send any additional NM_CUSTOMDRAW messages for this paint cycle. This occurs when dwDrawStage equals CDDS_PREPAINT.

CDRF_NOTIFYITEMDRAW

The control will notify the parent of any item-related drawing operations. It will send NM_CUSTOMDRAW notification codes before and after drawing items. This occurs when dwDrawStage equals CDDS_PREPAINT.

CDRF_NOTIFYPOSTERASE

The control will notify the parent after erasing an item. This occurs when dwDrawStage equals CDDS_PREPAINT.

CDRF_NOTIFYPOSTPAINT

The control will notify the parent after painting an item. This occurs when dwDrawStage equals CDDS_PREPAINT.

CDRF_NOTIFYSUBITEMDRAW

Common Control Versions. The control will notify the parent when a list-view subitem is being drawn. This occurs when dwDrawStage equals CDDS_PREPAINT.

CDRF_NEWFONT

Your application specified a new font for the item; the control will use the new font. For more information on changing fonts, see Changing fonts and colors. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.

CDRF_SKIPDEFAULT

Your application drew the item manually. The control will not draw the item. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.

 

Remarks

See Using Custom Draw for further discussion.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Commctrl.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft