Re: Win32 Mouse

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

Mike Hurley wrote:

> How do you get the x and y position of the
> upper-left corner of the inside box of a window?

Assuming:

   client area start = bottom of window - ( border + client size )

You already know how to get the size of the window. Use GetClientRect to get
the size of the client area (the part you can draw on). GetSystemMetrics
will give you the metrics for various parts of the window; use SM_CXFRAME
and SM_CYFRAME to get the border sizes. From that, you can derive the
location of the client area.

You could do it the other way, but then you'd have to add extra to account
for the menu.

I was just mulling this over the other night; I'm quite likely to Llama so
that the size specifies the client area, not the window size. This can be
calculated with the AdjustWindowRect procedure.

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu