Open an Executable file when pressing a button - Visual Studio 2005
Hi there!
I have a project that has multiple buttons.
When i press a button i need to open an executable file from within the project directory.
I know about ShellExecute() function
The problem is that when i close the file it keeps lauching it again and again
This is problem no. 1.
Problem no.2 is that i need to know when the executable file that i just lauched is closed becouse this exe file generates a .txt file that i need to open for viewing.
So ... any sugestion?
Thanks!
#1 What do you mean "when you close the file"? The exe you executed using ShellExecute? ShellExecute - in my experience - only launches one instance of an executable
#2 Read about hooking the WM_DESTROY message. You can then determine if the window closing is the window in question, and then launch the file.
As well, here is a good place to start.
#2 Read about hooking the WM_DESTROY message. You can then determine if the window closing is the window in question, and then launch the file.
As well, here is a good place to start.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement