Windows programming

From Wildsong
Revision as of 19:06, 14 June 2008 by Brian Wilson (talk | contribs) (New page: == Read the screen resolution in DPI == →‎Get the device context of the screen: tmpDC = GetDC(0); →‎Get the screen resolution.: iScre...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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;