Button Control Window Class

The button control's window class describes any type of button control. This includes command buttons, check boxes, and radio boxes. The button class style assigned to a button control determines what type of button it is.

The button control's window class is registered automatically when Windows starts. The name of the class is "BUTTON".

Styles

BS_3STATE
The button is a check box which has three states: checked, grayed, and cleared.
BS_AUTO3STATE
The button is a check box which has three states: checked, grayed, and cleared. The button automatically changes its state when the user selects it.
BS_AUTOCHECKBOX
The button is a check box whose state toggles when the user selects it.
BS_AUTORADIOBUTTON
The button is a radio button whose state automatically changes to selected (and the state of all other radio buttons in the group to unselected) when the user selects it.
BS_BITMAP
The button displays a bitmap.
BS_BOTTOM
The button's text appears at the bottom of the button rectangle.
BS_CENTER
The button's text appears centered horizontally within the button rectangle.
BS_CHECKBOX
The button is a check box.
BS_DEFPUSHBUTTON
The button is the default push button in a dialog box, having a heavy black border.
BS_GROUPBOX
The window is a rectangular grouping frame in which other controls can be grouped.
BS_FLAT
The button is flat, not using the default 3D shading.
BS_ICON
The button displays an icon.
BS_LEFT
The text in the button rectangle is left-justified.
BS_LEFTTEXT, BS_RIGHTBUTTON
The radio or check box's text appears to the left of the button instead of to the right.
BS_MULTILINE
The button's text is wrapped across multiple lines if it cannot fit on a single line.
BS_NOTIFY
The button sends focus notification messages to its parent window.
BS_OWNERDRAW
The owner of the window is responsible for manually drawing it whenever it needs to be redrawn. This window style cannot be combined with any other button styles.
BS_PUSHBUTTON
The button is a push button.
BS_PUSHLIKE
The radio or check button takes on the appearance of a push button. A checked state makes the button look depressed; a cleared state makes the button look normal.
BS_RADIOBUTTON
The button is a radio button.
BS_RIGHT
The text in the button rectangle is right-justified.
BS_TEXT
The button displays text.
BS_TOP
The text appears at the top of the button rectangle.
BS_USERBUTTON
Obsolete; use BS_OWNERDRAW instead.
BS_VCENTER
The text appears centered vertically within the button rectangle.

Constant Definitions

Const BS_3STATE = &H5
Const BS_AUTO3STATE = &H6
Const BS_AUTOCHECKBOX = &H3
Const BS_AUTORADIOBOX = &H9
Const BS_BITMAP = &H80
Const BS_BOTTOM = &H800
Const BS_CENTER = &H300
Const BS_CHECKBOX = &H2
Const BS_DEFPUSHBUTTON = &H1
Const BS_FLAT = &H8000
Const BS_GROUPBOX = &H7
Const BS_ICON = &H40
Const BS_LEFT = &H100
Const BS_LEFTTEXT = &H20
Const BS_MULTILINE = &H2000
Const BS_NOTIFY = &H4000
Const BS_OWNERDRAW = &HB
Const BS_PUSHBUTTON = &H0
Const BS_PUSHLIKE = &H1000
Const BS_RADIOBUTTON = &H4
Const BS_RIGHT = &H200
Const BS_RIGHTBUTTON = &H20
Const BS_TEXT = &H0
Const BS_TOP = &H400
Const BS_USERBUTTON = &H8
Const BS_VCENTER = &HC00

Back to the Window Class list.
Back to the Reference section.


Last Modified: October 29, 2000
This page is copyright © 2000 Paul Kuliniewicz. Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/other/classes/button.html