How to calculate dialog box units based on the current font in Visual C++ (145994)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++ 1.51
- Microsoft Visual C++ 1.52
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 2.0
- Microsoft Visual C++, 32-bit Professional Edition 2.1
- Microsoft Visual C++, 32-bit Professional Edition 2.2
- Microsoft Visual C++, 32-bit Professional Edition 4.0
- Microsoft Visual C++, 32-bit Professional Edition 4.1
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 4.0
- Microsoft Visual C++, 32-bit Learning Edition 4.2
- Microsoft Visual C++, 32-bit Learning Edition 6.0
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual C++ .NET (2003)
This article was previously published under Q145994 Note Microsoft Visual C++ .NET (2002) supports both the managed code
model that is provided by the Microsoft .NET Framework and the unmanaged native
Microsoft Windows code model. The information in this article applies only to
unmanaged Visual C++ code. SUMMARY GetDialogBaseUnits() always assumes the system font when
calculating dialog units. If you are using any font other than the system font,
the return value may not be correct for your dialog box. This article offers
two alternatives you can use to calculate dialog box units based on the current
font. REFERENCES For additional information, please see the following
article in the Microsoft Knowledge Base: 125681 How To Calculate Dialog Base Units with Non-System-Based Font
Modification Type: | Major | Last Reviewed: | 6/3/2005 |
---|
Keywords: | kbinfo kbcode kbDlg kbFont kbhowto KbUIDesign KB145994 kbAudDeveloper |
---|
|