cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Windows Programming
close another window
close another window
Sep 4, 2012 at 4:29pm UTC
closed account (
28poGNh0
)
haiiiiiiiiiii everyone
I am asking if there is a function or a manner that close the window of other program like I want to close the window firefox but with codes
thanks a lot for reading
Sep 4, 2012 at 5:34pm UTC
modoran
(2077)
Get a handle to firefox window with FindWindow, them post WM_CLOSE to it. A more aggresive approach will be to get associated process id and call TerminateProcess (not recommended).
Sep 4, 2012 at 6:25pm UTC
closed account (
28poGNh0
)
Thanks a lot for reading my problem
I am sorry to bother you again,can you give me a piece of code for both findWindow and TerminateProcess
And thanks again
Sep 4, 2012 at 6:38pm UTC
modoran
(2077)
The functions are documented in MSDN. Do a google search and you should find code snippets.
Sep 4, 2012 at 6:49pm UTC
closed account (
28poGNh0
)
will Thanks a lot
Topic archived. No new replies allowed.