However i believe a process can have more than one main window ( i mean windows that are not the child window of any other windows ) even with same classname, but hopefully in this case ( what i want to get to work ), it doesn't have more than one window with same classname.
What makes it a little harder to me is that i'm coding a Dll to be injected in a process, i know i can use GetCurrentProcessId() API to retrieve the PID of the process that i had injected my Dll into it.
DWORD PID = GetCurrentProcessId();
Now i want to get the handle of the window with classname "SkinWindow" and this PID.
I have no idea how to do it, however i tried a lot and i found that a combination of EnumWindows(), GetWindowThreadProcessId() is somehow a way to do it, but as i'm new to C++ and EnumWindows() needs structure, callback :-?? etc i always stuck at this.
Any help is welcomed and would be great.
Edited by D4RKON3, 27 February 2012 - 08:47 PM.