🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #6283

Re: Creating windows with a specified client size

#6283
From: Barry Press
Date: Fri, 26 Oct 1990 18:11
19 lines
1393 bytes
In article <18647@haddock.ima.isc.com> andya@haddock.ima.isc.com (Andy Adler) writes:
>Is there a way to create a window by specifying the window's
>client area?  Is there a way to query windows about the
>size of the decorations it will add to a window?  I want to 
>be able to create a window and know what the client area will
>be before showing it.

What you need to do is to look at the functions AdjustWindowRect and 
AdjustWindowRectEx.  They do what you're looking for -- you start with
a rectangle that is what the client area should be, and they change it to
reflect the entire window based on the styles you will use.

As a side note, I've had some issues of AdjustWindowRect not including the 
space needed for scroll bars, but kludged around it rather than crawling
through a bunch of code via the debugger.


-- 
Barry Press                                 Internet: press@venice.sedd.trw.com
Technical Details
Message-ID: <883@venice.SEDD.TRW.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!trwind!venice!press
References: <18647@haddock.ima.isc.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!trwind!venice!press
From: press@venice.SEDD.TRW.COM (Barry Press)
Newsgroups: comp.windows.ms
Subject: Re: Creating windows with a specified client size
Message-ID: <883@venice.SEDD.TRW.COM>
Date: 26 Oct 90 18:11:21 GMT
References: <18647@haddock.ima.isc.com>
Reply-To: press@venice.sedd.trw.com (Barry Press)
Organization: TRW Systems Engineering & Development Division, Redondo Beach, CA
Lines: 19