Asked By Joseph M. Newcomer
06-Apr-08 01:16 PM

Normally, the dialog will "shrink itself" at lower resolutions, until you hit the minimum
resolution required by the font.
Now, the problem is that once the dialog is *created*, changing the font will not change
the size of the dialog.
What you would have to consider is loading the dialog template, changing the size of the
font resource in the dialog template, and essentially doing CreateDialogIndirect to create
a dialog using that as the default font. This would probably cause it to resize. See
CDIalog::CreateIndirect. To make it modal, you would have to disable the parent; I'm not
sure how to do a top-level dialog indirectly without doing a lot of research, which I
don't really have time to do today.
If confronted by the problem, I'm more likely to figure out an alternative representation
for the layout. In the past, this has included using tabbed dialogs to hold groups of
controls (so they don't all have to be visible, and use up screen space), replacing groups
of radio buttons with dropdown lists, using checklistboxes instead of arrays of check
boxes, and so on. I've also created scrolling controls when that seems appropriate, that
is, the entire control set scrolls.
Note that if you do the resizing, and use a smaller font, people like me will have serious
problems reading the contents. Never forget the "trifocal group" in doing design. And
don't forget the people who have selected "large font" for their default system font,
because they need the larger font to be able to read the material at all.
joe
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm