Windows Dev Center

MagSetWindowTransform function

Sets the transformation matrix for a magnifier control.

Syntax


BOOL WINAPI MagSetWindowTransform(
  _In_  HWND          hwnd,
  _Out_ PMAGTRANSFORM pTransform
);

Parameters

hwnd [in]

Type: HWND

The magnification window.

pTransform [out]

Type: PMAGTRANSFORM

A transformation matrix.

Return value

Type: BOOL

Returns TRUE if successful, or FALSE otherwise.

Remarks

The transformation matrix specifies the magnification factor that the magnifier control applies to the contents of the source rectangle.

Examples

The following example shows how to set the magnification factor for a magnifier control.


// Description:
//   Sets the magnification factor for a magnifier control.
// Parameters:
//   hwndMag - Handle of the magnifier control.
//   magFactor - New magnification factor.
//
BOOL SetMagnificationFactor(HWND hwndMag, float magFactor)
{
    MAGTRANSFORM matrix;
    memset(&matrix, 0, sizeof(matrix));
    matrix.v[0][0] = magFactor;
    matrix.v[1][1] = magFactor;
    matrix.v[2][2] = 1.0f;

    return MagSetWindowTransform(hwndMag, &matrix);  
}


Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Magnification.h

Library

Magnification.lib

DLL

Magnification.dll

See also

MagGetWindowTransform

 

 

Community Additions

ADD
Show:
© 2015 Microsoft