TB_SETBUTTONSIZE message

Sets the size of buttons on a toolbar.

Parameters

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.

Return value

Returns TRUE if successful, or FALSE otherwise.

Remarks

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.

Examples

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);

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Commctrl.h