Gets the size of the button that best fits the text and image, if an image list is present. You can use this macro or send the BCM_GETIDEALSIZE message explicitly.
A handle to the button control.
A pointer to a SIZE structure that receives the desired size of the button including the text and image list if present.
If the macro succeeds, it returns TRUE. Otherwise it returns FALSE.
This macro is most applicable to PushButtons. When sent to a PushButton, the macro retrieves the bounding rectangle required to display the button's text. And, if the PushButton has an image list, the bounding rectangle is also sized to include the button's image.
When sent to a button of any other type, the size of the control's window rectangle is retrieved.
Note To use this macro, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see Enabling Visual Styles.
Minimum supported client
|Windows XP [desktop apps only]|
Minimum supported server
|Windows Server 2003 [desktop apps only]|
Build date: 10/27/2012