The base graphic button provides the ability to display bitmaps and text;
it defaults to the Up state. Additional styles can be used to increase
its function.
Graphic button controls have the following window styles:
GBS_TWOSTATE
A two-state graphic button has two
states-Up and Down. If the button is in the Up state, the button is drawn
with the Z-order above the owner. If the button is in the Down state, the
button is drawn with the Z-order below the owner. Typically, the Up state
expresses to the user that the button's action is selectable; while the
Down state expresses that the action is being processed currently. Related
messages are GBM_SETSTATE, GBM_QUERYSTATE,
GBM_SETBITMAPINDEX, and GBM_QUERYBITMAPINDEX.
GBS_AUTOTWOSTATE
An automatic
two-state graphic button automatically toggles its state from Up to Down
and from Down to Up whenever the user clicks on it. No message from the
owner is required for the button to toggle its state. Related messages
are GBM_SETSTATE, GBM_QUERYSTATE,
GBM_SETBITMAPINDEX, and GBM_QUERYBITMAPINDEX.
If both GBS_TWOSTATE and GBS_AUTOTWOSTATE are set, GBS_AUTOTWOSTATE takes
precedence.
GBS_ANIMATION
GBS_AUTOANIMATION
GBS_HILITEBITMAP
This
style permits display of a different bitmap when the graphic button is in
the highlighted paint state. The highlighted paint state occurs when the
user presses the pointer button while over the graphic button or holds the
spacebar down when the graphic button has the focus. This bitmap is set
by the GBM_SETBITMAPINDEX message
with GB_HILITE as the specified index to change. Related messages are GBM_SETBITMAPINDEX
and GBM_QUERYBITMAPINDEX.
GBS_DISABLEBITMAP
GBS_3D_TEXTRECESSED
The text on the graphic button is displayed three-dimensionally.
The Z-order of the text is below the face of the graphic button. The text
is drawn with its main body black, and the bottom and right edges white.
GBS_3D_TEXTRAISED
The text
on the graphic button is displayed three-dimensionally. The Z-order of the
text is above the face of the graphic button. The text is drawn with its
main body white, and the bottom and right edges black.
If both GBS_3D_TEXTRECESSED and GBS_3D_TEXTRAISED are set, GBS_3D_TEXTRAISED
takes precedence.
[Back]
[Next]