Export (0) Print
Expand All

TBBUTTONINFO structure

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;
  LPTSTR    pszText;
  int       cchText;
} TBBUTTONINFO, *LPTBBUTTONINFO;

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.

ValueMeaning
TBIF_BYINDEX

Version 5.80. The wParam sent with a TB_GETBUTTONINFO or TB_SETBUTTONINFO message is an index, not an identifier.

TBIF_COMMAND

The idCommand member contains valid information or is being requested.

TBIF_IMAGE

The iImage member contains valid information or is being requested.

TBIF_LPARAM

The lParam member contains valid information or is being requested.

TBIF_SIZE

The cx member contains valid information or is being requested.

TBIF_STATE

The fsState member contains valid information or is being requested.

TBIF_STYLE

The fsStyle member contains valid information or is being requested.

TBIF_TEXT

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Commctrl.h

Unicode and ANSI names

TBBUTTONINFOW (Unicode) and TBBUTTONINFOA (ANSI)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft