1

Well i made this transparent window that works fine, i made it full screen and top most. and you can't even see it, so now i can draw on the screen whatever i want! problem is, if i try to click on something behind it, it focuses the window, making it impossible to click anything behind it. my goal is to just click straight trough the window and keep it TOPMOST.

i wonder if i could do this with windows.h or SFML.

MARGINS margins;
margins.cxLeftWidth = -1;

SetWindowLong(window.getSystemHandle(), GWL_STYLE, WS_POPUP | WS_VISIBLE);
DwmExtendFrameIntoClientArea(window.getSystemHandle(), &margins);

i tried

WS_EX_LAYERED | WS_EX_TRANSPARENT

but that just creates a white window (but i can click trough it )

and i tried

WS_VISIBLE | WS_EX_LAYERED | WS_EX_TRANSPARENT

i can see trough it but i can't click trough it anymore..

JamesT
  • 25
  • 6
  • sorry for the poor spelling, i don't know if this is stupid question i'm a rather bad programmer. – JamesT Apr 23 '17 at 14:20
  • Handle the `WM_NCHITTEST` message, and return `HTTRANSPARENT`. Or perhaps simplify that by setting the `WM_EX_TRANSPARENT` extended window style for your window class. Not sure what SFML is; I guess that's some kind of a class library/framework? – Cody Gray - on strike Apr 23 '17 at 14:42

0 Answers0