| View previous topic :: View next topic |
| Author |
Message |
Feanix Guest
|
Posted: Fri May 23, 2008 1:16 am Post subject: Position of a minimized window |
|
|
Is there a way to get the coordinates for a minimized window without using winRestore to restore it?
When the window is minimized, the coordinates are reported as -32000, -32000 with WinGetPos, since that is where winXP actually puts minimized windows. I would like to get the coordinates that the window would have, if it was not minimized.
Additionally, is there a way to tell if a minimized window is also maximized? (i.e. if I unminimized it it with WinRestore, would it be maximized?)
I know about WinGet, but that does only report either maximized or minimized, not both.
If possible I would like to do the above without any visual change. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1337
|
Posted: Fri May 23, 2008 3:28 am Post subject: Re: Position of a minimized window |
|
|
What you are looking for is GetWindowPlacement API. I searched the forum and found a relevant post:
http://www.autohotkey.com/forum/topic27594.html&highlight=getwindowplacement
| Feanix wrote: | | Additionally, is there a way to tell if a minimized window is also maximized? (i.e. if I unminimized it it with WinRestore, would it be maximized?) |
The second parameter, flags, will tell you about it, WPF_RESTORETOMAXIMIZED (=2). |
|
| Back to top |
|
 |
ImprisonedPride
Joined: 30 Apr 2008 Posts: 28
|
Posted: Fri May 23, 2008 3:45 am Post subject: |
|
|
It's really quite convenient that this thread popped up because I have similar question about minimized GUI's. When I minimize a secondary GUI (by means of the minimize button), it shrinks to about the size of 1/2 the title bar in width and only the title bar's height. Is there a way to place this window when it's minimized though without doing automating a click of the title bar and using MouseDrag? _________________ Call me IP. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1337
|
Posted: Fri May 23, 2008 5:24 am Post subject: |
|
|
| ImprisonedPride wrote: | | Is there a way to place this window when it's minimized though without doing automating a click of the title bar and using MouseDrag? |
It's supposed to be done through SetWindowPlacement API by combining existing flags with WPF_SETMINPOSITION and by altering ptMinPosition (sub)struct, but it didn't work as I expected when I tried. |
|
| Back to top |
|
 |
Feanix Guest
|
Posted: Fri May 23, 2008 10:37 am Post subject: |
|
|
| Thanks Sean, that is exactly what I was looking for! |
|
| Back to top |
|
 |
|