CToolBarCtrl::SetButtonSize

Sets the size of the buttons in the toolbar control.

BOOL SetButtonSize( 
   CSize size  
);

Parameters

  • size
    Width and height, in pixels, of the buttons.

Return Value

Nonzero if successful; otherwise zero.

Remarks

The button size must always be at least as large as the bitmap size it encloses. This function must be called only before adding any bitmaps to the toolbar. If the application does not explicitly set the button size, it defaults to 24 by 22 pixels.

Example

See the example for CToolBar::GetToolBarCtrl.

Requirements

Header: afxcmn.h

See Also

Reference

CToolBarCtrl Class

Hierarchy Chart

CToolBarCtrl::SetBitmapSize

CToolBarCtrl::GetItemRect