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. Making a translucent window ignore the mouse and keyboard

Making a translucent window ignore the mouse and keyboard

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 Posts 3 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.
  • R Offline
    R Offline
    rentzk
    wrote on last edited by
    #1

    I have a program where we would like to have a large translucent window placed on top of the program's main windows. The problem is that this new window captures key presses and mouse events. Is there any way to set thing up so that any user interaction is send directly to the views underneath?

    B M 2 Replies Last reply
    0
    • R rentzk

      I have a program where we would like to have a large translucent window placed on top of the program's main windows. The problem is that this new window captures key presses and mouse events. Is there any way to set thing up so that any user interaction is send directly to the views underneath?

      B Offline
      B Offline
      basementman
      wrote on last edited by
      #2

      You need to forward the messages to the correct windows manually.  onwards and upwards...

      1 Reply Last reply
      0
      • R rentzk

        I have a program where we would like to have a large translucent window placed on top of the program's main windows. The problem is that this new window captures key presses and mouse events. Is there any way to set thing up so that any user interaction is send directly to the views underneath?

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        The mouse is easy - handle WM_NCHITTEST and return HTTRANSPARENT. Not sure how to ignore the keyboard though. --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- "That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."   -- Buffy

        R 1 Reply Last reply
        0
        • M Michael Dunn

          The mouse is easy - handle WM_NCHITTEST and return HTTRANSPARENT. Not sure how to ignore the keyboard though. --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- "That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."   -- Buffy

          R Offline
          R Offline
          rentzk
          wrote on last edited by
          #4

          I Googled the HTTRANSPARENT return value, and they mention another window style called WS_EX_NOACTIVATE, that looks like it may take care of the keyboard. I'll have to experiment to find out.

          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