I just can't get it to work... can anyone tell me the code they would use to send a key to something like notepad and have it read it as if it were you hitting a key on the keyboard?
I just can't get it to work... can anyone tell me the code they would use to send a key to something like notepad and have it read it as if it were you hitting a key on the keyboard?
In a perfect world every dog would have a home and every home would have a dog.
Visit My Web Site, Canine Programming
I use Win32 API
Like this -
Code:#include <windows.h> int main() { HWND hwnd=0; //Get main notepad handle while(hwnd==0) hwnd = FindWindow("Notepad",0); HWND hwndEdit =0; //Get notepad edit control while(hwndEdit==0) hwndEdit = FindWindowEx(hwnd,0,"edit",0); //write an 'a' TCHAR test = 'a'; SendMessage(hwndEdit,WM_CHAR,test,0); return 0; }
zen
It worked!! Thank you so much!
In a perfect world every dog would have a home and every home would have a dog.
Visit My Web Site, Canine Programming
I use Win32 API