I am working on C++ application to manage wallpapers accross multiple monitors on Windows, like what UltraMon and DisplayFusion do but with more options.
Everthing is working well but monitors placement.
My desktop has three monitors arranged like that (ignore N°4)
But when I look at the wallpaper file generated by UltraMon, the thrid monitor (the small one) does not have the same position :
By using EnumDisplayMonitors and GetMonitorInfo functions I get these data :
0: 1920x1080 at 1920x0
1: 1920x1080 at 0x0 primary
2: 800x480 at -800x-480
Which corresponds to my arrangement, but differs from the wallpaper file.
How to know where is placed the image in the global wallpaper file to have it displayed on the right monitor ? I guess the author of UltraMon found the right way 'cause it works perfectly.
(I asked this question on UltraMon forum too).
Thanks to the article quoted by Raymon Chen I figured it out. http://blogs.msdn.com/b/oldnewthing/archive/2007/09/24/5083738.aspx
Two things to know :
Knowing that, any monitor which is on left or top of the primary monitor is on another tile of the wallpaper.
Let's see it in image :
in green we have the actual desktop, which uses four tiles of the wallpaper image (in red).
Now it's time to code that !