PRB: CFormView/Dialogs Sized Larger Under Win32s/WinNT 3.50 (157142)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
- Microsoft Visual C++, 32-bit Editions 2.2
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
This article was previously published under Q157142 SYMPTOMS
CFormViews and Dialogs will appear larger when running under Win32s or
versions of Windows NT earlier than 3.51. This can cause problems if the
dialog template was sized so it would fit on a screen in 640x480 resolution
or if special sizing was done.
CAUSE
Win32s and versions of Windows NT before 3.51 used bold fonts for dialogs.
Because dialog templates are designed in dialog units, and dialog units are
based on the average font size, this will cause the dialogs to be resized.
RESOLUTION
The easiest workaround is to create two dialog templates: one sized for
Windows 95 and Windows NT 3.51 or later, and one sized for Win32s and
Windows NT version 3.5 or earlier. All of the controls on the two dialog
templates should have the same ID so they can be used interchangeably with
the same CFormView or CDialog class.
The sample code below demonstrates this workaround with a default Visual
C++ 4.x AppWizard-created CFormView derived class.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 10/17/2003 |
---|
Keywords: | kbDocView kbNoUpdate kbprb KbUIDesign KB157142 kbAudDeveloper |
---|
|