Detailed Descriptions > AUI > Control > AUI_Control Parameters
ctype

This specifies any valid combination of options from the table below. The symbols come from ashell.def.

Symbol

Value

Description

MBF_BUTTON

&h00000000

(default control type) A rectangular button, which displays a text string and is virtually always associated with a click action. See Button Control.

MBF_CMDLIN

&h00000000

(default cmd type) Clicking the control causes the contents of cmd to be executed as a Windows command line, as if it had been executed via xcall HOSTEX. See cmd notes below.

MBF_DLL

&h00000001

DLL. Clicking the button causes the function (func) with the associated DLL (defined in cmd) to be loaded and executed.

MBF_CHKBOX

&h00000004

Checkbox. Clicking on the button toggles the checkmark display, as well as the value of the one-byte parameter (0 for unchecked, 1 for checked) in func. See Checkbox Control.

MBF_3STATE

&h00000008

Three-state checkbox. Same as a regular checkbox except it has three states: unchecked (0), checked (1), and indeterminate (2).

MBF_SUBMNU

&h00000010

 

MBF_AUTO
RADIOBTN

&h00000010

Radio button. Used in a group (see MBF_GROUPBOX) of two or more radio buttons. Similar to MBF_CHECKBOX except that only one may be selected at a time. Although popular in Windows forms, from a programming standpoint, they are more complex and less efficient than and INFLD combo box (which otherwise accomplishes the same task of allowing the selection of just one from a short list of choices. See Checkbox Alignment, Justification.

MBF_RADIOBTN

&h00000010

Same as MBF_AUTORADIOBTN.

MBF_LFTEXT

&h00000020

For controls such as checkboxes, that contain a text element and some other element, specifies that the text element appear to the left of the other element. (Default is to the right.)

MBF_DLGNO
PARENT

&h00000020

Force dialog box to be a child of the desktop (sibling of the main A-Shell window) rather than a child of the main A-Shell window (both of which involve setting the parentid parameter to 0).

MBF_LFJUST

&h00000040

Left justify text. (Default is center.) Note that for checkboxes, this affects only the justification of the text within the space allotted to it, not whether the text is to the left or right of the checkbox.

MBF_RTJUST

&h00000080

Right justify text. (Default is center.) See MBF_LFJUST above..

MBF_BITMAP

&h00000100

Use with buttons (MBF_BUTTON) or static text controls (MBF_STATIC) to display an image instead of text in the control. ctext is interpreted as the filespec (either AMOS or native) or a DLL bitmap resource (resname::dllname); supported types are BMP, JPG, TIF, PCX, PNG. For buttons, the image will be stretched to fill the button. For static controls, see MBF_NODISTORT, MBF_HCENTER, MBF_VCENTER and MBF_CENTER, and Image Control.

MBF_SYSMENU

&h00000100

For dialogs (MBF_DIALOG), this causes the dialog to sport an “X” (aka system menu) in the upper right corner allowing it to be closed by clicking on it. See Modal Dialog Box.

MBF_ICON

&h00000200

Icon. Applies to both button (MBF_BUTTON) and static (MBF_STATIC) control types. See Icon Control

MBF_TABSTOP

&h00000400

Indicates that the control is part of the group of controls that may receive the focus by tabbing between them. This is automatic for MBF_BUTTON, but may optionally be applied to MBF_CHKBOX, MBF_3STATE, and MBF_AUTORADIOBTN controls. Currently this is only applicable in conjunction with the AUI EVENTWAIT class.

MBF_MAXBUTTON

&h00000400

For dialogs with MBF_ALTPOS and MBF_SYSMENU options set, enables the maximize button.

MBF_SEP

&h00000800

Separator.

MBF_DLGNOCREEP

&h00000800

Applies to nested dialogs, forcing their coordinates to be interpreted relative to the main window, rather than to the parent dialog.

MBF_AUTO
GROW

&h00000800

For static text controls (MBF_STATIC), causes the control to automatically grow as needed to contain the text.  For left justified text (MBF_LFJUST), the left edge will be determined by scol, while ecol is treated only as a minimum size.  (The actual right edge of the control will be shifted to the right as needed to contain the text.)

For right justified text (MBF_RTJUST), the right edge is set by ecol and expands to the left as needed (with scol establishing the minimum).  The bottom edge of the control will also be shifted if necessary to contain the height of the text.  MBF_AUTOGROW is not compatible with MBF_WRAP.

MBF_SUNKEN

&h00001000

For static text controls (MBF_STATIC), causes them to appear with an “sunken” edge.

MBF_READONLY

&h00001000

Read only (with MBF_EDIT).

MBF_UPDOWN

&h00004000

This is a special-purpose option. Generally you would not use this flag directly, unless you wanted to create an Up-Down control independent of INFLD. In that case, use MBF_EDIT + MBF_UPDOWN (+ any other relevant flags); set WINCLASS$ = "ASHEDIT", and WINSTYLE to any valid ES_xxx flags (Windows Edit control styles). Such a control will allow the user to change the value by clicking on the Up-Down buttons, independent of any signals or actions by the application. You would need to use the AUI_CONTROL CTLOP_INFO function to retrieve the current value of the field.

MBF_KBD

&h00010000

Keyboard. Clicking on the control causes the contents of cmd to be forced into the keyboard buffer. See cmd notes below for specifications and hints on how to use this technique effectively. Note that MBF_KBD is ignored if MBF_SHLEXC, MBF_CMDLIN, or MBF_DLL are set.

MBF_SHLEXC

&h00020000

Shell execute. Clicking the button causes the contents of cmd to be interpreted as an object (file or URL) to be opened using the associated application defined in the Windows Registry. See cmd notes below.

MBF_STATIC

&h00040000

Static control, normally used for text prompts, but also may be used for graphic lines and images. For images, ctext is interpreted as the filespec (either AMOS or native) or a DLL bitmap resource (resname::dllname) ; supported types are BMP, JPG, TIF, PCX, PNG. See example under Add Control.

MBF_EDIT

&h00080000

Edit control (reserved for INFLD use). See Icon Control.

MBF_ALTPOS

&h00100000

Adjusts the way in which a control is positioned, with the specific effect varying by the type of control. For buttons (MBF_BUTTON) and group boxes (MBF_GROUPBOX) it causes a slight vertical adjustment (usually an improvement) in the way they are positioned and sized on the screen. See Groupbox + MBF_ALTPOS. For horizontal lines, it moves them from the center of the row to the bottom of the row. For dialogs, it switches the entire dialog (and all its child controls) to the Alternate Dialog Coordinate System.

MBF_WORD
ELLIPSIS

&h00200000

For static text controls (MBF_STATIC), if the text in ctext does not fit within the control, an ellipsis (...) will be displayed.

MBF_PATH
ELLIPSIS

&h00400000

For static text controls (MBF_STATIC), if the text in ctext does not fit within the control, it is interpreted as a path, and an ellipsis will be used for the middle portion of the path to shrink it to fit.

MBF_WRAP

&h00400000

Applies to buttons (MBF_BUTTON) only, causing text within them to wrap to multiple lines (assuming the button is tall enough). This is automatic for static controls.

MBF_
NODISTORT

&h00400000

Applies to images (MBF_ICON or MBF_BITMAP) within controls (MBF_STATIC or MBF_BUTTON) only, causing the aspect ratio of the original image to be preserved when scaling it to the size of the control. Otherwise, the image will be stretched to completely fill the control.

MBF_MODELESS

&h00400000

Mode-less dialog (with MBF_DIALOG).

MBF_DIM

&h00800000

For static text controls (MBF_STATIC), applies the equivalent of the “dim” attribute. This affects the interpretation of the foreground color (fgc) and also makes the text behave like normal fixed-pitch text with respect to protection and clearing.

MBF_LISTBOX

&h01000000

List box control. (Reserved for internal use by XTREE)

MBF_
GROUPBOX

&h02000000

Creates a “groupbox”, which can be used to group other controls. (Do not set MBF_STATIC!) See Groupbox Control.

MBF_FRAME

&h02000000

When used with MBF_STATIC, creates a variation of static control that has a “frame” edge, making it stand out from the background (sort of the reverse of the sunken effect.)

MBF_
COMBOBOX

&h04000000

Combo box control (reserved for INFLD use)

MBF_
UNPROTECTED

&h08000000

May be applied to buttons and other controls which are normally protected, to allow them to be cleared by opcode 4. See Clear Control.

MBF_
PROGRESS

&h10000000

Progress bar control. See Progress Bar Control.

MBF_DIALOG

&h20000000

Dialog box. See Modal Dialog Box

MBF_TAB

&h40000000

Tab control. See Tab Control.

MBF_HCENTER

&h000000C0

Horizontal centering of control text (at top). Applies to static (MBF_STATIC), button (MBF_BUTTON) controls only, with text or images (MBF_BITMAP). See Control Alignment. Also see the MBST_?CENTER flags in cstate.

MBF_VCENTER

&h00000020

Vertical centering of control text (at left). See above comment for MBF_HCENTER.

MBF_CENTER

&h000000E0

Centering along both axes. See above comment for MBF_HCENTER.

Hex-Decimal Values