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 colour on window using win32

Transparent colour on window using win32

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 Posts 4 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.
  • S Offline
    S Offline
    Steve_
    wrote on last edited by
    #1

    Hi, If I wanted to have a window that was a custom shape, e.g. a circle, how could I make the regions of the window that I do not want to see transparent?

    ---/ \---
    -- --
    -- --
    ---\ /---
    -------------

    Lame diagram, but I would like to make the areas composed of dashes transparent so that only the circular area of the window remains visible. Thanks

    S 1 Reply Last reply
    0
    • S Steve_

      Hi, If I wanted to have a window that was a custom shape, e.g. a circle, how could I make the regions of the window that I do not want to see transparent?

      ---/ \---
      -- --
      -- --
      ---\ /---
      -------------

      Lame diagram, but I would like to make the areas composed of dashes transparent so that only the circular area of the window remains visible. Thanks

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      Try SetWindowRgn[^] - there's an MFC variant[^]

      C 1 Reply Last reply
      0
      • S Stuart Dootson

        Try SetWindowRgn[^] - there's an MFC variant[^]

        C Offline
        C Offline
        Code o mat
        wrote on last edited by
        #3

        An alternative to using window regions is to use layered windows[^]. p.s: You get 10 bonus points for the ASCII art. :-D

        > The problem with computers is that they do what you tell them to do and not what you want them to do. <

        C 1 Reply Last reply
        0
        • C Code o mat

          An alternative to using window regions is to use layered windows[^]. p.s: You get 10 bonus points for the ASCII art. :-D

          > The problem with computers is that they do what you tell them to do and not what you want them to do. <

          C Offline
          C Offline
          CPallini
          wrote on last edited by
          #4

          Probably you replied to the wrong post. :)

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          C 1 Reply Last reply
          0
          • C CPallini

            Probably you replied to the wrong post. :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            C Offline
            C Offline
            Code o mat
            wrote on last edited by
            #5

            Oups, sorry about that. :(

            > The problem with computers is that they do what you tell them to do and not what you want them to do. <

            S 1 Reply Last reply
            0
            • C Code o mat

              Oups, sorry about that. :(

              > The problem with computers is that they do what you tell them to do and not what you want them to do. <

              S Offline
              S Offline
              Steve_
              wrote on last edited by
              #6

              Thanks guys, I'll have a look!

              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