This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [Preliminary Patch] setup.exe size/position restore on startup
On Fri, May 15, 2009 at 09:24:56AM -0400, Jonathon Merz wrote:
>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.
That sounds ok but please disregard the README instructions about
creating a new header file for every class. You can add the class
wherever it seems appropriate.
cgf