title: CreateCompatibleBitmap() returns black HBITMAP
body: <p>Hello Stack Overflow users. It seems that I am not using CreateCompatibleBitmap() properly in the following code:</p>
  
  <pre><code>#include &lt;windows.h&gt;
  using namespace std;
  int main() {HDC hdc=GetDC(HWND_DESKTOP); HDC MemDC=CreateCompatibleDC(hdc);
      HBITMAP hBit=CreateCompatibleBitmap(hdc,1366,768);
      SelectObject(MemDC,hBit);
      BitBlt(hdc,0,0,1366,768,MemDC,0,0,SRCCOPY); //Screen turns black
      DeleteObject(hBit);
      ReleaseDC(HWND_DESKTOP,hdc);
      ReleaseDC(NULL,MemDC);
      DeleteDC(MemDC);
      DeleteDC(hdc);
  }
  </code></pre>
  
  <p>I thought CreateCompatibleBitmap() was to return a 1366x768 section of the Desktop DC, but a black screen is displayed after BitBlt(). Instead of using CreateCompatibleBitmap I load an bitmap file into hBit and everything is as desired, so I guess the problem is with CreateCompatibleBitmap() only. Am I using this function properly? Is there something I am not doing that I am supposed to do?</p>