Windows programming
From Wildsong
Jump to navigationJump to search
Read the screen resolution in DPI
/* Get the device context of the screen */ tmpDC = GetDC(0); /* Get the screen resolution. */ iScreenResolution = GetDeviceCaps((int)tmpDC, 88); //88 is the win32 const for Logical pixels/inch in X) /* release the DC. */ ReleaseDC(0, (int)tmpDC); docExport.Resolution = iOutputResolution;