Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
CDC::SetViewportExt
CDC                                         Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  CSize SetViewportExt( int x, int y );
  CSize SetViewportExt( SIZE size );
 
  Parameter   Description
 
  <x>         Specifies the x-extent of the viewport (in device units).
 
  <y>         Specifies the y-extent of the viewport (in device units).
 
  <size>      Specifies the x- and y-extents of the viewport (in device
              units).
 
  Remarks
 
  Sets the x- and y-extents of the viewport of the device context. The
  viewport, along with the device-context window, defines how GDI maps
  points in the logical coordinate system to points in the coordinate
  system of the actual device. In other words, they define how GDI
  converts logical coordinates into device coordinates.
 
  When the following mapping modes are set, calls to SetWindowExt and
  SetViewportExt are ignored:
 
  MM_HIENGLISH
  MM_HIMETRIC
  MM_LOENGLISH
  MM_LOMETRIC
  MM_TEXT
  MM_TWIPS
 
  When MM_ISOTROPIC mode is set, an application must call SetWindowExt
  before it calls SetViewportExt.
 
  Return Value
 
  The previous extents of the viewport as a CSize object. When an error
  occurs, the x- and y-coordinates are both set to 0.
 
  See Also
 
  CDC::SetWindowExt, ::SetViewportExt
 
 
                                     -♦-