Share via


CMFCDropDownToolbarButton::OnCalculateSize

Called by the framework to calculate the size of the button for the specified device context and docking state.

virtual SIZE OnCalculateSize(
   CDC* pDC,
   const CSize& sizeDefault,
   BOOL bHorz
);

Parameters

  • [in] pDC
    The device context that displays the button.

  • [in] sizeDefault
    The default size of the button.

  • [in] bHorz
    The dock state of the parent toolbar. This parameter is TRUE if the toolbar is docked horizontally or is floating, or FALSE if the toolbar is docked vertically.

Return Value

A SIZE structure that contains the dimensions of the button, in pixels.

Remarks

This method extends the base class implementation (CMFCToolBarButton::OnCalculateSize) by adding the width of the drop-down arrow to the horizontal dimension of the button size.

Requirements

Header: afxdropdowntoolbar.h

See Also

Reference

CMFCDropDownToolbarButton Class

Hierarchy Chart

CMFCToolBarButton::OnCalculateSize