Muokkaa

Jaa


NM_CUSTOMDRAW (toolbar) notification code

Sent by a toolbar 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

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.

Return code Description
CDRF_DODEFAULT
The control will draw itself. It will not send any additional NM_CUSTOMDRAW notification codes 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
Version 4.71. 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.
TBCDRF_BLENDICON
Version 5.00. Blend the button 50 percent with the background. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_NOBACKGROUND
Version 5.00. Do not draw button background. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_NOEDGES
Version 4.71. Do not draw button edges. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_HILITEHOTTRACK
Version 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_NOOFFSET
Version 4.71. Do not offset the button when pressed. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_NOMARK
Do not draw default highlight of items that have the TBSTATE_MARKED. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_NOETCHEDEFFECT
Version 4.71. Do not draw etched effect for disabled items. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
TBCDRF_USECDCOLORS
Version 6.00, Windows Vista only. Use custom draw colors to render text regardless of visual style.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Commctrl.h

See also

Using Custom Draw