DEFPUSHBUTTON Control

The DEFPUSHBUTTON resource-definition statement creates 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.

Syntax

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

Parameters

text
Specifies text that is centered in the rectangular area of the control.
style
Specifies the 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 on the text, id, x, y, width, height, style, and extended-style parameters, see Common Control Parameters.

Example

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

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

See Also

PUSHBUTTON, RADIOBUTTON