Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Transparent drawing

Transparent drawing

Scheduled Pinned Locked Moved C / C++ / MFC
graphicstutorial
4 Posts 4 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jagadeesh VN
    wrote on last edited by
    #1

    Hi, I have two tiff images and I am loading them into CBitmap using GDI Bitmap class. I am using one of the image to paint the background of a dialog and its working fine. Now I would like to use the second image to draw on top of the first. The second image has some transaparent areas and those areas should be replaced with the image in the back( first image). I tried several examples in Codeproject, But I am getting the transaparent area filled with blue. Can someone pl. guide me on doing this. Thanks San "A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."

    V C L 3 Replies Last reply
    0
    • J Jagadeesh VN

      Hi, I have two tiff images and I am loading them into CBitmap using GDI Bitmap class. I am using one of the image to paint the background of a dialog and its working fine. Now I would like to use the second image to draw on top of the first. The second image has some transaparent areas and those areas should be replaced with the image in the back( first image). I tried several examples in Codeproject, But I am getting the transaparent area filled with blue. Can someone pl. guide me on doing this. Thanks San "A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."

      V Offline
      V Offline
      vikas amin
      wrote on last edited by
      #2

      Try to create a new view which is overlapped on the dialogbox. The first image should be in CStatic control. The second image should be manually drawn on the view by editing the function OnDraw(CDC* pDC). This might work but dont know about the windows message realted to it. Vikas Amin Embin Technology Bombay vikas.amin@embin.com

      1 Reply Last reply
      0
      • J Jagadeesh VN

        Hi, I have two tiff images and I am loading them into CBitmap using GDI Bitmap class. I am using one of the image to paint the background of a dialog and its working fine. Now I would like to use the second image to draw on top of the first. The second image has some transaparent areas and those areas should be replaced with the image in the back( first image). I tried several examples in Codeproject, But I am getting the transaparent area filled with blue. Can someone pl. guide me on doing this. Thanks San "A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."

        C Offline
        C Offline
        Chris Losinger
        wrote on last edited by
        #3

        try article Q79212 in the MSDN Cleek | Image Toolkits | Thumbnail maker

        1 Reply Last reply
        0
        • J Jagadeesh VN

          Hi, I have two tiff images and I am loading them into CBitmap using GDI Bitmap class. I am using one of the image to paint the background of a dialog and its working fine. Now I would like to use the second image to draw on top of the first. The second image has some transaparent areas and those areas should be replaced with the image in the back( first image). I tried several examples in Codeproject, But I am getting the transaparent area filled with blue. Can someone pl. guide me on doing this. Thanks San "A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."

          L Offline
          L Offline
          Lane Yu
          wrote on last edited by
          #4

          Maybe you can use TransparentBlt() in NT. This is an easiest way to paint with a transparent color.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups