Is it possible in Win32 to create non-transparent window, which is click-through (sends click events to what lays below)? I tried to catch WM_NCHITTEST
message and return HTTRANSPARENT
, but it doesn't work.
Asked
Active
Viewed 501 times
2

mic1248
- 21
- 2
-
1According to the [documentation](https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-nchittest):n a window currently covered by another window in the same thread (the message will be sent to underlying windows in the same thread until one of them returns a code that is not HTTRANSPARENT).So to process the `WM_NCHITTEST` message you need to ensure that the windows are in the same thread.And you can refer to : [Letting the mouse pass through Windows C++](https://stackoverflow.com/questions/13069717/letting-the-mouse-pass-through-windows-c) – Zeus Feb 09 '21 at 02:13
-
Unfortunately my intention is to pass through the clicks to any window, not only one, which belongs to the same thread. The idea is to have full-screen, on top window, which is transparent for clicks. The window is going to apply some graphical effect on what is underneath and display it within its client area. – mic1248 Feb 14 '21 at 11:20
-
Could you please show [a minimal, reproducible sample](https://stackoverflow.com/help/minimal-reproducible-example) without private information? – Zeus Feb 15 '21 at 06:20