Skip to content

Latest commit

 

History

History
76 lines (46 loc) · 1.73 KB

tb-setbuttonsize.md

File metadata and controls

76 lines (46 loc) · 1.73 KB
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
TB_SETBUTTONSIZE message Windows Controls
apiref
TB_SETBUTTONSIZE
Commctrl.h
HeaderDef
reference
05/31/2018

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