Thread: Transparent Blitting

  1. #1
    Registered User
    Join Date
    Aug 2001
    Location
    Melbourne, Australia
    Posts
    92

    Unhappy Transparent Blitting

    I've completely forgotten how to blit to a dc using a mask... can someone please help me?! Things I need to know:

    - Is the background of the main image black or white?
    - Is the background of the mask image black or white?
    - Required blitting operations in correct order.

    Thanks a million you guys (and girls) rule as always!

    -out-
    Jeff
    psychobrat at gmail

  2. #2
    Registered User dizolve's Avatar
    Join Date
    Dec 2002
    Posts
    68
    (From theForger)

    The background of the main image is black, the background of the mask is white.

    Code:
    SelectObject(hdcMem, g_hbmMask);
    BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, hdcMem, 0, 0, SRCAND);
    
    SelectObject(hdcMem, g_hbmBall);
    BitBlt(hdc, 0, bm.bmHeight, bm.bmWidth, bm.bmHeight, hdcMem, 0, 0, SRCPAINT);
    Hope this helps.

  3. #3
    Registered User
    Join Date
    Aug 2001
    Location
    Melbourne, Australia
    Posts
    92

    Talking

    Thanks heaps - that's exactly what i was after.

    YOU RULE!

    -out-
    PsychoBrat

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Transparent, Editbox, HOLLOW_BRUSH, Marking text?
    By Dampy in forum Windows Programming
    Replies: 6
    Last Post: 09-22-2008, 07:17 PM
  2. Transparent bmp on top of webcam feed?
    By h3ro in forum Windows Programming
    Replies: 4
    Last Post: 08-06-2008, 09:45 AM
  3. Transparent panels overlapped
    By AtomRiot in forum C# Programming
    Replies: 3
    Last Post: 04-21-2007, 09:16 PM
  4. Transparent bitmaps
    By Mithoric in forum Windows Programming
    Replies: 5
    Last Post: 03-11-2004, 03:14 PM
  5. OSD or transparent window
    By Mox in forum Windows Programming
    Replies: 5
    Last Post: 01-28-2003, 06:31 PM