LBUTTONINFO
typedef struct _LBUTTONINFO
{
L_UINT uStructSize;
L_UINT uID;
L_UCHAR fsState;
HBITMAP hBitmap;
L_TCHAR szToolTipText [ TOOLBAR_TOOLTIP_MAX_TEXT ];
L_UINT32 dwTag;
} LBUTTONINFO, L_FAR *pLBUTTONINFO;
Contains information about a button associated with a tool in a toolbar.
Member |
Description |
|
uStructSize |
Size of this structure. |
|
uID |
Command identifier associated with the button. This identifier will be used in the user specified callback to identify the button that initiated the call. |
|
fsState |
Button state flags. This member can be a combination of the values listed below: |
|
|
Value |
Meaning |
|
TBSTATE_ENABLED |
The button accepts user input |
|
TBSTATE_HIDDEN |
The button is not visible and cannot receive user input. |
|
TBSTATE_PRESSED |
The button is being clicked. |
hBitmap |
A DDB (device dependent bitmap) that will represent the Cold (enabled) bitmap of the button. The toolbar will automatically create the hot and the disabled bitmaps. |
|
szToolTipText |
A null terminated array of characters that will become the button tool tip. The maximum length of this string is TOOLBAR_TOOLTIP_MAX_TEXT. |
|
dwTag |
User defined data associated with the button information. |
Comments
A toolbar is made up of one or more tools. The LTOOLBARINFO structure contains information about the toolbar in general. Information about each tool that makes up the toolbar is contained in an LTOOLBARINFO structure. Each tool in a toolbar may have one or more buttons associated with it. A tool with more than one button associated with it is said to be a sub-toolbar. Information about the button(s) associated with a tool in the toolbar is contained in one or more LBUTTONINFO structures.
Buttons on a toolbar may have the same ID number without the toolkit complaining. If a function is called that uses a button ID, such as L_TBAddButton, then the toolkit function will act on the first button found with the specified ID.