When target application not open dont draw

Posts 1–2 of 2 · Page 1 of 1
When target application not open dont draw
Currently when my cheat is open and using Topmost, it draws on top of every program like google, paint any application. Is there any way to make it so when the program is not focused it doesn't draw? I lack the skills to do this
If you're using external, which I assume you are considering topmost window, GetForegroundWindow(). You should be able to compare this to your Window handle to your game.


Hope that should help.

while ( drawloop )
{
myOverlay.visible = (GetForegroundWindow == HWND myGameWindow)

// you can check whether to draw or not based on the visibility, i'd suggest to do so as there's no point to keep
// drawing
draw code
}
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us