How to get coordinates of window client area

Viewed 19315

I can get the coordinates of a windows entire area, and the coordinates of the client area using the GetClientRect and GetWindowRect Win32 calls. My problem is that the GetClientRect always returns 0,0 for the top left. How do I figure out what the actual client region is relative to the window rect?

5 Answers

And if you are working with WinForms then you can use PointToScreen instead of ClientToScreen for solution proposed by Reed Copsey.

Related