PRB: Fonts Inconsistent Using Dialog Editor on Windows NT 3.51

Last reviewed: April 21, 1996
Article ID: Q133432
The information in this article applies to:
  • The Resource Editor included with: Microsoft Visual C++, 32-bit Edition, versions 2.0, 2.1, 2.2

SYMPTOMS

In the resource dialog editor, dialog boxes are bigger in layout mode than they are in test mode (On the Resource menu, click Test). Additionally, the fonts in the dialog box are bold in layout mode but normal in test mode. At run time, the dialog box size and font are equivalent to the test-mode dialog box size and font.

This is not a problme in Microsoft Visual C++ version 4.0 or greater.

CAUSE

The size of a dialog box is based on the size of its font. In layout mode, the font is forced to be bold, and because a bold font is larger than a normal font of the same point size, the dialog box appears bigger in layout mode than it does in test mode.

RESOLUTION

Here are three possible resolutions:

  • Use the test-mode dialog box as an estimate for the final dialog box size.

    -or-

  • Calculate the size of the dialog box area in pixels, and convert it to Dialog Base Units (Dialog box measurements are given in dialog base units) based on the font and size of the dialog box being used.

For more information on how to calculate dialog box units, please see the following articles in the Microsoft Knowledge Base:

   ARTICLE-ID: Q125681
   TITLE     : How to Calculate Dialog Base Units with Non-System-Based
               Font

   ARTICLE-ID: Q74280
   TITLE     : Translating Dialog-Box Size Units to Screen Units


Additional reference words: 2.00 2.10 3.00 3.10
KBCategory : kbui kbprb
KBSubCategory: AppStudioIss


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 21, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.