#define BS_PUSHBUTTON       0x00000000L
#define BS_DEFPUSHBUTTON    0x00000001L
#define BS_CHECKBOX         0x00000002L
#define BS_AUTOCHECKBOX     0x00000003L
#define BS_RADIOBUTTON      0x00000004L
#define BS_3STATE           0x00000005L
#define BS_AUTO3STATE       0x00000006L
#define BS_GROUPBOX         0x00000007L
#define BS_USERBUTTON       0x00000008L
#define BS_AUTORADIOBUTTON  0x00000009L
#define BS_OWNERDRAW        0x0000000BL
#define BS_LEFTTEXT         0x00000020L
#if(WINVER >= 0x0400)
#define BS_TEXT             0x00000000L
#define BS_ICON             0x00000040L
#define BS_BITMAP           0x00000080L
#define BS_LEFT             0x00000100L
#define BS_RIGHT            0x00000200L
#define BS_CENTER           0x00000300L
#define BS_TOP              0x00000400L
#define BS_BOTTOM           0x00000800L
#define BS_VCENTER          0x00000C00L
#define BS_PUSHLIKE         0x00001000L
#define BS_MULTILINE        0x00002000L         Wraps the button text to multiple lines if the text string is too long to fit on a single line in the button rectangle.
#define BS_NOTIFY           0x00004000L
#define BS_FLAT             0x00008000L
#define BS_RIGHTBUTTON      BS_LEFTTEXT
#endif /* WINVER >= 0x0400 */

/*
 * User Button Notification Codes
 */
#define BN_CLICKED          0
#define BN_PAINT            1
#define BN_HILITE           2
#define BN_UNHILITE         3
#define BN_DISABLE          4
#define BN_DOUBLECLICKED    5
#if(WINVER >= 0x0400)
#define BN_PUSHED           BN_HILITE
#define BN_UNPUSHED         BN_UNHILITE
#define BN_DBLCLK           BN_DOUBLECLICKED
#define BN_SETFOCUS         6
#define BN_KILLFOCUS        7
#endif /* WINVER >= 0x0400 */

/*
 * Button Control Messages
 */
#define BM_GETCHECK        0x00F0
#define BM_SETCHECK        0x00F1
#define BM_GETSTATE        0x00F2
#define BM_SETSTATE        0x00F3
#define BM_SETSTYLE        0x00F4
#if(WINVER >= 0x0400)
#define BM_CLICK           0x00F5
#define BM_GETIMAGE        0x00F6
#define BM_SETIMAGE        0x00F7

#define BST_UNCHECKED      0x0000
#define BST_CHECKED        0x0001
#define BST_INDETERMINATE  0x0002
#define BST_PUSHED         0x0004
#define BST_FOCUS          0x0008
#endif /* WINVER >= 0x0400 */

Button Styles
        http://msdn2.microsoft.com/en-us/library/ms673347.aspx

Button Styles
Specifies a combination of button styles. If you create a button using the BUTTON class with the CreateWindow or CreateWindowEx function, you can specify any of the button styles listed below.

Constants

BS_3STATE 
Creates a button that is the same as a check box, except that the box can be grayed as well as checked or cleared. Use the grayed state to show that the state of the check box is not determined.

BS_AUTO3STATE 
Creates a button that is the same as a three-state check box, except that the box changes its state when the user selects it. The state cycles through checked, indeterminate, and cleared.

BS_AUTOCHECKBOX 
Creates a button that is the same as a check box, except that the check state automatically toggles between checked and cleared each time the user selects the check box.

BS_AUTORADIOBUTTON 
Creates a button that is the same as a radio button, except that when the user selects it, the system automatically sets the button's check state to checked and automatically sets the check state for all other buttons in the same group to cleared.

BS_CHECKBOX 
Creates a small, empty check box with text. By default, the text is displayed to the right of the check box. To display the text to the left of the check box, combine this flag with the BS_LEFTTEXT style (or with the equivalent BS_RIGHTBUTTON style).

BS_DEFPUSHBUTTON 
Creates a push button that behaves like a BS_PUSHBUTTON style button, but has a distinct appearance. If the button is in a dialog box, the user can select the button by pressing the ENTER key, even when the button does not have the input focus. This style is useful for enabling the user to quickly select the most likely (default) option.

BS_GROUPBOX 
Creates a rectangle in which other controls can be grouped. Any text associated with this style is displayed in the rectangle's upper left corner.

BS_LEFTTEXT 
Places text on the left side of the radio button or check box when combined with a radio button or check box style. Same as the BS_RIGHTBUTTON style.

BS_OWNERDRAW 
Creates an owner-drawn button. The owner window receives a WM_DRAWITEM message when a visual aspect of the button has changed. Do not combine the BS_OWNERDRAW style with any other button styles.

BS_PUSHBUTTON 
Creates a push button that posts a WM_COMMAND message to the owner window when the user selects the button.

BS_RADIOBUTTON 
Creates a small circle with text. By default, the text is displayed to the right of the circle. To display the text to the left of the circle, combine this flag with the BS_LEFTTEXT style (or with the equivalent BS_RIGHTBUTTON style). Use radio buttons for groups of related, but mutually exclusive choices.

BS_USERBUTTON 
Obsolete, but provided for compatibility with 16-bit versions of Windows. Applications should use BS_OWNERDRAW instead.

BS_BITMAP 
Specifies that the button displays a bitmap. See the Remarks section for its interaction with BS_ICON.

BS_BOTTOM 
Places text at the bottom of the button rectangle.

BS_CENTER 
Centers text horizontally in the button rectangle.

BS_ICON 
Specifies that the button displays an icon. See the Remarks section for its interaction with BS_BITMAP.

BS_FLAT 
Specifies that the button is two-dimensional; it does not use the default shading to create a 3-D image. 

BS_LEFT 
Left-justifies the text in the button rectangle. However, if the button is a check box or radio button that does not have the BS_RIGHTBUTTON style, the text is left justified on the right side of the check box or radio button.

BS_MULTILINE 
Wraps the button text to multiple lines if the text string is too long to fit on a single line in the button rectangle.

BS_NOTIFY 
Enables a button to send BN_KILLFOCUS and BN_SETFOCUS notification messages to its parent window. 
Note that buttons send the BN_CLICKED notification message regardless of whether it has this style. To get BN_DBLCLK notification messages, the button must have the BS_RADIOBUTTON or BS_OWNERDRAW style.


BS_PUSHLIKE 
Makes a button (such as a check box, three-state check box, or radio button) look and act like a push button. The button looks raised when it isn't pushed or checked, and sunken when it is pushed or checked.

Makes a check box or radio look and act like a push button. The button looks raised when it isn't pushed or checked, and sunken when it is pushed or checked.

BS_RIGHT 
Right-justifies text in the button rectangle. However, if the button is a check box or radio button that does not have the BS_RIGHTBUTTON style, the text is right justified on the right side of the check box or radio button.

BS_RIGHTBUTTON 
Positions a radio button's circle or a check box's square on the right side of the button rectangle. Same as the BS_LEFTTEXT style.

BS_TEXT 
Specifies that the button displays text.

BS_TOP 
Places text at the top of the button rectangle.

BS_TYPEMASK 
Microsoft Windows 2000: A composite style bit that results from using the OR operator on BS_* style bits. It can be used to mask out valid BS_* bits from a given bitmask. Note that this is out of date and does not correctly include all valid styles. Thus, you should not use this style.

BS_VCENTER 
Places text in the middle (vertically) of the button rectangle.

BS_SPLITBUTTON 
Microsoft Windows Vista and Version 6.00. Creates a split button. A split button has a drop down arrow.The following is a picture of a split button.




BS_DEFSPLITBUTTON 
Microsoft Windows Vista and Version 6.00. Creates a split button that behaves like a BS_PUSHBUTTON style button, but also has a distinctive appearance. If the split button is in a dialog box, the user can select the split button by pressing the ENTER key, even when the split button does not have the input focus. This style is useful for enabling the user to quickly select the most likely (default) option.

BS_COMMANDLINK 
Microsoft Windows Vista and Version 6.00. Creates a command link button. The following is a picture of command link button.




BS_DEFCOMMANDLINK 
Microsoft Windows Vista and Version 6.00. Creates a command link button that behaves like a BS_PUSHBUTTON style button. If the button is in a dialog box, the user can select the command link button by pressing the ENTER key, even when the command link button does not have the input focus. This style is useful for enabling the user to quickly select the most likely (default) option.

Remarks

The appearance of text or an icon or both on a button control depends on the BS_ICON and BS_BITMAP styles, and whether the BM_SETIMAGE message is called. The possible results are as follows. 
BS_ICON or BS_BITMAP set? BM_SETIMAGE called? Result 
Yes Yes Show icon only. 
No Yes Show icon and text. 
Yes No Show text only. 
No No Show text only 


BS_TYPEMASK is not used as a "Bit Field". The proper usage is as follows.

Given: 

 Copy Code
btnstyle = GetWindowLong (hwnd, GWL_STYLE, IDC_BUTTON) & BS_TYPEMASK;
Do not use as follows: 
 Copy Code
// this will be true for BS_AUTOCHECKBOX, BS_CHECKBOX or BS_DEFPUSHBUTTON !
If (btnstyle & BS_AUTOCHECKBOX) 
Use as follows: 
 Copy Code
// this will look for only a BS_AUTOCHECKBOX
If (btnstyle == BS_AUTOCHECKBOX) 


BS_LEFT         EQUATE(0100h)   !Left-justifies the text in the button rectangle.
BS_RIGHT        EQUATE(0200h)   !Right-justifies text in the button rectangle.
BS_CENTER       EQUATE(0300h)   !Centers text horizontally in the button rectangle.

BS_TOP          EQUATE(0400h)   ! Places text at the top of the button rectangle.
BS_BOTTOM       EQUATE(0800h)   ! Places text at the bottom of the button rectangle.
BS_VCENTER      EQUATE(0C00h)   ! Places text in the middle (vertically) of the button rectangle.

BS_RIGHTBUTTON  EQUATE(0020h)   !Positions the radio circle or check square on the right side of the button rectangle.
BS_LEFTTEXT     EQUATE(0020h)   !Alias name for BS_RIGHTBUTTON. Same as Clarion LEFT on RADIO or CHECK.


BS_BOTTOM 
Places text at the bottom of the button rectangle.

BS_CENTER 
Centers text horizontally in the button rectangle.

BS_LEFT 
Left-justifies the text in the button rectangle. However, if the button is a check box or radio button that does not have the BS_RIGHTBUTTON style, the text is left justified on the right side of the check box or radio button.


BS_RIGHT 
Right-justifies text in the button rectangle. However, if the button is a check box or radio button that does not have the BS_RIGHTBUTTON style, the text is right justified on the right side of the check box or radio button.

BS_RIGHTBUTTON 
Positions a radio button's circle or a check box's square on the right side of the button rectangle. Same as the BS_LEFTTEXT style.

BS_RIGHTBUTTON BS_LEFTTEXT 

GWL_STYLE -16 Sets a new window style
BS_LEFT 0100h Left-justifies the text in the button rectangle
BS_RIGHT 0200h Right-justifies text in the button rectangle
BS_CENTER 0300h Centers text horizontally in the button rectangle

BS_TOP 0400h Places text at the top of the button rectangle
BS_BOTTOM 0800h Places text at the bottom of the button rectangle
BS_VCENTER 0C00h Places text in the middle (vertically) of the button rectangle

BS_RIGHTBUTTON 0020h Positions the radio circle or check square on the right side of the button rectangle
BS_LEFTTEXT    0020h Alias name for BS_RIGHTBUTTON. Same as Clarion LEFT on RADIO or CHECK

BS_MULTILINE 2000h Wraps the button text to multiple lines if the text string is too long to fit on a single line in the button rectangle



#define WS_EX_DLGMODALFRAME     0x00000001L
#define WS_EX_NOPARENTNOTIFY    0x00000004L
#define WS_EX_TOPMOST           0x00000008L
#define WS_EX_ACCEPTFILES       0x00000010L
#define WS_EX_TRANSPARENT       0x00000020L

#define WS_EX_MDICHILD          0x00000040L     // WINVER >= 0x0400)
#define WS_EX_TOOLWINDOW        0x00000080L
#define WS_EX_WINDOWEDGE        0x00000100L
#define WS_EX_CLIENTEDGE        0x00000200L
#define WS_EX_CONTEXTHELP       0x00000400L
#define WS_EX_RIGHT             0x00001000L
#define WS_EX_LEFT              0x00000000L
#define WS_EX_RTLREADING        0x00002000L
#define WS_EX_LTRREADING        0x00000000L
#define WS_EX_LEFTSCROLLBAR     0x00004000L
#define WS_EX_RIGHTSCROLLBAR    0x00000000L
#define WS_EX_CONTROLPARENT     0x00010000L
#define WS_EX_STATICEDGE        0x00020000L
#define WS_EX_APPWINDOW         0x00040000L

#if(_WIN32_WINNT >= 0x0500)
#define WS_EX_LAYERED           0x00080000              //(_WIN32_WINNT >= 0x0500)
#define WS_EX_NOINHERITLAYOUT   0x00100000L // Disable inheritence of mirroring by children
#define WS_EX_LAYOUTRTL         0x00400000L // Right to left mirroring
#define WS_EX_NOACTIVATE        0x08000000L
#endif /* _WIN32_WINNT >= 0x0500 */

WS_EX_ACCEPTFILES
                Specifies that a window created with this style accepts drag-drop files.

WS_EX_APPWINDOW
                Forces a top-level window onto the taskbar when the window is visible. 

WS_EX_CLIENTEDGE
                Specifies that a window has a border with a sunken edge.

WS_EX_COMPOSITED
        Windows XP: Paints all descendants of a window in bottom-to-top painting order using double-buffering. For more information, see Remarks. This cannot be used if the window has a class style of either CS_OWNDC or CS_CLASSDC. 

WS_EX_CONTEXTHELP
        Includes a question mark in the title bar of the window. When the user clicks the question mark, the cursor changes to a question mark with a pointer. If the user then clicks a child window, the child receives a WM_HELP message. The child window should pass the message to the parent window procedure, which should call the WinHelp function using the HELP_WM_HELP command. The Help application displays a pop-up window that typically contains help for the child window.
        WS_EX_CONTEXTHELP cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX styles.


WS_EX_CONTROLPARENT
        The window itself contains child windows that should take part in dialog box navigation. If this style is specified, the dialog manager recurses into children of this window when performing navigation operations such as handling the TAB key, an arrow key, or a keyboard mnemonic.

WS_EX_DLGMODALFRAME
        Creates a window that has a double border; the window can, optionally, be created with a title bar by specifying the WS_CAPTION style in the dwStyle parameter.

WS_EX_LAYERED
        Windows 2000/XP: Creates a layered window. Note that this cannot be used for child windows. Also, this cannot be used if the window has a class style of either CS_OWNDC or CS_CLASSDC. 

WS_EX_LAYOUTRTL
        Arabic and Hebrew versions of Windows 98/Me, Windows 2000/XP: Creates a window whose horizontal origin is on the right edge. Increasing horizontal values advance to the left. 

WS_EX_LEFT
        Creates a window that has generic left-aligned properties. This is the default.

WS_EX_LEFTSCROLLBAR
        If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the vertical scroll bar (if present) is to the left of the client area. For other languages, the style is ignored.

WS_EX_LTRREADING
        The window text is displayed using left-to-right reading-order properties. This is the default.

WS_EX_MDICHILD
        Creates a multiple-document interface (MDI) child window.

WS_EX_NOACTIVATE
        Windows 2000/XP: A top-level window created with this style does not become the foreground window when the user clicks it. The system does not bring this window to the foreground when the user minimizes or closes the foreground window. 
To activate the window, use the SetActiveWindow or SetForegroundWindow function.

The window does not appear on the taskbar by default. To force the window to appear on the taskbar, use the WS_EX_APPWINDOW style.


WS_EX_NOINHERITLAYOUT
        Windows 2000/XP: A window created with this style does not pass its window layout to its child windows.

WS_EX_NOPARENTNOTIFY
        Specifies that a child window created with this style does not send the WM_PARENTNOTIFY message to its parent window when it is created or destroyed.

WS_EX_OVERLAPPEDWINDOW
        Combines the WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE styles.

WS_EX_PALETTEWINDOW
        Combines the WS_EX_WINDOWEDGE, WS_EX_TOOLWINDOW, and WS_EX_TOPMOST styles.

WS_EX_RIGHT
        The window has generic "right-aligned" properties. This depends on the window class. This style has an effect only if the shell language is Hebrew, Arabic, or another language that supports reading-order alignment; otherwise, the style is ignored.
Using the WS_EX_RIGHT style for static or edit controls has the same effect as using the SS_RIGHT or ES_RIGHT style, respectively. Using this style with button controls has the same effect as using BS_RIGHT and BS_RIGHTBUTTON styles. 


WS_EX_RIGHTSCROLLBAR
        Vertical scroll bar (if present) is to the right of the client area. This is the default.

WS_EX_RTLREADING
        If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the window text is displayed using right-to-left reading-order properties. For other languages, the style is ignored.

WS_EX_STATICEDGE
        Creates a window with a three-dimensional border style intended to be used for items that do not accept user input.

WS_EX_TOOLWINDOW
        Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by right-clicking or by typing ALT+SPACE. 

WS_EX_TOPMOST
        Specifies that a window created with this style should be placed above all non-topmost windows and should stay above them, even when the window is deactivated. To add or remove this style, use the SetWindowPos function.

WS_EX_TRANSPARENT
        Specifies that a window created with this style should not be painted until siblings beneath the window (that were created by the same thread) have been painted. The window appears transparent because the bits of underlying sibling windows have already been painted.
        To achieve transparency without these restrictions, use the SetWindowRgn function.


WS_EX_WINDOWEDGE
        Specifies that a window has a border with a raised edge.


