I am looking into the windows magnification api and I have been playing around with it, but I have a problem with the magnification defaults, Windows only allows you to increment in 25%'s at the lowest. Is it possible for me to increase this perhaps 1-5% at a time? Perhaps increase by one percent with the mouse scroll in and out?
Windows Lowest 25% Default][1]
Thanks in advance for your assistance.
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);
}
}
}
successSet == false; when it isn't 1.1 anything lower fails and I realised 1.1 = 125% zoom.
Both MagSetFullscreenTransform and MagSetWindowTransform take
floatinput arguments. There are no restrictions as far as the magnification factor resolution goes, as long as it is at least1.0fand no larger than the upper bound.