window that you can click trough C++ SFML

253 Views Asked by At

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..

0

There are 0 best solutions below