Tech Support > Microsoft Windows > Development Resources > client area offset?
client area offset?
Posted by Jason S on May 16th, 2007


Stupid question:

how can I find the client area offset of a window, i.e. the offset
between the top left corner of the window's client area relative to
the top left corner of its window (nonclient) area? GetClientRect
seems to always return 0,0 for upper left corner.

I'm trying to position a dialog box in the right place relative to a
tab control.

Posted by Kellie Fitton on May 16th, 2007


On May 16, 6:19 am, Jason S <jmsa...@gmail.com> wrote:

Hi,

You can tinker with the following APIs to get the right offset:

ScreenToClient()

ClientToScreen()

MapWindowPoints()

http://msdn2.microsoft.com/en-us/library/ms533179.aspx

http://msdn2.microsoft.com/en-us/library/ms532670.aspx

http://msdn2.microsoft.com/en-us/library/ms533189.aspx

Kellie.



Posted by Jason S on May 16th, 2007


On May 16, 10:59 am, Kellie Fitton <KELLIEFIT...@YAHOO.COM> wrote:
Thanks. I was familiar with the first 2 but not the 3rd...

Aha, I think I found what I was looking for, TabCtrl_AdjustRect looks
like the right thing.
http://msdn.microsoft.com/library/de...ls/tab/tab.asp


Posted by Jason S on May 16th, 2007


On May 16, 10:59 am, Kellie Fitton <KELLIEFIT...@YAHOO.COM> wrote:
thanks, I knew about the first 2 but not the third.

Aha, TabCtrl_AdjustRect looks like it does what I want.
http://msdn.microsoft.com/library/de...ls/tab/tab.asp



Similar Posts