Hi, i try to get hwnd of text input in Warcraft 3 but i can't find anything exept one hwnd wich have window name Warcraft III. So how can i find other hwnd? I tried to find with WinSpy and with this code :
#include <windows.h>
#include <iostream>
BOOL CALLBACK EnumChildProc(HWND hWnd, LPARAM lp);
int main(int argc, char** argv)
{
HWND hWnd;
while( !( hWnd = FindWindow(NULL, "GameClient") ) )
{
Sleep(500);
std::cout << "Waiting for launch...\n";
}
EnumChildWindows(hWnd, &EnumChildProc, NULL);
return 0;
}
BOOL CALLBACK EnumChildProc(HWND hWnd, LPARAM lp)
{
char buff[128];
GetClassName(hWnd, buff, sizeof(buff));
std::cout << buff <<"\n";
return true;
}
By the way, i need to find that hwnd because i want to send key-pressing to chat. So may be there is another method.