Please enable JavaScript to view this site.

A-Shell Reference

Scaling logic applies to dialogs immediately, and the ALTPOS grid basis has changed slightly. Unfortunately this will likely have a minor effect on the width of existing dialogs using ALTPOS, but the new formula is slightly more natural, and virtually eliminates the need for the strange 160 default width scale in the Dialog Sizing dialog. Consequently, existing dialog sizing scale factors will be reset to 100 for existing .ash files. (Once you re-save any settings, your saved settings will be preserved.)

For dialogs using the ALTPOS grid, the grid basis continues to be the size of a character in the default GUI font. The actual grid row height is equal to the height of a combo box plus the external leading, and the grid column width is about half way between the "average" and maximum character width for the default GUI font. Unlike before, the default GUI font is scaled according to the scale factor in the Misc. Settings dialog. Since scaling that font also affects the height of combo boxes and the average character width, the entire grid scales along with the font scale factor.

For example, with the font scale factor set to 0 or 100, the dialog grid will be based on the default size of the default GUI font. (This is the font you see in menu bars and in most standard Windows dialogs.) If you change that to, say, 90, then the dialog and everything in it should get about 10% smaller. (Scaling isn't entirely linear or orthogonal, but that's approximately the idea.)

Related to this, the Dialog Sizing dialog offers a new option of whether to include the dialog caption in the dialog height when forcing dialogs to use the grid based on Font Size (i.e. ALTPOS units). Normally, dialogs using the font-size or ALTPOS grid are sized so that they have the expected number of rows not counting the caption bar. For example, if SROW = 1 and EROW = 10, then there will be room for 10 logical rows inside the dialog. This is quite convenient and logical, but conflicts with the way non-ALTPOS (main-window based) dialogs are sized, since they include the caption in the height. So in our example of SROW=1 and EROW=10, the outer height of the dialog would be equivalent to 10 rows in the main window, but since that includes the caption, you will probably end up with something closer to 9 rows.

This causes a problem when trying to convert dialogs to the ALTPOS grid, because you almost always end up with the equivalent of one extra row in the dialog. The new option in the Dialog Sizing dialog to include the caption in the dialog height should help you counteract that. Note however, that it only has an effect on dialogs that weren't explicitly coded to use MBF_ALTPOS. (The theory is that if you coded the dialog to use the ALTPOS grid, then you were counting on the number of rows. But if you coded it to use the main window grid, and then we force it to use the ALTPOS grid via the option on the Dialog Sizing dialog, then you probably don't want the extra row.

Another side effect of the new scaling logic is that you can indirectly resize an active dialog by resizing the main window behind it.