Here is my code I got this from: https://learn.microsoft.com/en-us/windows/win32/winauto/magapi/magapi-intro
#include <iostream>
#include<magnification.h>
BOOL SetZoom(float magnificationFactor)
{
// A magnification factor less than 1.0 is not valid.
if (magnificationFactor < 1.0)
{
return FALSE;
}
// Calculate offsets such that the center of the magnified screen content
// is at the center of the screen. The offsets are relative to the
// unmagnified screen content.
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);
return MagSetFullscreenTransform(magnificationFactor, xDlg, yDlg);
}
int main()
{
}
When I try to run this, I get a linking error:
LNK2019 unresolved external symbol MagSetFullscreenTransform referenced in function "int __cdecl SetZoom(float)" (?SetZoom@@YAHM@Z) coolymagnify C:\Users\antso_jrb0i02\Documents\programming\coolymagnify\coolymagnify\coolymagnify.obj 1
I tried finding a solution, but I couldn't find anything on it.