Styles

The following table identifies the graphic button styles that can be specified for a graphic button to increase its functionality. A graphic button with no style bits set has an "up" state and the capability to display bitmaps, or text, or both.

┌────────────────────┬────────────────────────────────────────┐
│Style               │Description                             │
├────────────────────┼────────────────────────────────────────┤
│GBS_TWOSTATE        │Creates a graphic button that has two   │
│                    │states: up and down. When the button is │
│                    │in the up state (drawn with its z-order │
│                    │above the owner), this usually indicates│
│                    │it is selectable.  When the button is in│
│                    │the down state (drawn with its z-order  │
│                    │below the owner), this usually indicates│
│                    │an action is being processed.           │
├────────────────────┼────────────────────────────────────────┤
│GBS_AUTOTWOSTATE    │Creates a two-state graphic button that │
│                    │automatically toggles its state from up │
│                    │to down or down to up whenever the user │
│                    │clicks on it.  No messages from the     │
│                    │owner are required for the button to    │
│                    │toggle its state.                       │
├────────────────────┼────────────────────────────────────────┤
│GBS_ANIMATION       │Creates an animated graphic button that │
│                    │displays a series of bitmaps. Display of│
│                    │the series is handled like a circular   │
│                    │list; after the last bitmap in the      │
│                    │series is displayed, the first bitmap in│
│                    │the series is displayed, and so forth.  │
├────────────────────┼────────────────────────────────────────┤
│GBS_AUTOANIMATION   │Creates an animated graphic button that │
│                    │automatically toggles its animation from│
│                    │off to on or on to off whenever the user│
│                    │clicks on it. Usually, when the button's│
│                    │animation is off, the button is         │
│                    │selectable. Conversely, when the        │
│                    │animation is on, an action is being     │
│                    │processed.                              │
├────────────────────┼────────────────────────────────────────┤
│GBS_HILITEBITMAP    │Creates a graphic button that displays a│
│                    │different bitmap when the button is in a│
│                    │highlighted paint state.  The           │
│                    │highlighted paint state occurs when the │
│                    │user presses the mouse button while the │
│                    │pointer is over the graphic button (or  │
│                    │the user holds the spacebar down while  │
│                    │the graphic button has the focus).      │
├────────────────────┼────────────────────────────────────────┤
│GBS_DISABLEBITMAP   │Creates a graphic button that displays a│
│                    │different bitmap when the highlighted   │
│                    │paint state of the button is disabled.  │
├────────────────────┼────────────────────────────────────────┤
│GBS_3D_TEXTRECESSED │Creates a graphic button that has       │
│                    │three-dimensional text.  The text       │
│                    │z-order is below the face of the button.│
│                    │The main body of the text is black, and │
│                    │its bottom and right edges are white.   │
├────────────────────┼────────────────────────────────────────┤
│GBS_3D_TEXTRAISED   │Creates a graphic button that has       │
│                    │three-dimensional text.  The text       │
│                    │z-order is above the face of the button.│
│                    │The main body of the text is white, and │
│                    │its bottom and right edges are black.   │
└────────────────────┴────────────────────────────────────────┘
Note: Setting both GBS_3D_TEXTRECESSED and GBS_3D_TEXTRAISED is not recommended, because this can cause unpredictable behavior.


[Back: Graphic Buttons]
[Next: Owner Notifications]