This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Preliminary Patch] setup.exe size/position restore on startup


Hello Jonathon,

On Wed, 13 May 2009 21:59:38 -0400, Jonathon Merz <jonathon.merz@gmail.com>
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]