First get the window handle of the Windows program, then get the window handle of the input box, and finally, send the WM_CHAR message to the window handle, for example, for the NOTEPAD window, can enter one in it in the following way A ': // Get Notepad's window handle hwnd hwnd = :: FindWindow (NULL, "Unexpected Title - Notepad");
// Take the window handle of the input box hWnd Hedit = :: getdlgitem (hwnd, 0x0f); // Here 0x0f is the ID of the edit box, you can observe // in SPY to fill in 'a' :: SendMessage (HEDIT, WM_CHAR, (WPARAM) 'A', 0x00000001);