By Windows PC displays, I am not referring to Windows CE, or handhelds, etc.
Clarification
Some folks below mistakenly thought I was asking what the DPI (dots per inch) was on monitors. What I’m asking for is the value for LogPixelsX in the GetCaps API call :
LOGPIXELSX Number of pixels per logical inch along the screen width.
In the examples I’ve seen, it’s set to 88, regardless of the screen DPI. Seems to be a Magic Number sort of constant.
In a related Question I’m using GetDeviceCaps to calculate current Screen Font DPI. The code samples I found all have:
Const LOGPIXELSX = 88
Is this universally the same for all monitors (even widescreen vs regular monitors)? And if not, how do I find it for the current display. (MSDN indicates that it’s the same for all monitors on a particular computer.
In a system with multiple display monitors, this value is the same for all monitors.
To answer your clarification of the question:
LOGPIXELSX is the parameter you pass to GetDeviceCaps to get the current monitor resolution (technically the horizontal resolution, but all modern displays have equal horizontal and vertical resolution). Yes, it is always 88 – if you wanted to get a different value from GetDeviceCaps, you’d pass in a different value. For example, to get the number of bits per pixel, you’d pass the BITSPIXEL constant which is 12. These magic constants are defined in the Windows API file WINGDI.h.
The note in MSDN is referring not to the parameter, but the returned value.