SDI: Switching between main SDI app windows

Tech-Archive recommends: Fix windows errors by optimizing your registry



I want to be able to allow the end-user to pick between medium and
large font sizes for the various controls on the main SDI application
window. This windows has several radio-button-groups, a CTreeCtrl, and
a CRichEditCtrl.

When I use the form editor to lay out the main SDI app window, I'm now
using Arial 8. If I change the Properties for the entire window to
something larger (like Arial 10 or 14), then all the controls have
the font-size increased, and the controls themselves get bigger.

This seems like an easier approach than changing the font size for
each control, and figuring out the sizing for the group-box.
Everything seems to auto-magically resize correctly with that simple
change.

Is there a way to programmatically do the equivalent of changing the
overall font size for the entire window?

If not, is it appropriate to define two separate DIALOGEX and somehow
switch between them? They would be the same except the line for:
FONT 10, "Arial" . With this approach, how do you switch from one
DIALOGEX to another while the app is running? The specification of
which DIALOGEX seems to happen in the InitInstance function.

IDD_INVERSE_FORM DIALOGEX 0, 0, 340, 180
STYLE WS_CHILD
// FONT 8, "Arial"
FONT 10, "Arial"
// FONT 14, "Arial"
BEGIN
GROUPBOX "Recite Category",IDC_FREQ_GROUPBOX,0,1,62,75,0,0,
GROUPBOX "Progress",IDC_PROGRESS_GROUPBOX,63,1,56,75
CONTROL "Daily/Most Frequently",IDC_FREQ,"Button",
BS_AUTORADIOBUTTON | BS_MULTILINE | WS_GROUP |
WS_TABSTOP,1,11,55,18,0
...
... more radio buttons and other controls

...
END

Also, is there a way to make the font for the menu-items and the font
for the Title-Bar be larger with MFC or API function calls?


.


Quantcast