GetMapMode

  int GetMapMode(hdc)    
  HDC hdc; /* device-context handle */

The GetMapMode function retrieves the current mapping mode.

Parameters

hdc

Identifies the device context.

Return Value

The return value specifies the mapping mode if the function is successful. Otherwise it is zero.

Comments

The following list describes the various mapping modes:

Value Meaning

MM_ANISOTROPIC Logical units are mapped to arbitrary units with arbitrarily scaled axes. The SetWindowExtEx and SetViewportExtEx functions must be used to specify the desired units, orientation, and scaling.
MM_HIENGLISH Each logical unit is mapped to 0.001 inch. Positive x is to the right; positive y is up.
MM_HIMETRIC Each logical unit is mapped to 0.01 millimeter. Positive x is to the right; positive y is up.
MM_ISOTROPIC Logical 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. The SetWindowExtEx and SetViewportExtEx functions must be used to specify the desired units and the orientation of the axes. GDI makes adjustments as necessary to ensure that the x and y units remain the same size (e.g. If you set the window extent, the viewport will be adjusted to keep the units isotropic).
MM_LOENGLISH Each logical unit is mapped to 0.01 inch. Positive x is to the right; positive y is up.
MM_LOMETRIC Each logical unit is mapped to 0.1 millimeter. Positive x is to the right; positive y is up.
MM_TEXT Each logical unit is mapped to one device pixel. Positive x is to the right; positive y is down.
MM_TWIPS Each logical unit is mapped to one twentieth of a printer's point (1/1440 inch). Positive x is to the right; positive y is up.

See Also

SetMapMode