Apr 22, 2005 #1 cromulent Programmer Joined Oct 8, 2004 Messages 8 Location US How do I open a different application through c++? For example if I wanted to open Notepad.exe by executing my c++ application. Thanks websitesite: http://www.nitrohobby.com
How do I open a different application through c++? For example if I wanted to open Notepad.exe by executing my c++ application. Thanks websitesite: http://www.nitrohobby.com
Apr 22, 2005 Thread starter #2 cromulent Programmer Joined Oct 8, 2004 Messages 8 Location US I figured it out on my own. Here it is: #include <iostream> #include <windows.h> using namespace std; void main() { string mystring; mystring="Notepad.exe"; ShellExecute(NULL, "open",mystring.c_str(), 0, 0, SW_SHOW); } website: http://www.nitrohobby.com Upvote 0 Downvote
I figured it out on my own. Here it is: #include <iostream> #include <windows.h> using namespace std; void main() { string mystring; mystring="Notepad.exe"; ShellExecute(NULL, "open",mystring.c_str(), 0, 0, SW_SHOW); } website: http://www.nitrohobby.com
Apr 23, 2005 #3 drewdaman Programmer Joined Aug 5, 2003 Messages 302 Location CA ShellExecute or System (ShellExecute is probably better..) Upvote 0 Downvote