Overlay window NOT USING WS_EX_TOPMOST
I have a little finding that might increase slightly the stealthiness of your overlay windows.
This method allows you to avoid using the flag WS_EX_TOPMOST in the options of your window.
I do not have any proof that anti cheats are actively looking for always on top windows, but I recently started coding a program that list all the opened windows and their child windows and I can retrieve their properties with GetWindowInfo(), which means that anti cheat could do the same, and an always on top, layered and transparent window is probably clearly the sign of a cheat.
Enough introduction, how does this work?
Well, that’s actually quite simple, you create your window and periodically (I do it at every cycle of the cheat), you simply put the window on top of all the others (not in TOPMOST, just on top).
Here is the relevant code to create the window:
overlayWnd = CreateWindowEx(/*WS_EX_TOPMOST |*/ WS_EX_LAYERED | WS_EX_TRANSPARENT,
And here is the code to put it on top position to execute periodically:
SetWindowPos(overlayWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
Note: I personally tested this and I use it in my current DayZ cheat, whatever window you are using underit doesn’t lose the focus by you executing this code, I do not see any drawback so far.
Hope this push the ban away for some time at least