Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic


Defines a default push-button control. The control is a small rectangle with a bold outline that represents the default response for the user. The given text is displayed inside the button. The control highlights the button in the usual way when the user clicks the mouse in it and sends a message to its parent window.

DEFPUSHBUTTON text, id, x, y, width, height [, style [, extended-style]]


Text that is to be centered in the rectangular area of the control.


Control styles. This value can be a combination of the following styles: BS_DEFPUSHBUTTON, WS_TABSTOP, WS_GROUP, and WS_DISABLED.

If you do not specify a style, the default style is BS_DEFPUSHBUTTON | WS_TABSTOP.

For more information about the general syntax of a control statement, see Common Control Parameters.


This example defines a default push-button control that is labeled Cancel:

DEFPUSHBUTTON "Cancel", 101, 10, 10, 24, 50

See also

Push Buttons



Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.