MagGetFullscreenTransform 函数 (magnification.h)

检索全屏放大镜的放大设置。

语法

BOOL MagGetFullscreenTransform(
  [out] float *pMagLevel,
  [out] int   *pxOffset,
  [out] int   *pyOffset
);

parameters

[out] pMagLevel

类型: float*

全屏放大镜的当前放大倍数。 值为 1.0 表示屏幕内容未放大。 高于 1.0 的值指示放大比例系数。 小于 1.0 的值无效。

[out] pxOffset

类型: int*

未放大视图左上角的 x 坐标偏移量。 偏移量相对于主监视器的左上角,以未放大的坐标表示。

[out] pyOffset

类型: int*

未放大视图左上角的 y 坐标偏移量。 偏移量相对于主监视器的左上角,以未放大的坐标表示。

返回值

类型: BOOL

如果成功,则返回 TRUE,否则返回 FALSE。

注解

偏移量不受当前每英寸点数 (dpi) 设置的影响。

示例

以下代码片段检索全屏放大镜的放大值和偏移量。

    // Get the current magnification level and offset.
    float  magLevel;
    int    xOffset, yOffset;

    if (!MagGetFullscreenTransform(&magLevel, &xOffset, &yOffset))
    {
        return E_FAIL;
    }
    
    // 
    // Do something with the magnification settings.
    //    

要求

   
最低受支持的客户端 Windows 8 [仅限桌面应用]
最低受支持的服务器 Windows Server 2012 [仅限桌面应用]
目标平台 Windows
标头 magnification.h
Library Magnification.lib
DLL Magnification.dll

另请参阅

MagSetFullscreenTransform