Sign in to follow this  

Win32 Display Information

This topic is 3678 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In Windows, I'm writing an interface to a touchscreen monitor, and I'm looking for someway to map touchscreen sensor positions to window positions without calibrating, if possible. I was wondering how I might go about getting display information from Windows. There will probably be three active monitors, and I will be interested in 2 of them (the touchscreen has 2 monitors under one touch area). I need to determine which displays are the ones I'm interested in, get information about those displays, and determine which portions of the "desktop" are belonging to those displays of interests. Any ideas? The information is clearly there, because the desktop settings dialog uses it. I just don't know how to get to it. Thanks!

Share this post


Link to post
Share on other sites
Okay, once I have used EnumDisplayDevices to get a list of displays, how do I use that information to determine the portion of the "virtual screen" that is provided by a particular display?

And, also, how do I get the usable device name for a monitor? In the NV Control panel it lists one monitor as "WDT EZBlend", but the DISPLAY_DEVICE structure doesn't contain that string anywhere. Where does that come from?

Share this post


Link to post
Share on other sites
You can get the virtual desktop coordinates via GetSystemMetrics and SM_X/YVIRTUALSCREEN and SM_CX/YVIRTUALSCREEN.

You probably want to use EnumDisplayMonitors/GetMonitorInfo to enumerate. The MONITORINFOEX structure has the area of the virtual desktop occupied by the monitor as well as a string for it. Although I have no idea if that string matches the one you're looking for.

Share this post


Link to post
Share on other sites

This topic is 3678 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this