PRB: Fonts Inconsistent Using Dialog Editor on Windows NT 3.51 (133432)



The information in this article applies to:

  • The Resource Editor, 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

This article was previously published under Q133432

SYMPTOMS

In the resource dialog editor, dialog boxes are bigger in layout mode than 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 problem 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 some possible resolutions:
  • Use the test-mode dialog box as an estimate for the final dialog box size.
  • 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 additional information, click the following article number to view the article in the Microsoft Knowledge Base:

125681 How to calculate dialog base units with non-system-based font


Modification Type:MinorLast Reviewed:4/19/2004
Keywords:kbprb KB133432