|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Nov 08, 2006 5:50 pm
[1.13] Windows forget their previous size on maximise. |
Easy one to reproduce. Make sure the window isn't maximised, make it any size you want that doesn't cover the whole screen. Maximise it and close it. Open the window again and try to Restore it - the "shrinking" animation will play as if the window is going to restore to its old size, but then it jumps so that the window covers the whole screen.
Works with child windows, like the package editor and library, as well as CMUD itself. |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Wed Nov 08, 2006 6:03 pm |
Actually in zmud i could never get it to remember that it was maximized in the 1st place.
Not sure if that's a bug that carried over into cmud and is a work in progress. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Nov 08, 2006 6:20 pm |
Actually, something like this is hard to do, but I'll add it to the wish list for the future. Windows is responsible for keeping track of the restored position of maximized windows and obviously it can't remember this across sessions. So I'll have to figure out where Windows is saving this original size and position and then save it to the INI file. But I'll only be able to do this for the main window, and maybe a couple others like the package editor. But I won't be able to do it for MUD windows since all of that is controlled by the docking system and the stored docking layout.
|
|
|
|
The Raven Magician
Joined: 13 Oct 2000 Posts: 463
|
Posted: Wed Nov 08, 2006 7:09 pm |
As far as i know, Windows is not responsible for storing window locations across sessions... the application is. In general, the application development environment does it.
Windows is responsible for remembering the restored window location, but only during the current session. Across sessions, your application must do its own remembering. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Nov 08, 2006 8:48 pm |
Raven, I know, that's what I meant. I know that Windows doesn't store window locations. I know it's CMUD responsibility to do this. What I was saying is that Windows keeps track of the restored location while CMUD is running, and I'd need to figure out where that is stored in order to save it to a file. It's not something that Delphi keeps track of automatically, so it requires digging through Windows API stuff.
|
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Wed Nov 08, 2006 9:12 pm |
GetWindowPlacement is what I typically see used. It gives you the corner coordinates as well as the state of the window.
|
|
|
|
The Raven Magician
Joined: 13 Oct 2000 Posts: 463
|
Posted: Wed Nov 08, 2006 9:59 pm |
Sorry, misunderstood.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Nov 08, 2006 11:09 pm |
Thanks Larkin, I'll take a look at that one.
|
|
|
|
|
|