Dialog Grid Units

The three radio button choices allow you to choose which of the two dialog grid systems (described below) you want to use. The first two choices force all dialogs to use the specified grid. The last choice (choice left to program) allows the applications to determine it on a dialog-by-dialog basis (by whether or not the MBF_ALTPOS flag is specified; see AUI_CONTROL for programming details.)

The Dialog Grid Units setting allows the user to control what kind of metric units (or grid units) to use for defining the size of dialogs and the positioning of objects within them. The two choices are as follows:

Main window grid size

This is equivalent to the grid used in the main A-Shell window—e.g., the 24x80 grid. The size of this grid unit is exactly the size of a single fixed-pitch character, plus the external leading, and it will vary based on the physical size of the window and the currently defined number of rows and columns. Note that this grid system is always used for main windows. The main problem with this grid system is that it makes your dialog sizing dependent on the size of the main window at the time the dialog was created. Thus, if a user likes to have several applications running at the same time, and makes the main window relatively small, your dialogs may be too small. Meanwhile, another user may like to maximize the main window, causing your dialogs to be huge. (This is very unlike the way a typical Windows application sizes its dialogs.) A related problem is that because there may be such a huge discrepancy between the main window grid size and the typical GUI font used in dialogs, the row/column units used to position and size controls in the dialog may be nearly meaningless, making it hard to visualize the dialog while programming. A third problem is that when the dialog is created, the coordinates specified are for the total size, including the caption. Because the caption height may be more or less than one logical row, depending on the size of the main window, this makes it hard to know exactly how many usable rows are inside the dialog. For these reasons, the traditional grid is not recommended.

Windows desktop font size grid

This is based on the standard Windows desktop font (i.e. the font used for the text beneath desktop shortcut icons). This is also the same font that is used for the standard menu bar options in Windows programs, and for the text in most standard Windows dialogs. This grid system solves the problems discussed above. First, it is independent of the size of the main window. Second, since it is based on the standard Windows GUI font size, it adjusts automatically to changes in the Windows desktop settings (i.e. the resolution and font DPI). In other words, if the user doesn't like the typical tiny Windows font and adjusts the font DPI to make everything in the Windows environment bigger, your A-Shell dialogs will get bigger right along with everything else. Third, since the units are based on the same standard GUI font that is the standard in dialogs, the units are more meaningful in the sense that they relate more closely to the amount of text you can display. (Obviously, it is impossible to have a one column equals one character ratio with proportional fonts like you have with fixed pitch fonts, but the grid unit width is based on the "average" character width, with a little extra to allow for text that may consist of above-average widths.)