_TBBUTTON structure

Contains information about a button in a toolbar.

Syntax

typedef struct _TBBUTTON {
  int       iBitmap;
  int       idCommand;
  BYTE      fsState;
  BYTE      fsStyle;
  BYTE      bReserved[6];
  BYTE      bReserved[2];
  DWORD_PTR dwData;
  INT_PTR   iString;
} TBBUTTON, *PTBBUTTON, *LPTBBUTTON;

Members

iBitmap

Type: int

Zero-based index of the button image. Set this member to I_IMAGECALLBACK, and the toolbar will send the TBN_GETDISPINFO notification code to retrieve the image index when it is needed.

Version 5.81. Set this member to I_IMAGENONE to indicate that the button does not have an image. The button layout will not include any space for a bitmap, only text.

If the button is a separator, that is, if fsStyle is set to BTNS_SEP, iBitmap determines the width of the separator, in pixels. For information on selecting button images from image lists, see TB_SETIMAGELIST message.

idCommand

Type: int

Command identifier associated with the button. This identifier is used in a WM_COMMAND message when the button is chosen.

fsState

Type: BYTE

Button state flags. This member can be a combination of the values listed in Toolbar Button States.

fsStyle

Type: BYTE

Button style. This member can be a combination of the button style values listed in Toolbar Control and Button Styles.

bReserved.#2961909431

bReserved.#2679376636

dwData

Type: DWORD_PTR

Application-defined value.

iString

Type: INT_PTR

Zero-based index of the button string, or a pointer to a string buffer that contains text for the button.

Remarks

The iString member can return either a string pointer or an index. You can use the IS_INTRESOURCE macro to determine which is returned.

Requirements

   
Windows version Windows Vista [desktop apps only] Windows Server 2003 [desktop apps only]
Header commctrl.h