Solved Getting HWND of inejcted window

Hexui Undetected CSGO Cheats PUBG Accounts

Szaka

Coder
Full Member
Nobleman
Mar 14, 2013
161
718
3
Hello. I got a small problem and no idea how to resolve it. I launch game, then .exe injector which injects DLL into the game. This is a windows form app. I need this dll to get HWND of the window he is injected into. Now using FindWindow because i want to run multiple games with bot inside it, so every bot has to detect its OWN client. How to? I need to PostMessage using HWND

Right now i can hook CreateWindowEx to het the HWND, but do you know any simpler way?
 
Last edited:

Szaka

Coder
Full Member
Nobleman
Mar 14, 2013
161
718
3
I triend and it seems to work wrong in my case. What im trying to do now, is to get HWNDs of all windows with same PID and compare Title text, that will work for sure

Edit: Bingo, works
 
Last edited:

edgar

Newbie
Full Member
Dec 30, 2012
28
518
3
I did this in my window hook code that I posted a while back. Since I was already hooking CreateDevice I let the target application give me it's main window handle.
 
Community Mods