﻿# Dialog Options

_Updated December 2013_

The following _ctype_ and _ctype2_ flags relate specifically to dialogs:

| **Symbol** | **Description** |
|------|------|
| MBF\_ALTPOS | Changes the grid units used to size the dialog and position the controls within it, from the main window grid, i.e. the original text R rows by C columns system used by TAB(R,C), to units that are based on the Windows desktop font and resolution. See [Dialog Positioning](dialogpositioning.md). |
| MBF\_DLGNOCREEP | Applies to nested dialogs which don't use MBF\_ALTPOS, eliminating the cascading (aka "creeping") effect by making the dialog interpret its position relative to the main window rather than to the parent dialog. |
| MBF\_DLGNOPARENT | Forces 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. See [Dialog Positioning](dialogpositioning.md). |
| MBF\_MAXBUTTON | Enables the maximize dialogs button (requires MBF\_SYSMENU) |
| MBF\_MODELESS | Creates a [Modeless Dialog](modelessdialog.md). |
| MBF\_SYSMENU | Adds the "X" button to the dialog. |
|  |  |
| MBF2\_DLGICON | Display the dialog icon in the dialog title bar. |
| MBF2\_DLGNOCAP | Creates a dialog with no caption. Such a dialog is effectively anchored to its parent, as if it were a child control, except that it can host its own child controls. |
| MBF2\_DLGSTATE | Causes A-Shell to remember and re-use the last size/position/state of the dialog, ignoring the specified coordinates/state. |
| MBF2\_MINBUTTON | Used with MBF\_SYSMENU to add a minimize button to a modal dialog.  |
| MBF2\_NOMOVE | Prevents a dialog from being moved. |
| MBF2\_PIXCOORDS | Allows you to specify all the coordinates of the dialog in pixels. See [Dialog Positioning](dialogpositioning.md). |
| MBF2\_PIXSIZE | Allows you to specify the size of the dialog in pixels. See [Dialog Positioning](dialogpositioning.md). |
| MBF2\_RESIZE | May be used with MBF\_ALTPOS to allow the dialog to be resized with the mouse. |




Use the following _winstyle _options to further define the dialogs:

| | | |
|------|------|------|
| WS\_BORDER | \&h00080000 | Adds a thin border. Is normally only applicable with MBF2\_DLGNOCAP. |
| WS\_VSCROLL | \&h00200000 | Used to support vertical scrolling in dialogs. The scroll bar is initially disabled, but is automatically enabled and configured as fields are added to the dialog that extend beyond the bottom of the visible dialog. Users can scroll the dialogs using the scroll bar. AUI\_EVENTWAIT will also auto-scroll the dialog as needed to bring the newly focused control into view. See [Dialog Scrolling](dialogscrolling.md).  |




**History**

2013 December:  Added two winstyle symbols in separate table.

2012 November:  This topic added.

