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


Hi Chris,

On Fri, May 15, 2009 at 4:10 AM, Chris January wrote:
> 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.

Thanks for that tip - I've taken a look at Get/SetWindowPlacement and
it will definitely make the code more concise.  In terms of the rest
of the code layout, I'll just keep the geometry-related information as
part of PropSheet to eliminate the PropSheetGeometry class.  My
inclination is to leave the WinGeometrySetting class in its own file,
though it could certainly go into propsheet.h/cc since it really only
applies to the PropSheet.  If any of that sounds like a bad idea, let
me know.

Thanks,

Jonathon


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