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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you help me with my problem? -T 1

Status
Not open for further replies.

Polkadot

Technical User
Jan 23, 2002
8
GB
Can you help me with my problem? -There is a C function that allows C to call another executeable as if from a command line prompt eg.

system("c:\type c:\autoexec.bat");

In C++ this will open a Dos window and type the autoexec. Note however that this doesn't work for windows .exe files.

Question? how can I get C++ to call another windows application in the same way as if I click on an icon or go to the Start menu click on run and type in Excel. (which in this instance will start up Excel) - You can contact me at Andrew.Carmichael@polkadotuk.demon.co.uk
 
WinExec([string path],SW_SHOWDEFAULT);
is like clicking an icon

ShellExecute(...); is a little bit more powerful but isn't always necessary. Hope that helped. MYenigmaSELF:-9
myenigmaself@yahoo.com
"If debugging is the process of removing bugs, then programming must be the process of putting them in." --Dykstra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top