Subroutines > Detailed Descriptions > AUI > Control > AUI_Control Parameters
cstate

This indicates the initial state of the control (when adding) and flags which affect the change operation. The symbols come from ashell.def.

Symbol

Value

Description

MBST_ENABLE

&h000000

Enabled.

MBST_DISABLE

&h000001

Disable (grayed out).

MBST_HIDE

&h000004

Hidden (invisible).

MBST_SHOW

&h000008

Make visible (if hidden).

MBST_MINIMIZE

&h000010

Create minimized modeless dialog. See Dialog Positioning Tip. Works with CTLOP_CHG and CTLOP_ADD.)

MBST_CENTER

&h000020

Centers a control on its parent. This is mainly intended for centering dialogs but theoretically works for any control type. Note that the centering logic is based on the outer frame of the parent window, and does not take into account the position and size of the task bar.

MBST_MAXIMIZE

&h000040

(For MBF_ALTPOS dialogs only) Maximize dialog. Also see MBF_MAXBUTTON.

MBST_CHANGE

&h000080

Change ctext and cmd. Use this with opcode 2 to update the ctext and cmd parameters associated with an existing button. Otherwise, only the button state is updated.

MBST_TEXTONLY

&h000200

May be added to MBST_CHANGE to cause only the text of the control to be modified. This can eliminate the "flicker" that might otherwise appear as all of the attributes of the control are reset, especially when updating the title bar of a dialog.

MBST_CLREDITS

&h000400

Operate on edit controls only.

MBST_PLAY

&h004000

Start an AVI playing. See Animated Graphics.

MBST_STOP

&h008000

Stop an AVI playing.

MBST_POS

&h010000

Causes the position and size of the specified control to be updated.

MBST_STYLE

&h020000

Used with CTLOP_CHG to change the style and alignment flags for an existing control.

MBST_CHANGEX

&h040000

This is related to MBST_CHANGE, MBST_POS and MBST_STYLE. It affects those attributes (font, color, etc.) that were not covered by the other bits, and permits changing virtually everything about most controls (tooltips, associated images, and in most cases even the control type).

MBST_SELECT

&h080000

This "selects" the control if the control has the design mode flag set. (Just ignore this comment as "design mode" is a long way from being usable.) Note that to unselect a control, use CTLOP_CHG with MBST_CHANGE and don't specify the MBST_SELECT flag.

 

MBST_ZTOP

 

&h200000

These may be used to force the control to be at the top or bottom, respectively, of the "Z-order." (The "Z-order" determines the display order of controls that otherwise have the same precedence. In general, controls created later are farther down the Z-order than those created earlier. These flags would mainly be of use in situations where you have overlapping sibling controls.)

MBST_ZBOTTOM

&h400000

 

 

MBST_HCENTER

 

 

&h0800000

These allow controls to be centered just horizontally or just vertically. (Specifying both is equivalent to MBST_CENTER, which should now probably be deprecated to free up a bit, although it will be a long time before we could expect to be able to reuse the bit.) Also: Centers the control horizontally or vertically relative to the parent control, or, in the case of a dialog without a parent, relative to the desktop. For example, MBST_HCENTER specified on a button within a dialog would horizontally center the button (effectively using the scol and ecol parameters only to determine the button width). See the MBF_?CENTER flags in ctype for options controlling the centering of the text displayed in the control (as opposed to the centering of the control itself).

MBST_VCENTER

&h1000000

MBST_NORMALIZE

&h10000000

May be used with CTLOP_CHG to change the state of a minimized or maximized window back to normal.

Hex-Decimal Values