Microsoft KB Archive/75736

{|
 * width="100%"|

WMapMode.exe - Mapping Modes Code Example

 * }

Q75736

-

The information in this article applies to:


 * Microsoft Windows Software Development Kit (SDK) 3.1

-

SUMMARY
WMapMode.exe is a sample program in the Microsoft Software Library that demonstrates how to alter a window's logical coordinate system.

MORE INFORMATION
The following file is available for download from the Microsoft Download Center:

"WMapMode.exe" For additional information about how to download Microsoft Support files, click the article number below to view the article in the Microsoft Knowledge Base:

"Q119591 How to Obtain Microsoft Support Files from Online Services" Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.

WMAPMODE implements a modeless dialog box that allows the user to dynamically change the mapping mode attributes for the device context of WMAPMODE's main window. These attributes are the mapping mode, window origin, window extents, viewport origin, and viewport extents. Changing these attributes changes the main window's logical coordinate system.

To illustrate the effects of changes to its logical coordinate system, WMAPMODE's main window displays:


 * The current values for the mapping mode attributes.
 * The dimensions of the client area (in both device units and logical units).
 * The current mouse location (in both device units and logical units).
 * A bitmap. A second modeless dialog box allows the user to specify where the bitmap is drawn.

For more information on using mapping mode attributes, please refer to the following two books:


 * The &quot;Microsoft Windows Software Development Kit Reference, Volume 1,&quot; Section 2.5, &quot;Mapping Functions.&quot;
 * &quot;Programming Windows version 3&quot; (Charles Petzold, Microsoft Press), Chapter 11: &quot;An Introduction to GDI.&quot;

Additional query words:

Keywords : kbfile kbsample kb16bitonly kbDevContext kbGDI kbSDKWin32

Issue type : kbinfo

Technology : kbAudDeveloper kbWin3xSearch kbSDKSearch kbWinSDKSearch kbWinSDK310