Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Windows Controls
Control Library
Toolbar
Structures
 NMTBCUSTOMDRAW Structure

  Switch on low bandwidth view
NMTBCUSTOMDRAW Structure

Contains information specific to an NM_CUSTOMDRAW notification message sent by a toolbar control.

Syntax

typedef struct _NMTBCUSTOMDRAW {
    NMCUSTOMDRAW nmcd;
    HBRUSH hbrMonoDither;
    HBRUSH hbrLines;
    HPEN hpenLines;
    COLORREF clrText;
    COLORREF clrMark;
    COLORREF clrTextHighlight;
    COLORREF clrBtnFace;
    COLORREF clrBtnHighlight;
    COLORREF clrHighlightHotTrack;
    RECT rcText;
    int nStringBkMode;
    int nHLStringBkMode;
    int iListGap;
} NMTBCUSTOMDRAW, *LPNMTBCUSTOMDRAW;

Members

nmcd
NMCUSTOMDRAW structure that contains general custom draw information. The uItemState member of this structure can be modified so that a toolbar item will be drawn in the specified state without actually changing the item's state.
hbrMonoDither
HBRUSH that the control will use when drawing the background of marked or dithered items. This member is ignored if TBCDRF_NOMARK is returned from the NM_CUSTOMDRAW notification.
hbrLines
HBRUSH that the control will use when drawing lines on the buttons.
hpenLines
HPEN that the control will use when drawing lines on the buttons.
clrText
COLORREF that represents the color that the control will use when drawing text on normal items.
clrMark
COLORREF that represents the background color that the control will use when drawing text on marked items.
clrTextHighlight
COLORREF that represents the color that the control will use when drawing text on highlighted items.
clrBtnFace
COLORREF that represents the face color that the control will use when drawing buttons.
clrBtnHighlight
COLORREF that represents the face color that the control will use when drawing highlighted items. An item is highlighted if it has the TBSTATE_MARKED style and is contained in a toolbar that has the TBSTYLE_FLAT style.
clrHighlightHotTrack
COLORREF that represents the background color that the control will use when drawing text on hot tracked items. This member is ignored if TBCDRF_HILITEHOTTRACK is not returned from the NM_CUSTOMDRAW notification.
rcText
RECT structure that, on entry, contains the rectangle of the item's text. The right and bottom members of this structure can be modified to change the width and height, respectively, of the text rectangle of the item.
nStringBkMode
Background mode that the control will use when drawing the text of a nonhighlighted item. This can be either the TRANSPARENT or OPAQUE value.
nHLStringBkMode
Background mode that the control will use when drawing the text of a highlighted item. This can be either the TRANSPARENT or OPAQUE value.
iListGap
Version 6.0 Specifies the distance between the toolbar button image and the text, in logical pixels, for toolbars that have TBSTYLE_LIST style set.

Note that Comctl32.dll version 6 is not redistributable but it is included in Microsoft Windows XP or later. To use Comctl32.dll version 6, specify it in a manifest. For more information on manifests, see Enabling Visual Styles.

Structure Information

Minimum DLL Versioncomctl32.dll version 4.71 or later
Headercommctrl.h
Minimum operating systems Windows 2000, Windows NT 4.0 with Internet Explorer 4.0, Windows 98, Windows 95 with Internet Explorer 4.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker