MagGetColorEffect function (magnification.h)

Gets the color transformation matrix for a magnifier control.

Syntax

BOOL MagGetColorEffect(
  [in]  HWND            hwnd,
  [out] PMAGCOLOREFFECT pEffect
);

Parameters

[in] hwnd

Type: HWND

The magnification window.

[out] pEffect

Type: PMAGCOLOREFFECT

The color transformation matrix, or NULL if no color effect has been set.

Return value

Type: BOOL

Returns TRUE if successful, or FALSE otherwise.

Remarks

The magnifier control uses the color transformation matrix to apply a color effect to the entire magnifier window.

This function requires Windows Display Driver Model (WDDM)-capable video cards.

Examples

The following example retrieves the color transformation matrix.

// Description:
//   Retrieves the color transformation matrix from a magnifier control.
// Parameters:
//   hwndMag - handle of the magnifier control.
//
BOOL GetMagnifierColorTransform(HWND hwndMag)
{
    MAGCOLOREFFECT effect;

    BOOL ret = MagGetColorEffect(hwndMag, &effect);

    //
    // Do something with the color data.
    //

    return ret;
}

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header magnification.h
Library Magnification.lib
DLL Magnification.dll

See also

MagSetColorEffect