title: Why BitBlt does not copy the correct part
body: <p>When I try to use the below code to copy the application icon to the client area's left top corner, I used code like below:</p>
  
  <pre><code>case WM_PAINT:
      hdcClient = BeginPaint (hwnd, &amp;ps) ;
      hdcWindow = GetWindowDC (hwnd) ;
  
      cxSource = GetSystemMetrics (SM_CXSIZEFRAME) + GetSystemMetrics (SM_CXSIZE) ;
      cySource = GetSystemMetrics (SM_CYSIZEFRAME) + GetSystemMetrics (SM_CYCAPTION) ;
  
      BitBlt (hdcClient, 0, 0, cxSource, cySource, hdcWindow, 0, 0, SRCCOPY) ;
  
      ReleaseDC (hwnd, hdcWindow) ;
      EndPaint (hwnd, &amp;ps) ;
      return 0 ;
      ......
  </code></pre>
  
  <p>However what I always get is like this:</p>
  
  <p><img src="https://i.stack.imgur.com/Fnb7i.png" alt="enter image description here"></p>
  
  <p>It seems what the hdcWindow get is the hdc of the window under it. I cannot figure out what is wrong with my BitBlt() call.</p>
  
  <ul>
  <li>I did it in Windows 7 box.</li>
  </ul>