Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Windows Controls
Control Library
Toolbar
Notifications
 NM_CUSTOMDRAW (toolbar) Notificatio...
NM_CUSTOMDRAW (toolbar) Notification

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

Syntax

NMCUSTOMDRAW  *lpNMCustomDraw = (LPNMCUSTOMDRAW) lParam;

Parameters

lpNMCustomDraw

Version 4.70. Pointer to an NMCUSTOMDRAW structure that contains information about the drawing operation. The dwItemSpec member of this structure contains the command identifier of the item being drawn. The lItemlParam member of this structure contains the dwData value for the item being drawn.

Version 4.71. Pointer to an NMTBCUSTOMDRAW structure that contains information about the drawing operation. The dwItemSpec member of the nmcd member of this structure contains the command identifier of the item being drawn. The lItemlParam member of the nmcd member of this structure contains the dwData value for the item being drawn.

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.

CDRF_DODEFAULTThe 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_NOTIFYITEMDRAWThe control will notify the parent of any item-related drawing operations. It will send NMCUSTOMDRAW notification messages before and after drawing items. This occurs when dwDrawStage equals CDDS_PREPAINT.
CDRF_NOTIFYPOSTERASEThe control will notify the parent after erasing an item. This occurs when dwDrawStage equals CDDS_PREPAINT.
CDRF_NOTIFYPOSTPAINTThe control will notify the parent after painting an item. This occurs when dwDrawStage equals CDDS_PREPAINT.
CDRF_NOTIFYSUBITEMDRAWVersion 4.71. The control will notify the parent when a list-view subitem is being drawn. This occurs when dwDrawStage equals CDDS_PREPAINT.
CDRF_NEWFONTYour 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_SKIPDEFAULTYour application drew the item manually. The control will not draw the item. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_BLENDICONVersion 5.00. Blend the button 50 percent with the background. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_NOBACKGROUNDVersion 5.00. Don't draw button background. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_NOEDGESVersion 4.71. Don't draw button edges. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_HILITEHOTTRACKVersion 4.71. Use the clrHighlightHotTrack member of the NMTBCUSTOMDRAW structure to draw the background of hot-tracked items. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_NOOFFSETVersion 4.71. Don't offset button when pressed. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_NOMARKDon't draw default highlight of items that have the TBSTATE_MARKED. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_NOETCHEDEFFECTVersion 4.71. Don't draw etched effect for disabled items. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_USECDCOLORSUse custom draw colors to render text regardless of visual style.

Notification Requirements

Minimum DLL Versioncomctl32.dll version 4.70 or later
Headercommctrl.h
Minimum operating systems Windows 2000, Windows NT 4.0 with Internet Explorer 3.0, Windows 98, Windows 95 with Internet Explorer 3.0

See Also

Using Custom Draw
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker