| | |
Launching an application
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Nov 2008
Posts: 8
Reputation:
Solved Threads: 0
Hello,
I am a new beginner to c++. I am trying to launch an application in using the following command:
system("clip100.txt")
File clip100.txt got opened on my word processing software running and i had to exit from word processing to get my program continued.
My question is: How can i get my file clip100.txt ( or similar with different format, ex mp4) opened and allowing my application program to continue running passed the system("clip100.txt") line.
I was told about a command "Createprocess" but i cannot find documentation about it.
My purpose is to visually observe the opened file( txt, mp4 movie) while the my application program is prompting me with different inputs request i have to answer.
Thank you
monere.
I am a new beginner to c++. I am trying to launch an application in using the following command:
system("clip100.txt")
File clip100.txt got opened on my word processing software running and i had to exit from word processing to get my program continued.
My question is: How can i get my file clip100.txt ( or similar with different format, ex mp4) opened and allowing my application program to continue running passed the system("clip100.txt") line.
I was told about a command "Createprocess" but i cannot find documentation about it.
My purpose is to visually observe the opened file( txt, mp4 movie) while the my application program is prompting me with different inputs request i have to answer.
Thank you
monere.
You could of at least looked at the most recent posts :\
http://www.daniweb.com/forums/thread165795.html
http://msdn.microsoft.com/en-us/library/ms682425.aspx
Chris
http://www.daniweb.com/forums/thread165795.html
http://msdn.microsoft.com/en-us/library/ms682425.aspx
Chris
Knowledge is power -- But experience is everything
•
•
•
•
Hello,
I am a new beginner to c++. I am trying to launch an application in using the following command:
system("clip100.txt")
File clip100.txt got opened on my word processing software running and i had to exit from word processing to get my program continued.
My question is: How can i get my file clip100.txt ( or similar with different format, ex mp4) opened and allowing my application program to continue running passed the system("clip100.txt") line.
I was told about a command "Createprocess" but i cannot find documentation about it.
My purpose is to visually observe the opened file( txt, mp4 movie) while the my application program is prompting me with different inputs request i have to answer.
Thank you
monere.
Well, u shouldent really use system(...)
but thats the easiest way as a begginner
so do this:
C++ Syntax (Toggle Plain Text)
system("start clip100.txt");
system()
is like calling the command prompt and typing in so i recomend you go to start->run -> cmd.exe
in that type in help
press enter and you will get a bunch of commands
with every command type the command and /?
to get info on how to use that command.
You can use the command in the program using system("...");
Hope that helps : )
C++ Syntax (Toggle Plain Text)
#include <windows.h> using namespace std; int main() { ShellExecute(NULL, "open", "C:\\cool.txt","", "C:\\", SW_NORMAL); return 0; }
Last edited by Comatose; Jan 3rd, 2009 at 12:52 pm.
•
•
Join Date: Nov 2008
Posts: 8
Reputation:
Solved Threads: 0
Comatose,
I tried your solution. it worked perfectly the first try.
I will check documentation to gain a better understanding of the Shellexecute "functions".
I also thank other members of this forum who provided me with interesting answers and insight to the problem i was facing.
Thanks a lot
Monere
I tried your solution. it worked perfectly the first try.
I will check documentation to gain a better understanding of the Shellexecute "functions".
I also thank other members of this forum who provided me with interesting answers and insight to the problem i was facing.
Thanks a lot
Monere
![]() |
Similar Threads
- Launching Sound Recorder and Auto-Save file (PHP)
- Interact with application in Python (Python)
- Error in loading the application (Windows NT / 2000 / XP)
- Problems launching java source code (serious newbie, sorry! :( ) (Java)
- blnWaitOnReturn of wshShell.Run has no effect if required application is already runn (Visual Basic 4 / 5 / 6)
- Launching an application from a thread (C++)
Other Threads in the C++ Forum
- Previous Thread: Cant solve what is wrong
- Next Thread: Struct variable assignment
Views: 322 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll encryption error file forms fstream function functions game getline givemetehcodez google graph homeworkhelper iamthwee ifstream input int integer java lazy lib linkedlist linux loop looping loops map math matrix memory microsoft newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort string strings struct studio system template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






