CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    30

    ClientRect Origin co-ordinates WRT WindowRect Coordinates

    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


  2. #2
    Guest

    Re: ClientRect Origin co-ordinates WRT WindowRect Coordinates

    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




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured