Interesting theory, however, both X & Y are adjusted at runtime by SetMyDialgPos(...) exclusively. If they weren't the dialogs would all be getting pinned to the top of the screen as they are all initially initialized at position 0,0. I suspect that width always being greated than height, and wide-screen monitors componding that, it's simply taking a larger sampling to skew the numbers far enough to notice/annoy...Either that or both are equally wrong, but the Taskbar is defending its Screen-estate by forcing the dialogs upward. Might be interesting to see what a wide monitor does when run portrait at high DPI.
I did have time to run a few tests yesterday and believe I have found part of the solution. If I feed the DPI into the MulDiv(...) function the dialog will appear it the correct location. The issue being that I'm hard-coding the DPI just for the test because for some reason Pure C does not like the GetDpiX() & GetDpiY() functions. But as soon as I get that figured out, I believe the correct answer will look something like this:
Note: The statement in the code commenting "Down is a Fixed Position" is merely in reference to the Taskbar dimensions being irrelevant to the height calculation if the Taskbar was on the (left or right) side of the screen.
I did have time to run a few tests yesterday and believe I have found part of the solution. If I feed the DPI into the MulDiv(...) function the dialog will appear it the correct location. The issue being that I'm hard-coding the DPI just for the test because for some reason Pure C does not like the GetDpiX() & GetDpiY() functions. But as soon as I get that figured out, I believe the correct answer will look something like this:
Code: (cpp)
// Native Coordinates * Logical Pixels / DPI
hdc = GetDC(NULL);
wscreen = MulDiv(iW, GetDeviceCaps(hdc, LOGPIXELSY), GetDpiX());
hscreen = MulDiv(iH, GetDeviceCaps(hdc, LOGPIXELSY), GetDpiY());
ReleaseDC(NULL, hdc);Note: The statement in the code commenting "Down is a Fixed Position" is merely in reference to the Taskbar dimensions being irrelevant to the height calculation if the Taskbar was on the (left or right) side of the screen.










