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.
Position of a minimized window
Started by
Feanix
, May 23 2008 12:16 AM
4 replies to this topic
#1
-
Posted 23 May 2008 - 12:16 AM
What you are looking for is GetWindowPlacement API. I searched the forum and found a relevant post:
<!-- m -->http://www.autohotke... ... wplacement<!-- m -->
<!-- m -->http://www.autohotke... ... wplacement<!-- m -->
The second parameter, flags, will tell you about it, WPF_RESTORETOMAXIMIZED (=2).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?)
#2
-
Posted 23 May 2008 - 02:28 AM
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?
#3
-
Posted 23 May 2008 - 02:45 AM
Call me IP.
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.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?
#4
-
Posted 23 May 2008 - 04:24 AM