Please enable JavaScript to view this site.

A-Shell Consolidated Reference

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.

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. 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.

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 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

&h80000000

Improve performance when switching between panels.

Hex-Decimal Values

 

History

2016 June, A-Shell 6.2.1427:  Centering of caption-less (MBF2_DLGNOCAP) dialogs within a parent dialog now supported.