Article ID: 195028
Article Last Modified on 11/21/2006
APPLIES TO
- Microsoft Foundation Class Library 4.2, when used with:
- Microsoft Visual C++ 4.0 Standard Edition
- Microsoft Visual C++ 4.1 Subscription
- Microsoft Visual C++ 4.2 Enterprise Edition
- Microsoft Visual C++ 5.0 Enterprise Edition
- Microsoft Visual C++ 6.0 Enterprise Edition
- Microsoft Visual C++ 4.2 Professional Edition
- Microsoft Visual C++ 5.0 Professional Edition
- Microsoft Visual C++ 6.0 Professional Edition
- Microsoft Visual C++ 6.0 Standard Edition
- Microsoft Visual C++ .NET 2002 Standard Edition
- Microsoft Visual C++ .NET 2003 Standard Edition
This article was previously published under Q195028
NOTE: Microsoft Visual C++ .NET (2002) and Microsoft Visual C++ .NET
(2003) support both the managed code model that is provided by the .NET
Framework and the unmanaged native Windows code model. The information in this
article applies to unmanaged Visual C++ code only.
SUMMARY
The Mfccdc sample demonstrates how to set the Mapmode,
Viewport, and Window parameters, and draws a rectangle based on given logical
coordinates; then, the sample calculates the resulting device units.
The sample shows how to use the following functions:
SetMapMode()
SetWindowExt()
SetViewportExt()
SetWindowOrg()
SetViewportOrg()
LPtoDP()
NormalizeRect()
REFERENCES
VC Online help - "CDC class members" and "Converting from
Device Coordinates to Logical Coordinates."
Charles Petzold's book,
"Programming Windows," ISBN 1-55615-264-7.
Additional query words: kbDSupport mapmode viewport MM_ISOTROPIC MM_ANISOTROPIC
MM_LOENGLISH MM_HIENGLISH MM_TWIPS MM_TEXT Mfccdc Mfccdcvcnet
Keywords: kbfile kbgdi kbhowto KB195028