I'm trying to create a magnifier app in .net using the Windows Magnification API. I've pretty much got everything working except for actually setting the magnification level (which defaults to 100%). The problem is, I can't find any examples anywhere on the net and all the documentation for the API is C++ code. This is the particular function I'm having trouble with.
bool SetMagFactor(float magfactor)
{
MAGTRANSFORM matrix;
memset(&matrix, 0, sizeof(matrix));
matrix.v[0][0] = magfactor;
matrix.v[1][1] = magfactor;
matrix.v[2][2] = 1.0f;
return MagSetWindowTransform(hwndMag, &matrix);
}
The MAGTRANSFORM structure is defined as follows:
typedef struct tagMAGTRANSFORM {
float v[3] [3];
} MAGTRANSFORM, *PMAGTRANSFORM;
The most confusing part of this is the memset - I'm not sure what it does or what its equivalent is in .NET, but what's also confusing is the multi-demensional array/matrix and how I would handle this in .NET also.
Any help would be greatly appreciated.