Gets the size of the button that best fits its text and image, if an image list is present. You can send this message explicitly or use the Button_GetIdealSize macro.
Not used; must be zero.
A pointer to a SIZE structure that receives the desired size of the button, including text and image list, if present. The calling application is responsible for allocating this structure. Set the cx and cy members to zero to have the ideal height and width returned in the SIZE structure. To specify a button width, set the cx member to the desired button width. The system will calculate the ideal height for this width and return it in the cy member.
If the message succeeds, it returns TRUE. Otherwise it returns FALSE.
This message is most applicable to PushButtons. When sent to a PushButton, the message retrieves the bounding rectangle required to display the button's text. Additionally, 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.
Minimum supported client
|Windows Vista [desktop apps only]|
Minimum supported server
|Windows Server 2003 [desktop apps only]|