Condividi tramite


CToolBarCtrl::SetPadding

Sets the horizontal and vertical padding of the current toolbar control.

DWORD SetPadding(
            int nHorzPadding, 
            int nVertPadding
);

Parameters

Parameter

Description

[in] nHorzPadding

Specifies the horizontal padding of the toolbar control, in pixels.

[in] nVertPadding

Specifies the vertical padding of the toolbar control, in pixels.

Return Value

A DWORD whose low word contains the previous horizontal padding value, and whose high word contains the previous vertical padding value. The padding values are measured in pixels.

Remarks

This method sends the TB_SETPADDING message, which is described in the Windows SDK.

Requirements

Header: afxcmn.h

Example

The following code example sets the horizontal and vertical padding of the current toolbar control to 20 pixels.

    {
        // Set the horizontal and vertical padding of the current 
        // toolbar control. 
        CToolBarCtrl& m_toolBarCtrl = m_wndToolBar.GetToolBarCtrl();
        m_toolBarCtrl.SetPadding( 50, 50 );
    }

See Also

Concepts

CToolBarCtrl Class

CToolBarCtrl Members

Hierarchy Chart

TB_SETPADDING

CToolBarCtrl::GetPadding