Maximized dialogs may be created by specifying the MBST_MAXIMIZE flag (&h040) in the cstate parameter when creating the dialog.
You may also enable the maximize button on a dialog with MBF_ALTPOS and MBF_SYSMENU set, by adding the flag MBF_MAXBUTTON to the ctype field. (MBF_MAXBUTTON is defined in ashell.def as &h00000400.)
While on this subject, let's review a few aspects of dialog sizing:
• | Only dialogs which have the MBF_SYSMENU will have minimize and maximize buttons (along with the "X" button). However, whether the buttons are enabled or disabled depends on the factors below. |
• | Maximization is only an option with MBF_ALTPOS dialogs. (Otherwise, since the dialog grid would be based on the main window, changing the dialog size really requires changing the main window size.) |
• | The minimize button is only enabled for modeless dialogs. (The theory here is that it makes no sense to minimize a modal dialog, since that would make the application appear to be hung.) |
• | The maximize button is never automatically enabled, but you can enable it yourself by adding the MBF_MAXBUTTON flag. |
• | Maximizing a dialog does rescale the controls, but it does not change the font sizes. (This was subsequently changed in 984.4.) |
In the case of XTREE, any column which was defined with a Dspmin= or Dspwid= clause will be adjusted accordingly (since resizing the dialog changes the effective width of the grid units). However, for the rest of the columns, they probably won't change size, since the column width is normally determined by XTREE itself based on the data. So you'll most likely end up with all of the extra space appearing the final column.