放大倍率低于 125% 默认 win API(介于 101 - 124% 之间)



我正在研究Windows放大api,我一直在玩它,但我对放大默认值有问题,Windows只允许您在最低时增加25%。我是否可以一次增加 1-5%?也许随着鼠标滚动而增加百分之一?

Windows 最低 25% 默认值][1]

提前感谢您的帮助。

int xDlg = (int)((float)GetSystemMetrics(SM_CXSCREEN) * (1.0 - (1.0 / magnificationFactor)) / 2.0);
int yDlg = (int)((float)GetSystemMetrics(SM_CYSCREEN) * (1.0 - (1.0 / magnificationFactor)) / 2.0);
BOOL successSet = MagSetFullscreenTransform(magnificationFactor, xDlg, yDlg);
if (successSet)
{
BOOL fInputTransformEnabled;
RECT rcInputTransformSource;
RECT rcInputTransformDest;
if (MagGetInputTransform(&fInputTransformEnabled, &rcInputTransformSource, &rcInputTransformDest))
{
if (fInputTransformEnabled)
{
SetInputTransform(hwndDlg, fInputTransformEnabled);
}                
}
}

成功集 == 假; 当它不是 1.1 时,任何较低的东西都会失败,我意识到 1.1 = 125% 缩放。

放大 API 中没有这样的限制。 您在屏幕上看到的限制是由 UI 开发人员选择的。

MagSetFullscreenTransform和MagSetWindowTransform都接受float输入参数。就放大倍数分辨率而言,没有限制,只要它至少1.0f且不大于上限即可。

相关内容

最新更新