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. Make client area of dialog transparent, so i can see what is behind the window

Make client area of dialog transparent, so i can see what is behind the window

Scheduled Pinned Locked Moved C / C++ / MFC
question
9 Posts 5 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.
  • M Offline
    M Offline
    manchukuo
    wrote on last edited by
    #1

    Hello i was just wondering if this can be done?, i want to be able to see the windows that overlapped by my window. Thanks :laugh:

    A M A I 4 Replies Last reply
    0
    • M manchukuo

      Hello i was just wondering if this can be done?, i want to be able to see the windows that overlapped by my window. Thanks :laugh:

      A Offline
      A Offline
      Albert Holguin
      wrote on last edited by
      #2

      I'm sure it can be done, don't know if there's any libraries that can already do this for you (may be), but if you want to do it yourself you'll have to override the OnPaint() method.

      M 1 Reply Last reply
      0
      • A Albert Holguin

        I'm sure it can be done, don't know if there's any libraries that can already do this for you (may be), but if you want to do it yourself you'll have to override the OnPaint() method.

        M Offline
        M Offline
        manchukuo
        wrote on last edited by
        #3

        thanks but how to do that myself i know that using NULL brush on the WM_PAINT draws the window transparent but just it does that draws a no fill rect, so i can see the back of the window but just the moment it gets drawed, so i am thinking of using a timer but that is not efficient can someone they me how i can do it myself without libraries?

        A 1 Reply Last reply
        0
        • M manchukuo

          thanks but how to do that myself i know that using NULL brush on the WM_PAINT draws the window transparent but just it does that draws a no fill rect, so i can see the back of the window but just the moment it gets drawed, so i am thinking of using a timer but that is not efficient can someone they me how i can do it myself without libraries?

          A Offline
          A Offline
          Albert Holguin
          wrote on last edited by
          #4

          OnPaint() is the method that the MFC infrastructure calls to draw the screen, that would be the appropriate override for this, if you do it there, it should do it the same every time, if you need to get the screen redrawn at any time, just invalidate it and MFC will once again go to OnPaint() to redraw.

          1 Reply Last reply
          0
          • M manchukuo

            Hello i was just wondering if this can be done?, i want to be able to see the windows that overlapped by my window. Thanks :laugh:

            M Offline
            M Offline
            Mark Salsbery
            wrote on last edited by
            #5

            Have you looked at the WM_ERASEBKGND and/or WM_CTLCOLORDLG messages?

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            1 Reply Last reply
            0
            • M manchukuo

              Hello i was just wondering if this can be done?, i want to be able to see the windows that overlapped by my window. Thanks :laugh:

              A Offline
              A Offline
              abhishek biradar
              wrote on last edited by
              #6

              M not sure this is your requirement or not add this in onpaint this->ShowWindow(SW_HIDE); this will hide the entire dialog

              1 Reply Last reply
              0
              • M manchukuo

                Hello i was just wondering if this can be done?, i want to be able to see the windows that overlapped by my window. Thanks :laugh:

                I Offline
                I Offline
                Iain Clarke Warrior Programmer
                wrote on last edited by
                #7

                I don't know your skill level, but there are many articles here on codeproject that should help... Have a look in http://www.codeproject.com/KB/dialog/#Skins+%26+Advanced+UI[^] For example: Simple way to create non-rectangular shaped dialogs[^] Perfect Semi-transparent & Shaped Dialogs with Standard, ActiveX, and Translucent Controls for Windows 2000+[^] and Cool, Semi-transparent and Shaped Dialogs with Standard Controls for Windows 2000 and Above[^] These use different approaches. Hopefully one will help you! Iain.

                I am one of "those foreigners coming over here and stealing our jobs". Yay me!

                M 1 Reply Last reply
                0
                • I Iain Clarke Warrior Programmer

                  I don't know your skill level, but there are many articles here on codeproject that should help... Have a look in http://www.codeproject.com/KB/dialog/#Skins+%26+Advanced+UI[^] For example: Simple way to create non-rectangular shaped dialogs[^] Perfect Semi-transparent & Shaped Dialogs with Standard, ActiveX, and Translucent Controls for Windows 2000+[^] and Cool, Semi-transparent and Shaped Dialogs with Standard Controls for Windows 2000 and Above[^] These use different approaches. Hopefully one will help you! Iain.

                  I am one of "those foreigners coming over here and stealing our jobs". Yay me!

                  M Offline
                  M Offline
                  manchukuo
                  wrote on last edited by
                  #8

                  The second link is what i needed thanks :laugh:

                  I 1 Reply Last reply
                  0
                  • M manchukuo

                    The second link is what i needed thanks :laugh:

                    I Offline
                    I Offline
                    Iain Clarke Warrior Programmer
                    wrote on last edited by
                    #9

                    Glad to be of assistance! Sometimes it's just knowing what to look for... Iain.

                    I am one of "those foreigners coming over here and stealing our jobs". Yay me!

                    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