Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open app

Status
Not open for further replies.

cromulent

Programmer
Oct 8, 2004
8
0
0
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:
 
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:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top