Click to See Complete Forum and Search --> : ClientRect Origin co-ordinates WRT WindowRect Coordinates


Santhosh Cheeran
June 4th, 1999, 09:21 AM
Hello,
How can I find the coordinates of the ClientRect for a window relative to its WindowRect. Is there any methods which is real simple to call at Run time, than storing these values at create.
Santhosh

June 4th, 1999, 07:31 PM
Call CWnd::ClientToScreen() passing the client rect. This will give you the ClientRect co-ordinates relative to the screen top left (the WindowRect is also relative to screen top left). Then subtract the WindowRect from the ClientRect to give the relative offset of the ClientRect.

Dave Lorde