Results 1 to 2 of 2

Thread: Why when I blit to a mem dc or a mem bmp, and then blit the mem dc to the screen...

  1. #1

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037

    Why when I blit to a mem dc or a mem bmp, and then blit the mem dc to the screen...

    Nothing at all:
    Code:
    HBITMAP hOldMemBmp= (HBITMAP)::SelectObject(imageDC, hBmp);
    
    ::StretchBlt(a::hdcMem, 0, 0, 800, 600, imageDC, 0, 0, BmpW, BmpH, SRCCOPY);
    
    ::BitBlt(hDC, invalLocation->left, invalLocation->top,
            invalLocation->right-invalLocation->left,
            invalLocation->bottom-invalLocation->top, a::hdcMem, 0, 0, SRCCOPY);
    Black screen:
    Code:
    HBITMAP hOldMemBmp= (HBITMAP)::SelectObject(imageDC, hBmp);
    
    ::StretchBlt(hMemBmp, 0, 0, 800, 600, imageDC, 0, 0, BmpW, BmpH, SRCCOPY);
    
    a::hOldBmp= (HBITMAP)::SelectObject(a::hdcMem, hMemBmp);
    
    ::BitBlt(hDC, invalLocation->left, invalLocation->top,
            invalLocation->right-invalLocation->left,
            invalLocation->bottom-invalLocation->top, a::hdcMem, 0, 0, SRCCOPY);
    Last edited by aewarnick; Jul 17th, 2003 at 10:52 PM.

  2. #2

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    I took another look at this post:
    http://www.experts-exchange.com/CXO/..._20027366.html
    and saw that I had to select the mem bmp to the mem dc and then draw to the mem dc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width