msos2.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
USERBUTTON (1.2)
Button Controls Overview                            Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINBUTTONS
 
typedef struct _USERBUTTON {    /* ubtn */
    HWND   hwnd;
    HPS    hps;
    USHORT fsState;
    USHORT fsStateOld;
} USERBUTTON;
 
The USERBUTTON structure is used by applications creating custom buttons.
When a custom button is to be drawn, the owner receives a WM_CONTROL message
with the low word of the first parameter equal to BN_PAINT. The second
parameter is a pointer to the USERBUTTON structure that contains the
information necessary for drawing the button.
 
Field       Description
────────────────────────────────────────────────────────────────────────────
 
hwnd        Identifies the window.
 
hps         Identifies the presentation space.
 
fsState     Specifies the new state of the user button. This may be one of
            the following values:
 
                 BDS_HILITED
                 BDS_DISABLED
                 BDS_DEFAULT
 
fsStateOld  Specifies the previous state of the user button.
 
See Also
 
WM_CONTROL