On Feb 20, 2007, at 3:20 PM, Ryan Dary wrote: > I have some old code that attempts to save and restore window > locations > on Windows and Mac. When my program opens, and I create a new > document > window, I attempt to restore the last used position. Sometimes > this is > creating a problem. > > When the window is minimized or maximized upon quitting, I believe the > values are something like -32000 or +32000 instead of that actual > window > size. > > Now when I use these values to restore the window, the window is > minimized to the task bar and it can't be brought out of the task > bar again. > > Can anyone tell me, or tell me where to find out, what the right > way to > save and restore window location/size on Windows? > Do what Visual Studio 6 does - un-minimize the window and grab the current left and top and then close it on your way out.
It happens so quickly when I'm working in SDI mode that I've not given the effect thought until you asked that question. I doubt that MS does it to get size info before quitting, however (more than likely to check the save state of the window's content and prompt me before I throw an hour's worth of coding). Tim -- Tim Jones [EMAIL PROTECTED] _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
