TBBUTTON structure (commctrl.h)
Contains information about a button in a toolbar.
Syntax
typedef struct _TBBUTTON {
int iBitmap;
int idCommand;
BYTE fsState;
BYTE fsStyle;
#if ...
BYTE bReserved[6];
#else
BYTE bReserved[2];
#endif
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[6]
Type: BYTE
Reserved.
bReserved[2]
Type: BYTE
Reserved.
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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | commctrl.h |