# cstate > [HTML Version](cstate.htm) _Updated June 2016; see History_ Parameter _cstate_ indicates the initial state of the control (when adding) and flags which affect the change operation. The symbols come from [ashell.def](ashell_def.htm.md). | **Symbol** | **Value** | **Description** | |------|------|------| | MBST\_ENABLE | \&h0000000 | Enabled. | | MBST\_DISABLE | \&h0000001 | Disable (grayed out). | | MBST\_HIDE | \&h0000004 | Hidden (invisible). | | MBST\_SHOW | \&h0000008 | Make visible (if hidden). | | MBST\_MINIMIZE | \&h0000010 | Create minimized modeless dialog. See [Dialog Positioning Tip](dialogpositioningtip.htm.md). Works with CTLOP\_CHG and CTLOP\_ADD. | | MBST\_CENTER | \&h0000020 | Equivalent to MBST\_HCENTER + MBST\_VCENTER, which see below. | | MBST\_MAXIMIZE | \&h0000040 | (For MBF\_ALTPOS dialogs only) Maximize dialog. Also see MBF\_MAXBUTTON. | | MBST\_CHANGE | \&h0000080 | 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 | \&h0000200 | 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 | \&h0000400 | Operate on edit controls only. | | MBST\_PLAY | \&h0004000 | Start an AVI playing. See [Animated Graphics](animatedgraphicsctrl.htm.md). | | MBST\_STOP | \&h0008000 | Stop an AVI playing. | | MBST\_POS | \&h0010000 | Causes the position and size of the specified control to be updated. | | MBST\_STYLE | \&h0020000 | Used with CTLOP\_CHG to change the style and alignment flags for an existing control. | | MBST\_CHANGEX | \&h0040000 | 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 | \&h0080000 | 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
| \&h00200000 | 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 | \&h00400000 | | MBST\_HCENTER


| \&h00800000 | These allow controls to be centered just horizontally or just vertically. (Specifying both is equivalent to MBST\_CENTER.) Note that this kind of centering positions the current control relative to its 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 within the dialog, effectively using the _scol_ and _ecol_ parameters only to determine the button width. See the MBF\_?CENTER flags in [ctype](ctype.htm.md) for options controlling the centering of text (or image) displayed within the control—as opposed to the centering of the control relative to its parent. Note that for many control types, particularly image controls, effective centering generally requires both the MBST\_?CENTER and MBF\_?CENTER flags, i.e. centering of the image within the control and centering of the control within the parent. | | MBST\_VCENTER | \&h01000000 | | MBST\_CHGTIPMNU | \&h02000000 | May be used with CTLOP\_CHG to change just the context menu for the control. You could also do this with MBST\_CHANGEX, but it effectively deletes and re-adds the entire control, creating a possible "flicker", and also requiring that you pass all of the parameters. With MBST\_CHGTIPMNU, other parameters such as the coordinates, type, etc. are ignored and left alone. See sample program ICOMNUBAR\[908,27\] for an example of using the feature to change the enabled/disabled state of icon context menus. | | MBST\_NOREDRAW | \&h04000000 | May be specified in a CTLOP\_CHG operation to prevent the normal refresh/redraw of the client area of the TabX control. This is mainly useful for eliminating "flicker" when enabling/disabling panels other than the current one, since those operations do not really require a full refresh. | | MBST\_NORMALIZE | \&h10000000 | May be used with CTLOP\_CHG to change the state of a minimized or maximized window back to normal. | | [MBST\_SAVRES](mbst_savres.htm.md) | \&h80000000 | Improve performance when switching between panels. | [Hex-Decimal Values](hex-decimalvalues.htm.md) **History** 2016 June, A-Shell 6.2.1427: Centering of caption-less (MBF2\_DLGNOCAP) dialogs within a parent dialog now supported.