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. How to create window with Transparency level starts from 0 to 100%?

How to create window with Transparency level starts from 0 to 100%?

Scheduled Pinned Locked Moved C / C++ / MFC
jsontutorialquestion
4 Posts 2 Posters 0 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.
  • P Offline
    P Offline
    p_1960
    wrote on last edited by
    #1

    How to create window with Transparency level starts from 0 to 100%? Left side transparency level = 0% Right side transparency level = 100% Is it possible to use AlphaBlend() API. Is it possible to use GradientFill() method of CDC. pls let me know with sample

    J 1 Reply Last reply
    0
    • P p_1960

      How to create window with Transparency level starts from 0 to 100%? Left side transparency level = 0% Right side transparency level = 100% Is it possible to use AlphaBlend() API. Is it possible to use GradientFill() method of CDC. pls let me know with sample

      J Offline
      J Offline
      Jerry Wang
      wrote on last edited by
      #2

      read this article, it helps http://www.codeproject.com/KB/dialog/SemiTranDlgWithCtrls.aspx[^] You can give a background, Left side transparency level = 0% Right side transparency level = 100%

      P 1 Reply Last reply
      0
      • J Jerry Wang

        read this article, it helps http://www.codeproject.com/KB/dialog/SemiTranDlgWithCtrls.aspx[^] You can give a background, Left side transparency level = 0% Right side transparency level = 100%

        P Offline
        P Offline
        p_1960
        wrote on last edited by
        #3

        Thanks 4 ur help. Ur link is helpful, but it uses GDIplus and it is not my requirement. I need to use only MFC. Anyway it will b useful if u explain the method Refresh() of class CImgBaseDialog in more detailed manner. I understood rest of the stuffs like hooking, unhooking, etc., Thanks n advance!!!

        J 1 Reply Last reply
        0
        • P p_1960

          Thanks 4 ur help. Ur link is helpful, but it uses GDIplus and it is not my requirement. I need to use only MFC. Anyway it will b useful if u explain the method Refresh() of class CImgBaseDialog in more detailed manner. I understood rest of the stuffs like hooking, unhooking, etc., Thanks n advance!!!

          J Offline
          J Offline
          Jerry Wang
          wrote on last edited by
          #4

          The sample uses the GDI+ to load PNG / TIFF image. U can modify the code to use CXimage http://www.codeproject.com/KB/graphics/cximage.aspx[^] and normal GDI The Refresh() method in CImgBaseDialog works as the following: Paint the background first. Enumerate all child controls, and for each of them, send WM_PRINT to get the captured bitmap, paint at the same place of the fake window. Finally, caculate the position of caret, draw the caret. ---------------------------------------------------------------- English is not my native language

          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