title: Client rectangle coordinates on screen
body: <p>How can I get coordinates of a window's client area relative to screen?</p>
  
  <p>I thought about using <code>GetClientRect</code> and <code>ClientToScreen</code>. Also, in a browser window what is <code>ClientRect</code>? Only rectangle with <code>HTML</code> document shown in it, or it includes browser bars and pop-up menus, that can possibly shrink dimension for <code>HTML</code> doc?</p>
  
  <p>I've tried this:</p>
  
  <pre><code>HWND hWnd;
  RECT rc;
  if (GetClientRect(hWnd, &amp;rc)) // get client coords 
  {
      MapWindowPoints(hWnd, NULL, reinterpret_cast&lt;POINT*&gt;(&amp;rc), 2); // converts rect rc points
      return rc.top;
  }
  </code></pre>
  
  <p>But the sad thing is that browser's client rectangle includes all those pop-up browser menus and bars, therefore can't be used to detect accurate coordinates of browsers HTML document space. If anyone got suggestions how it can be done, will try it gladly.</p>