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
-
pDC | A pointer to the device context, which displays the button. |
sizeDefault | Specifies the default size of the button. |
bHorz | Specifies the current dock state of the parent toolbar. TRUE - the toolbar is docked horizontally or floating, FALSE - the toolbar is docked vertically. |