Thread: bitmap disapears

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    81

    bitmap disapears

    anyone know why a bitmap disapears when the app is minimized

    hdc = GetDC(hwnd)
    HBITMAP hbitmap = (HBITMAP)LoadImage(hInstance,"pic.bmp",IMAGE_BITMA P,0,0,LR_LOADFROMFILE);
    HDC hbmp = CreateCompatibleDC(hdc);
    HBITMAP old_hbitmap = (HBITMAP)SelectObject(hbmp,hbitmap);
    BitBlt(hdc,x,y,20,20,hbmp,0,0,SRCCOPY);

  2. #2
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    yes, because it is not windows job to redraw it when you restore the window. It will tell you when it's appropriate to redraw with a WM_PAINT message though.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Loading a bitmap (Without using glaux)
    By Shamino in forum Game Programming
    Replies: 7
    Last Post: 03-16-2006, 09:43 AM
  2. OpenGL -- Bitmaps
    By HQSneaker in forum Game Programming
    Replies: 14
    Last Post: 09-06-2004, 04:04 PM
  3. Loading a Bitmap resource for OpenGL Texture[x]
    By the dead tree in forum Game Programming
    Replies: 4
    Last Post: 08-26-2004, 01:12 PM
  4. bitmap not going onto screen
    By stallion in forum Windows Programming
    Replies: 4
    Last Post: 02-22-2003, 10:07 AM
  5. texture is all white in opengl!
    By Crossbow in forum Game Programming
    Replies: 7
    Last Post: 03-31-2002, 11:54 AM