CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Posts
    79

    How to get background

    Hello:
    I use bitblt() copy a bitmap to screen.But I need
    the background of bitmap.(it's said all graphic keep up
    when bitmap move on it.)
    any advice!Thank you!


  2. #2
    Join Date
    Apr 1999
    Posts
    30

    Re: How to get background

    Is this the question, you have to keep the background while bitblt, try this and let me know

    // transfer non-gray pixels to the screen
    if (GetDeviceCaps(hdc, CAPS1) & C1_TRANSPARENT){
    SetBkMode(hdc, NEWTRANSPARENT); SetBkColor(hdc, RGB(0xc0,0xc0,0xc0));
    BitBlt(hdc, x, y, cx, cy, hdcButton, 0, 0, SRCCOPY);}


  3. #3
    Join Date
    Apr 1999
    Posts
    79

    Re: How to get background

    Hello:
    I had test the code.I use VC++6.0 MFC ScrollView
    Class.But when I run the code.There are three error
    "CAPS1,C1_TRANSPARENT,NEWTRANSPARENT"Undefined.The
    code add to mouse Message function.I defined "CDC*
    pDC=GetDC()"on top.
    I don't know how to do again?Please help me?Thank you
    Yoh-Hei


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

Featured