title | description | ms.assetid | keywords | topic_type | api_name | api_location | api_type | ms.topic | ms.date | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TB_SETBUTTONSIZE message (Commctrl.h) |
Sets the size of buttons on a toolbar. |
ef6beed7-a3d6-4379-b9c1-c64a5e33ce78 |
|
|
|
|
|
reference |
05/31/2018 |
Sets the size of buttons on a toolbar.
-
wParam
-
Must be zero.
-
lParam
-
The LOWORD specifies the width, in pixels, of the buttons. The HIWORD specifies the height, in pixels, of the buttons.
Returns TRUE if successful, or FALSE otherwise.
TB_SETBUTTONSIZE should generally be called after adding buttons.
Use TB_SETBUTTONWIDTH to set the maximum and minimum allowed widths for buttons before they are added. Use TB_SETBUTTONSIZE to set the actual size of buttons.
The following example code sets the width of buttons to 80 pixels and the height to 30 pixels.
// hWndToolbar is a handle to the toolbar window.
SendMessage(hWndToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(80, 30);
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2003 [desktop apps only] |
Header |
|