Re: Window Attribs

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

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu