ScaleWindowExtEx function (wingdi.h)

The ScaleWindowExtEx function modifies the window for a device context using the ratios formed by the specified multiplicands and divisors.

Syntax

BOOL ScaleWindowExtEx(
  [in]  HDC    hdc,
  [in]  int    xn,
  [in]  int    xd,
  [in]  int    yn,
  [in]  int    yd,
  [out] LPSIZE lpsz
);

Parameters

[in] hdc

A handle to the device context.

[in] xn

The amount by which to multiply the current horizontal extent.

[in] xd

The amount by which to divide the current horizontal extent.

[in] yn

The amount by which to multiply the current vertical extent.

[in] yd

The amount by which to divide the current vertical extent.

[out] lpsz

A pointer to a SIZE structure that receives the previous window extents, in logical units. If lpSize is NULL, this parameter is not used.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

The window extents are modified as follows:


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

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See also

Coordinate Space and Transformation Functions

Coordinate Spaces and Transformations Overview

GetWindowExtEx

SIZE