TBBUTTONINFOA structure (commctrl.h)
Contains or receives information for a specific button in a toolbar.
Syntax
typedef struct {
UINT cbSize;
DWORD dwMask;
int idCommand;
int iImage;
BYTE fsState;
BYTE fsStyle;
WORD cx;
DWORD_PTR lParam;
LPSTR pszText;
int cchText;
} TBBUTTONINFOA, *LPTBBUTTONINFOA;
Members
cbSize
Type: UINT
Size of the structure, in bytes. This member must be filled in prior to sending the associated message.
dwMask
Type: DWORD
Set of flags that indicate which members contain valid information. This member must be filled in prior to sending the associated message. This can be one or more of the following values.
Value | Meaning |
---|---|
|
Version 5.80. The wParam sent with a TB_GETBUTTONINFO or TB_SETBUTTONINFO message is an index, not an identifier. |
|
The idCommand member contains valid information or is being requested. |
|
The iImage member contains valid information or is being requested. |
|
The lParam member contains valid information or is being requested. |
|
The cx member contains valid information or is being requested. |
|
The fsState member contains valid information or is being requested. |
|
The fsStyle member contains valid information or is being requested. |
|
The pszText member contains valid information or is being requested. |
idCommand
Type: int
Command identifier of the button.
iImage
Type: int
Image index of the button. 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.
fsState
Type: BYTE
State flags of the button. This can be one or more of the values listed in Toolbar Button States.
fsStyle
Type: BYTE
Style flags of the button. This can be one or more of the values listed in Toolbar Control and Button Styles.
cx
Type: WORD
Width of the button, in pixels.
lParam
Type: DWORD_PTR
Application-defined value associated with the button.
pszText
Type: LPTSTR
Address of a character buffer that contains or receives the button text.
cchText
Type: int
Size of the buffer at pszText. If the button information is being set, this member is ignored.
Remarks
Note
The commctrl.h header defines TBBUTTONINFO as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | commctrl.h |