Contents Index Topic Contents | ||
Previous Topic: NM_CHAR (toolbar) Next Topic: NM_KEYDOWN (toolbar) |
NM_CUSTOMDRAW (toolbar)
NM_CUSTOMDRAW lpNMCustomDraw = (LPNMTBCUSTOMDRAW) lParam;Sent by the toolbar to notify its parent window about drawing operations. This notification is sent in the form of a WM_NOTIFY message.
- 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.
When dwDrawStage equals CDDS_PREPAINT:
- CDRF_DODEFAULT
- The control will draw itself. It will not send any additional NM_CUSTOMDRAW messages for this paint cycle.
- CDRF_NOTIFYITEMDRAW
- The control will notify the parent of any item-related drawing operations. It will send NM_CUSTOMDRAW notification messages before and after drawing items.
- CDRF_NOTIFYITEMERASE
- The control will notify the parent when an item will be erased. It will send NM_CUSTOMDRAW notification messages before and after erasing items.
- CDRF_NOTIFYPOSTERASE
- The control will notify the parent after erasing an item.
- CDRF_NOTIFYPOSTPAINT
- The control will notify the parent after painting an item.
- CDRF_NOTIFYSUBITEMDRAW
- Version 4.71. The control will notify the parent when a list view subitem is being drawn.
When dwDrawStage equals CDDS_ITEMPREPAINT:
- 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.
- CDRF_SKIPDEFAULT
- Your application drew the item manually. The control will not draw the item.
- TBCDRF_NOEDGES
- Version 4.71. Don't draw button edges.
- TBCDRF_HILITEHOTTRACK
- Version 4.71. Use the clrHighlightHotTrack member of the NMTBCUSTOMDRAW structure to drawing the background of hot-tracked items.
- TBCDRF_NOOFFSET
- Version 4.71. Don't offset button when pressed.
- TBCDRF_NOMARK
- Version 4.71. Don't draw default highlight of items that have the TBSTATE_MARKED state.
- TBCDRF_NOETCHEDEFFECT
- Version 4.71. Don't draw etched effect for disabled items.
- lpNMCustomDraw
- Version 4.70. Address of 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. Address of 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.
Version 4.70
See also Using Custom Draw
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.