Help Center

CToolbar.SetPaddingmethod

Sets the padding for a toolbar control.

WindowsmethodCToolbar.incdocumented

Syntax

FUNCTION SetPadding (BYVAL hToolbar AS HWND, BYVAL cx AS SHORT, BYVAL cy AS SHORT) AS DWORD

Parameters

NameDescription
hToolbarHandle to the toolbar control.
cxThe horizontal padding, in pixels.
cyThe vertical padding, in pixels.

Return value

Returns a DWORD value that contains the previous horizontal padding in the LOWORD and the previous vertical padding in the HIWORD, in pixels.

Description

Sets the padding for a toolbar control.

Remarks

The padding values are used to create a blank area between the edge of the button and the button's image and/or text. Where and how much padding is actually applied depends on the type of the button and whether it has an image. The horizontal padding is applied to both the right and left of the button, and the vertical padding is applied to both the top and bottom of the button. Padding is only applied to buttons that have the TBSTYLE_AUTOSIZE style.

Reference

  • Include file CToolbar.inc
  • Defined in AfxNova/CToolbar.inc:1226
  • Documented in Windows/WIndows Controls/CToolbar Class.md
  • Topic: CToolbar Class