I have added and changed part of the code to:
HWND childWindow = GetWindow(windowHandle,GW_
SetForeGroundWindow(childW
I've also checked that childwindow handle matches the one in Spy++.
It still does not print anything into the notepad. Is using setforegroundwindow() the wrong way to set the focus on the application about to receive the input?
Main Topics
Browse All Topics





by: AlexFMPosted on 2004-09-05 at 01:27:05ID: 11983447
You need to send key to Notepad edit area which is child of Notepad frame window, and not to Notepad frame itself. Use GetWindow to find child edit box from windowHandle parent. Use Spy++ to see windows hierarchy.