So my question is, how to get the program to write/do commands (like alt + F4)
to the current (active) window.
Ex. I start the program
=> I pick notepad
=> It writes something to the notepad
=> I pick IE and select the address bar
=> It continues writing to the address bar?
I need a way to close the window when it gets selected so ex.
if I start my program and pick Notepad, it will close Notepad.
I tried things like PostMessage(GetActiveWindow(), "something", 1) but they didn't
work.
Thanks for your help.