MagSetFullscreenColorEffect 関数 (拡大.h)

全画面表示拡大鏡に関連付けられている色変換マトリックスを変更します。

構文

BOOL MagSetFullscreenColorEffect(
  [in] PMAGCOLOREFFECT pEffect
);

パラメーター

[in] pEffect

種類: PMAGCOLOREFFECT

新しい色変換マトリックス。 このパラメーターを NULL にすることはできません。

戻り値

種類: BOOL

成功した場合は TRUE、それ以外の場合は FALSE を返します。

解説

全画面表示拡大鏡では、色変換マトリックスを使用して、デスクトップ全体に色効果を適用します。 関数が複数回呼び出される場合は、最新のカラー変換が使用されます。

次の例では、 MagSetFullscreenColorEffect で使用する 2 つの色変換行列を定義します。 マトリックスは g_MagEffectGrayscale 画面の色をグレースケールに変換します。 マトリックスは g_MagEffectIdentity 、元の画面の色を復元する ID マトリックスです。

// Initialize color transformation matrices used to apply grayscale and to 
// restore the original screen color.
MAGCOLOREFFECT g_MagEffectGrayscale = {0.3f,  0.3f,  0.3f,  0.0f,  0.0f,
                                       0.6f,  0.6f,  0.6f,  0.0f,  0.0f,
                                       0.1f,  0.1f,  0.1f,  0.0f,  0.0f,
                                       0.0f,  0.0f,  0.0f,  1.0f,  0.0f,
                                       0.0f,  0.0f,  0.0f,  0.0f,  1.0f};

MAGCOLOREFFECT g_MagEffectIdentity = {1.0f,  0.0f,  0.0f,  0.0f,  0.0f,
                                      0.0f,  1.0f,  0.0f,  0.0f,  0.0f,
                                      0.0f,  0.0f,  1.0f,  0.0f,  0.0f,
                                      0.0f,  0.0f,  0.0f,  1.0f,  0.0f,
                                      0.0f,  0.0f,  0.0f,  0.0f,  1.0f};

BOOL SetColorGrayscale(__in BOOL fGrayscaleOn)
{
    // Apply the color matrix required to either apply grayscale to the screen 
    // colors or to show the regular colors.
    PMAGCOLOREFFECT pEffect = 
                (fGrayscaleOn ? &g_MagEffectGrayscale : &g_MagEffectIdentity);

    return MagSetFullscreenColorEffect(pEffect);
}

要件

   
サポートされている最小のクライアント Windows 8 [デスクトップ アプリのみ]
サポートされている最小のサーバー Windows Server 2012 [デスクトップ アプリのみ]
対象プラットフォーム Windows
ヘッダー magnification.h
Library Magnification.lib
[DLL] Magnification.dll

関連項目

MagGetFullscreenColorEffect