feature request: multi monitor window position remember

Started by Snu, January 22, 2006, 01:16:17

Previous topic - Next topic


ok, i really dont know why, nor do i know how difficult it is to implement, but for some reason with a multi monitor setup, some programs remember which monitor they were on, and some dont.  mpt doesnt, which means every time i open it i have to move it to my other monitor (since it opens on the default one).  
yah, not a very big deal i know, but just wondering if its something simple to implement? and well, cant hurt to ask...


Quote from: "Snu"just wondering if its something simple to implement?
I have absolutely no idea. :D
It's a bit strange, since MPT does remember its window size and position on my system, and I always thought which monitor a window appeared on was just dependent on the window position (since you can drag from one monitor to the other - at least on the few multi-monitor systems I have used). Any education would be appreciated.


In my programs I use this... and it works perfectly. I assume ModPlug uses the same functions.

     wpl.length = sizeof(WINDOWPLACEMENT);


However testing this multimonitor functionallity I found a workaround for ModPlug running on another monitor.

Move ModPlug (as a normal window) to the monitor you want it to run at. Close the window (don't maximize it). Then reload modplug (it should now open on the monitor you want), maximize it and the close it! Now modplug will load maximized on the monitor you want :)
Also be carefull to not use SetWindowPos() on the coordinates returned by GetWindowPlacement() use SetwindowPlacement() instead!

I assume that his is because ModPlug don't move the window before calling ShowWindow(); so that it will be maximized at the default display.

Also please note that many programmers seem to forget that sometimes wierd people (like me) would like to have their second monitor to the left instead of right (= negative offsets) There's many programs who will work correctly if the 2nd monitor is to the right but fail if it's on the left side.

edit: fixed some typo's


haha, how strange...
well, its on my second monitor now, thanks for the help waxhead!
i also have my second monitor on the left by the way, havnt had any troubles other than some programs not remembering which monitor they were on.  well, sometimes monitor one gets completely garbled if the rez/color depth is changed... have yet to find the cause for that (might be the nvidia drivers).