BCGControlBar Pro for MFC
virtual SIZE CBCGPToolbarButton::OnCalculateSize ( CDC *  pDC,
const CSize &  sizeDefault,
BOOL  bHorz 
)
virtual

Called by the framework when it needs to determine the size of the toolbar button for the specified device context.

Returns
A SIZE structure containing the actual dimensions of the button.

This function is called by the framework when it needs to determine the size of the toolbar button for the specified device context and the specified dock state. The default implementation takes into account the text and image sizes (if displayed), their positions (text below image or text at the right side of the image), the toolbar dock state and calculates the result size accordingly. Override the OnCalculateSize member function to implement the size calculations for the non-standard buttons (like edit box buttons and so on).

Parameters
pDCA pointer to the device context, which displays the button.
sizeDefaultSpecifies the default size of the button.
bHorzSpecifies the current dock state of the parent toolbar. TRUE - the toolbar is docked horizontally or floating, FALSE - the toolbar is docked vertically.