1. Window Attribs
------=_NextPart_000_001F_01BED127.63167B20
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I am working on a way to let the library know when the mouse is out of =
the client area of a window for my tool bar library. What would I need =
to know to add on to the upper-left x and y, and take off the =
lower-right x and y? So far I have things like the border, thick frame, =
menu, caption. If you can think of anything else, please let me know.
Thanks all,
Mike Hurley
------=_NextPart_000_001F_01BED127.63167B20
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.71.1712.3"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>I am working on a way to let the =
library know=20
when the mouse is out of the client area of a window for my tool bar=20
library. What would I need to know to add on to the upper-left x =
and y,=20
and take off the lower-right x and y? So far I have things like =
the=20
border, thick frame, menu, caption. If you can think of anything =
else,=20
please let me know.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>Thanks all,</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>Mike =
------=_NextPart_000_001F_01BED127.63167B20--
________________________________________________________
NetZero - We believe in a FREE Internet. Shouldn't you?
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html
2. Re: Window Attribs
Mike
>> I am working on a way to let the library know when the mouse is out of
>> the client area of a window for my tool bar library. What would I need
>> to know to add on to the upper-left x and y, and take off the lower-
>> right x and y? So far I have things like the border, thick frame, menu,
>>caption. If you can think of anything else, please let me know.
This function in win32lib returns the client area
xGetClientRect = linkFunc(user32, "GetClientRect",
{C_POINTER, C_POINTER}, C_INT)
YOU have to allocate a structure of 4 long integers
myrect = allocate( 16 ) -- four long integers
The TOP LEFT CORNER IS ALWAYS 0,0
myrect structure looks like this and will be filled in by this function
left -- this will always be zero 4 bytes
top -- this will always be zero 4 bytes
right -- peek here for right side 4 bytes
bottom -- peek here for bottom side 4 bytes
boolreturntype = xGetClientRect( windowhandle, myrect )
Bernie
3. Re: Window Attribs
-----Original Message-----
From: Bernie Ryan <bwryan at PCOM.NET>
To: EUPHORIA at LISTSERV.MUOHIO.EDU <EUPHORIA at LISTSERV.MUOHIO.EDU>
Date: Sunday, July 18, 1999 3:38 PM
Subject: Re: Window Attribs
>Mike
>
>>> I am working on a way to let the library know when the mouse is out of
>>> the client area of a window for my tool bar library. What would I need
>>> to know to add on to the upper-left x and y, and take off the lower-
>>> right x and y? So far I have things like the border, thick frame, menu,
>>>caption. If you can think of anything else, please let me know.
>
>This function in win32lib returns the client area
>
>xGetClientRect = linkFunc(user32, "GetClientRect",
> {C_POINTER, C_POINTER}, C_INT)
>
>YOU have to allocate a structure of 4 long integers
>myrect = allocate( 16 ) -- four long integers
>
>The TOP LEFT CORNER IS ALWAYS 0,0
>
>myrect structure looks like this and will be filled in by this function
>left -- this will always be zero 4 bytes
>top -- this will always be zero 4 bytes
>right -- peek here for right side 4 bytes
>bottom -- peek here for bottom side 4 bytes
>
>boolreturntype = xGetClientRect( windowhandle, myrect )
>
>Bernie
>
Problem...I've tried that, and you get your {0,0}{100,50} (or whatever) and
then I do a ClientToScreen and get incorrect numbers. So if you know any
other things I should addon or takeoff, please let me know.
Mike
________________________________________________________
NetZero - We believe in a FREE Internet. Shouldn't you?
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html
4. Re: Window Attribs
>>Problem...I've tried that, and you get your {0,0}{100,50} (or whatever)
>>and then I do a ClientToScreen and get incorrect numbers. So if you know
>>any other things I should addon or takeoff, please let me know.
Mike:
ARE you sure you are using xClientToScreen correctly
pointlocation = allocate( 8 ) -- 2 long integers
structure used by ClientToScreen looks like this
X -- - 4 bytes
Y -- - 4 bytes
First you poke the x and y of your client point into the pointlocation
structure.
Then call
retbooltype = xClientToScreen ( windowhandle, pointlocation )
Then peek at the x and y that xClientToScreen puts in the structure
Don't forget they are machine language integers 4 bytes long and have to
be converted to Euphoria.
Bernie
5. Re: Window Attribs
- Posted by Mike Hurley <mikehurley2 at NETZERO.NET>
Jul 18, 1999
-
Last edited Jul 19, 1999
We wrote earlier:
-----Original Message-----
From: Bernie Ryan <bwryan at PCOM.NET>
To: EUPHORIA at LISTSERV.MUOHIO.EDU <EUPHORIA at LISTSERV.MUOHIO.EDU>
Date: Sunday, July 18, 1999 5:02 PM
Subject: Re: Window Attribs
>>>Problem...I've tried that, and you get your {0,0}{100,50} (or whatever)
>>>and then I do a ClientToScreen and get incorrect numbers. So if you know
>>>any other things I should addon or takeoff, please let me know.
>
>Mike:
> ARE you sure you are using xClientToScreen correctly
>
>pointlocation = allocate( 8 ) -- 2 long integers
>
>structure used by ClientToScreen looks like this
> X -- - 4 bytes
> Y -- - 4 bytes
>
>First you poke the x and y of your client point into the pointlocation
>structure.
>
>Then call
>retbooltype = xClientToScreen ( windowhandle, pointlocation )
>
>Then peek at the x and y that xClientToScreen puts in the structure
>Don't forget they are machine language integers 4 bytes long and have to
>be converted to Euphoria.
>
>Bernie
>
I'm writing now:
Bernie, I putzed around with ClientToScreen some more and got it to work. I
must've messed up with what I was poke4ing and peek4sing.
Thanks for your help,
Mike Hurley
________________________________________________________
NetZero - We believe in a FREE Internet. Shouldn't you?
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html