Finding the Window

Posts 1–7 of 7 · Page 1 of 1
Finding the Window
I have two windows that open when I run AssaultCube. The problem is that they are both named the same thing. One window is a cmd window which loads the actual game and the other window is the actual game.

How can I specify which window I want using FindWindow() or another function?
Use a function in the windows you want the calls it in front of the other?
Can you rephrase that. I dont understand
Why dont u create a function that calls the windows you want ( no the cmd ) over the cmd....
How would exactly do that? I searched the Windows API but havent found anything on it
You could either specify the window class with the name (use Spy++ or something similar to get the class name), or work with the process name.

To find a window with a specific process name (I assume the "actual" game is AssaultCube.exe),
use EnumWindowsⓘ,

pass the HWND to GetWindowThreadProcessIdⓘ,

open the process with OpenProcessⓘ,

get the file name with GetModuleFileNameExⓘ,

and compare it to AssaultCube.exe.
Im going to start off using Spy++ after a while I will switch to the other method. Thanks
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us