[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  SetMapMode( hDC, nMode )-> <nOldMode>
------------------------------------------------------------------------------


 PARAMETER:

  <hDC>     Identifies the device context.

  <nMode>   specifies the new mapping mode. This parameter can be any one
            of the following values:

            MM_ANISOTROPIC Logical units are converted to arbitrary units
                           with arbitrarily scaled axes. Setting the mapping
                           mode to MM_ANISOTROPIC does not change the
                           current window or viewport settings. To change
                           the units, orientation and scaling,an application
                           should use SetWindowExt and SetViewportExt.
            MM_HIENGLISH   Each logical unit is converted to 0.001 inch.
                           Positive x is to the right; positive y is up.
            MM_HIMETRIC    Each logical unit is converted to 0.01 millimeter
                           Positive x is to the right; positive y is up.
            MM_ISOTROPIC   Logical units are converted to arbitrary units
                           with equally scaled axes; that is, one unit along
                           the x-axis is equal to one unit along the y-axis.
                           SetWindowExt and SetViewportExt must be used
                           to specify the desired units and the orientation
                           of the axes. GDI makes adjustments as necessary 
                           to ensure that x and y units remain the same size
            MM_LOENGLISH   Each logical unit is converted to 0.01 inch.
                           Positive x is to the right; positive y is up.
            MM_LOMETRIC    Each logical unit is converted to 0.1 millimeter.
                           Positive x is to the right; positive y is up.
            MM_TEXT        Each logical unit is converted to one device
                           pixel. Positive x is to the right; positive y
                           is down.
            MM_TWIPS       Each logical unit is converted to 1/20 of a
                           point. (Because a point is 1/72 inch, a twip is
                           1/1440 inch). Positive x is to the right;
                           positive y is up.

 RETURNS:

  <nOldMode> is the previous mapping mode if the function is successful.


 DESCRIPTION:

  The MM_TEXT mode allows applications to work in device pixels, where one
  unit is equal to one pixel. The physical size of a pixel varies from
  device to device.
  The MM_HIENGLISH, MM_HIMETRIC, MM_LOENGLISH, MM_LOMETRIC, and MM_TWIPS
  modes are useful for applications that must 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.

 SOURCE:

  SOURCE\WINAPI\SETMAPMO.C



See Also: GetMapMode SetViewPortExt SetWindowExt
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson