NMTBCUSTOMDRAW structure

Contains information specific to an NM_CUSTOMDRAW notification code 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

Type: NMCUSTOMDRAW

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

Type: HBRUSH

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 code.

hbrLines

Type: HBRUSH

HBRUSH that the control will use when drawing lines on the buttons.

hpenLines

Type: HPEN

HPEN that the control will use when drawing lines on the buttons.

clrText

Type: COLORREF

COLORREF that represents the color that the control will use when drawing text on normal items.

clrMark

Type: COLORREF

COLORREF that represents the background color that the control will use when drawing text on marked items.

clrTextHighlight

Type: COLORREF

COLORREF that represents the color that the control will use when drawing text on highlighted items.

clrBtnFace

Type: COLORREF

COLORREF that represents the face color that the control will use when drawing buttons.

clrBtnHighlight

Type: COLORREF

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

Type: COLORREF

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 code.

rcText

Type: RECT

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

Type: int

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

Type: int

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

Type: int

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 Windows or later. To use Comctl32.dll version 6, specify it in a manifest. For more information on manifests, see Enabling Visual Styles.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Commctrl.h

 

 

Show: