How to control the other app using Window API
-
May I know how can I take control of other app using my own program in vc++. Eg: do a "scroll up" in browser ; open MS Word and save; perform "next/previous" in window photo viewer.. etc
-
May I know how can I take control of other app using my own program in vc++. Eg: do a "scroll up" in browser ; open MS Word and save; perform "next/previous" in window photo viewer.. etc
There's either ShellExecute (to launch apps), or the more sophisticated method of using COM/COM+ automation. (formerly known as OLE) Adding-automation-to-MFC-applications www.cgoakley.org/prog/oleaut.html
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
-
There's either ShellExecute (to launch apps), or the more sophisticated method of using COM/COM+ automation. (formerly known as OLE) Adding-automation-to-MFC-applications www.cgoakley.org/prog/oleaut.html
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
how about pressing a hotkey combination (eg: CTRL+S for save)?
-
May I know how can I take control of other app using my own program in vc++. Eg: do a "scroll up" in browser ; open MS Word and save; perform "next/previous" in window photo viewer.. etc
-
May I know how can I take control of other app using my own program in vc++. Eg: do a "scroll up" in browser ; open MS Word and save; perform "next/previous" in window photo viewer.. etc
The classic way os to do a PostMessage() (Or SendMessage()) for which you need tohe window handle of the receiving app and thw WM_COMAND value of te controll you want to manipulate. You can also do some surprisingly nifty stuff with windows hooks (look at SetWindowsHookEx()) if you want total control of another app.
============================== Nothing to say.