SetWindowExtEx

3.1

  BOOL SetWindowExtEx(hdc, nX, nY, lpSize)    
  HDC hdc; /* handle of device context */
  int nX; /* x-extent of window, */  
  int nY; /* y-extent of window, */  
  SIZE FAR* lpSize; /* address of struct. with prev. extents */

The SetWindowExtEx function sets the x- and y-extents of the window associated with the specified device context. The window, along with the viewport, defines how points are mapped from logical coordinates to device coordinates.

Parameters

hdc

Identifies the device context.

nX

Specifies the x-extent, in logical units, of the window.

nY

Specifies the y-extent, in logical units, of the window.

lpSize

Points to a SIZE structure. The previous extents of the window (in logical units) are placed in this structure. If lpSize is NULL nothing is returned. The SIZE structure has the following form:

typedef struct tagSIZE {
    int cx;
    int cy;
} SIZE;

For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.

Return Value

The return value is nonzero if the function is successful. Otherwise, it is zero.

Comments

When the following mapping modes are set, calls to the SetWindowExtEx and SetViewportExt functions are ignored:

MM_HIENGLISH
MM_HIMETRIC
MM_LOENGLISH

MM_LOMETRIC
MM_TEXT
MM_TWIPS

When MM_ISOTROPIC mode is set, an application must call the SetWindowExtEx function before calling SetViewportExt.

See Also

SetViewportExtEx