Freigeben über


MagSetWindowTransform-Funktion (magnification.h)

Legt die Transformationsmatrix für ein Bildschirmlupensteuerelement fest.

Syntax

BOOL MagSetWindowTransform(
  [in]  HWND          hwnd,
  [out] PMAGTRANSFORM pTransform
);

Parameter

[in] hwnd

Typ: HWND

Das Vergrößerungsfenster.

[out] pTransform

Typ: PMAGTRANSFORM

Eine Transformationsmatrix.

Rückgabewert

Typ: BOOL

Gibt TRUE zurück, wenn der Vorgang erfolgreich war, oder andernfalls FALSE .

Hinweise

Die Transformationsmatrix gibt den Vergrößerungsfaktor an, den das Bildschirmlupensteuerelement auf den Inhalt des Quellrechtecks anwendet.

Beispiele

Im folgenden Beispiel wird gezeigt, wie der Vergrößerungsfaktor für ein Bildschirmlupensteuerelement festgelegt wird.

// 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);  
}

Anforderungen

Anforderung Wert
Unterstützte Mindestversion (Client) Windows Vista [nur Desktop-Apps]
Unterstützte Mindestversion (Server) Windows Server 2008 [nur Desktop-Apps]
Zielplattform Windows
Kopfzeile Vergrößerung.h
Bibliothek Vergrößerung.lib
DLL Magnification.dll

Weitere Informationen

MagGetWindowTransform