Sets the information for an existing button in a toolbar.
Syntax
To send this message, call the
SendMessage
function as follows.
lResult = SendMessage( // returns LRESULT in lResult
hWndControl, // (HWND) handle to destination control
TB_SETBUTTONINFO, // (UINT) message ID
wParam, // = (WPARAM)(INT) iID;
lParam // = (LPARAM)(LPTBBUTTONINFO) lptbbi;
);
Parameters
- iID
-
Button identifier.
- lptbbi
-
Pointer to a TBBUTTONINFO structure that contains the new button information. The cbSize and dwMask members of this structure must be filled in prior to sending this message.
Return Value
Returns nonzero if successful, or zero otherwise.
Remarks
Text is commonly assigned to buttons when they are added to a toolbar by specifying the index of a string in the toolbar's string pool. If you use a TB_SETBUTTONINFO to assign new text to a button, it will permanently override the text from the string pool. You can change the text by calling TB_SETBUTTONINFO again, but you cannot reassign the string from the string pool.
Message Information
| Minimum DLL Version | comctl32.dll version 4.71 or later |
|---|
| Header | commctrl.h |
|---|
| Minimum operating systems |
Windows 2000, Windows NT 4.0 with Internet Explorer 4.0, Windows 98, Windows 95 with Internet Explorer 4.0 |
|---|
See Also