Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CDC::SetMapMode
CDC                                         Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  int SetMapMode( int nMapMode );
 
  Parameter   Description
 
  <nMapMode>  Specifies the new mapping mode. It can be any one of the
              following values:
 
              Value            Meaning
 
              MM_ANISOTROPIC   Logical units are mapped to arbitrary units
                               with arbitrarily scaled axes. The
                               SetWindowExt and SetViewportExt member
                               functions of class CDC 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 SetWindowExt and
                               SetViewportExt member functions of class
                               CDC 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.
 
              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.
 
  Remarks
 
  Sets the mapping mode. The mapping mode defines the unit of measure used
  to transform logical units into device units, and also defines the
  orientation of the device's x- and y-axes. GDI uses the mapping mode to
  convert logical coordinates into the appropriate device coordinates. The
  MM_TEXT mode allows applications to work in device pixels, whose size
  varies from device to device.
 
  The MM_HIENGLISH, MM_HIMETRIC, MM_LOENGLISH, MM_LOMETRIC, and MM_TWIPS
  modes are useful for applications that need to draw in physically
  meaningful units (such as inches or millimeters). The MM_ISOTROPIC mode
  ensures a 1:1 aspect ratio, which is useful when it is important to
  preserve the exact shape of an image. The MM_ANISOTROPIC mode allows the
  x- and y-coordinates to be adjusted independently.
 
  Return Value
 
  The previous mapping mode.
 
  See Also
 
  CDC::SetViewportExt, CDC::SetWindowExt, ::SetMapMode
 
 
                                     -♦-