ScaleWindowExtEx

3.1

  BOOL ScaleWindowExtEx(hdc, nXnum, nXdenom, nYnum, nYdenom, lpSize)    
  HDC hdc; /* handle of device context */
  int nXnum; /* amount by which current x-extent is multiplied */
  int nXdenom; /* amount by which current x-extent is divided */
  int nYnum; /* amount by which current y-extent is multiplied */
  int nYdenom; /* amount by which current y-extent is divided */
  SIZE FAR* lpSize; /* address of SIZE structure */

The ScaleWindowExtEx function modifies the window extents relative to the current values. The formulas are written as follows:

xNewWE = (xOldWE * Xnum) / Xdenom
yNewWE = (yOldWE * Ynum) / Ydenom

The new extent is calculated by multiplying the current extents by the given numerator and then dividing by the given denominator.

Parameters

hdc

Identifies the device context.

nXnum

Specifies the amount by which to multiply the current x-extent.

nXdenom

Specifies the amount by which to divide the current x-extent.

nYnum

Specifies the amount by which to multiply the current y-extent.

nYdenom

Specifies the amount by which to divide the current y-extent.

lpSize

Points to a SIZE structure. The previous window extents, in logical units, are placed in this structure. If lpSize is NULL, nothing is returned.

Return Value

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