Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GetMapMode function

The GetMapMode function retrieves the current mapping mode.

Syntax


int GetMapMode(
  _In_  HDC hdc
);

Parameters

hdc [in]

A handle to the device context.

Return value

If the function succeeds, the return value specifies the mapping mode.

If the function fails, the return value is zero.

Remarks

The following are the various mapping modes.

ModeDescription
MM_ANISOTROPICLogical units are mapped to arbitrary units with arbitrarily scaled axes. Use the SetWindowExtEx and SetViewportExtEx functions to specify the units, orientation, and scaling required.
MM_HIENGLISHEach logical unit is mapped to 0.001 inch. Positive x is to the right; positive y is up.
MM_HIMETRICEach logical unit is mapped to 0.01 millimeter. Positive x is to the right; positive y is up.
MM_ISOTROPICLogical units are mapped to arbitrary units with equally scaled axes; that is, one unit along the x-axis is equal to one unit along the y-axis. Use the SetWindowExtEx and SetViewportExtEx functions to specify the units and the orientation of the axes. Graphics device interface makes adjustments as necessary to ensure the x and y units remain the same size. (When the windows extent is set, the viewport will be adjusted to keep the units isotropic).
MM_LOENGLISHEach logical unit is mapped to 0.01 inch. Positive x is to the right; positive y is up.
MM_LOMETRICEach logical unit is mapped to 0.1 millimeter. Positive x is to the right; positive y is up.
MM_TEXTEach logical unit is mapped to one device pixel. Positive x is to the right; positive y is down.
MM_TWIPSEach logical unit is mapped to one twentieth of a printer's point (1/1440 inch, also called a "twip"). Positive x is to the right; positive y is up.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Coordinate Spaces and Transformations Overview
Coordinate Space and Transformation Functions
SetMapMode
SetWindowExtEx
SetViewportExtEx

 

 

Community Additions

Show:
© 2014 Microsoft