Hello Jonathon,


On Wed, 13 May 2009 21:59:38 -0400, Jonathon Merz <[email protected]>

wrote:

> Hello,

> 

> Per Dave Korn's suggestion in:

>    http://cygwin.com/ml/cygwin/2009-05/msg00208.html



>    - If setup.exe exits while in a maximized state, it will be

> maximized on next startup, and recall it's last non-maximized size and

> position for restoration to normal state.



You really ought to be using Get/SetWindowPlacement rather than

GetWindowPos, IsZoomed etc.



GetWindowPlacement works in workspace coordinates, whereas GetWindowPos

works with screen coordinates so your code won't work properly if the user

moves the taskbar or changes the monitor layout. Also GetWindowPlacement

will get the 'restored' geometry of the window even when its maximised

saving you a lot of code.



Cheers,

Chris

Reply via email to