title: Bitmap disappearing when program is minimized
body: <p>I'm a student for c++ game-programming. We have to program a textadventure on console for windows.
  We get points for the implementation of bitmaps.
  I have the following code to Display the bitmap. It works well but when i minimize my window, my bitmap disappears.
  Where's the problem?</p>
  
  <pre><code>bool DisplayBitmap(char *szBitmap, int PosX = -1, int PosY = -1, bool AutoZoom = false)
  {  
  
      HWND hWnd = FindWindow("ConsoleWindowClass",NULL);      // Konsolen-Fenster identifizieren
      if (!hWnd) return false;
  
      HDC hDC = GetDC(hWnd);                                  // Device Context des Fensters ermitteln
      if (!hDC) return false; 
  
      HDC hBitmapDC = CreateCompatibleDC(hDC);                // Device Context für Bitmap bereitstellen
      if (!hBitmapDC) return false; 
  
      HBITMAP hBitmap = (HBITMAP)LoadImage(NULL,szBitmap,     // Bild aus Datei laden
                        IMAGE_BITMAP,0,0,LR_LOADFROMFILE); 
      if (!hBitmap) return false; 
  
      BITMAP bmp; 
      GetObject(hBitmap,sizeof(bmp),&amp;bmp);                    // Zeiger auf Bitmap-Objekt anfordern 
  
      RECT Client;
      GetClientRect(hWnd, &amp;Client);                           // Fenstergröße bestimmen
      if (PosX == -1) PosX = ((Client.right-Client.left)-bmp.bmWidth) / 2;
      if (PosY == -1) PosY = 250-bmp.bmHeight;                // ggfs. automatisch zentrieren
      if (PosY &lt;   0) PosY = 0;                               // und Zoomfaktor berechnen
      double ZoomFactor = (Client.right-Client.left-2*PosX) / double(bmp.bmWidth); 
  
      SelectObject(hBitmapDC,hBitmap);                        // Bitmap kopieren (evtl. mit Zoom)
      if (!AutoZoom)     BitBlt(hDC,PosX,PosY,bmp.bmWidth,bmp.bmHeight,hBitmapDC,0,0,SRCCOPY);  
      else StretchBlt(hDC,PosX,PosY,int(bmp.bmWidth*ZoomFactor),int(bmp.bmHeight*ZoomFactor),hBitmapDC,0,0,bmp.bmWidth,bmp.bmHeight,SRCCOPY); 
  
      DeleteObject(hBitmap);                                  // Objekte und Device Contexts wieder freigeben
      ReleaseDC(hWnd,hBitmapDC); 
      ReleaseDC(hWnd,hDC);
  
      return true;
  }
  </code></pre>