Re: getClientRect

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message -----
From: "Al Getz" <Xaxo at aol.com>
To: "EUforum" <EUforum at topica.com>
Subject: RE: getClientRect


>
>
> Hello Derek, CK, and aku,
>
>
> GetClientRect
>
> is named
>
> "GetClientRect"
>
> because it's made to
> "Get"
> the
> "Client"
> "Rect"
>
> This means what it is to retrieve is very specific:
> the "Client Rect".
>
> The "Rect" is a predefined structure in Windows,
> which is made up of four consecutive values of
> type LONG which can be any values.
>
> The "Client Rect" however is a little different.
> It's still made up of three type LONG's, but the
> first two are always zero.
>
> The usual reason you want to get this RECT
> is so that you can pass it to another function
> which takes the type RECT, such as FillRect().
>
> What's particularly interesting about this
> structure after a function call to
> "GetClientRect" though is that
> the first two LONG's are always zero
> because the Rect is referrenced to the
> upper left corner, which is (0,0).
> This means after the function returns,
> the RECT structure contains:
> [
> 0
> 0
> ClientsWidth
> ClientsHeight
> ]
>
> which in a Euphoria sequence might look like this:
>
> atom ClientsWidth,ClientsHeight
> sequence Rect
> constant zero=0
> ClientsWidth=600
> ClientsHeight=400
> Rect={zero,zero,ClientsWidth,ClientsHeight}
>
> Notice the Rect already contains the Clients Width and Height.
> If the library function call simply peeks the values
> the returned sequence should contain the width and height
> without doing a subtraction.
>

Thanks for the backgrounder. However win32lib does a slight modification of
this, namely that any toolbar and any statusbar are excluded from the
'client'' area. Thus it is possible for Win32lib's getClientRect to return
non-zero values for the second element of the 'rect' data. And in some
future version of the library, when it supports vertical toolbars, the first
element might also be non-zero.

----------------
cheers,
Derek Parnell

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu