I've used the system funtion in stdlib.h but when I use it to run an executive file,the DOS window appears.How can I remove the DOS window?
eg,I've achieved a player and a caculator& and a dialog with 2 buttons,when I click button1,then I want the player appear,and so dose with the caculator when I click button2.So in the message process funtion of button1 I used system() to run the executive file of player.
the main code is:
void CProjectDlg::Onplayer()
{
// TODO: Add your command handler code here
system("player");/* player is the name of the player's
executive file */
system("exit"); // i want to exit from dos window bu failed.
}
void CProjectDlg::Oncaculator()
{
// TODO: Add your command handler code here
system("caculator");
system("exit");
}
Is anyone knows how to remove the Dos window thanks.
Yang Hui
Comments
:
can you describe it concretly?
thank you!
: :
: can you describe it concretly?
: thank you!
:
http://www.google.com/search?hl=en&lr=&q=CreateProcess()&btnG=Search
or
http://www.google.com/search?hl=en&lr=&q=CreateProcess&btnG=Search
http://www.google.com/ always works
{2}rIng
: : : Use CreateProcess.
: : :
: : can you describe it concretly?
: : thank you!
: :
:
: http://www.google.com/search?hl=en&lr=&q=CreateProcess()&btnG=Search
:
: or
:
: http://www.google.com/search?hl=en&lr=&q=CreateProcess&btnG=Search
:
: http://www.google.com/ always works
: {2}rIng
:
thank you very much
I succeeded.But what to do if I want end the process I've just created.
which fuction should I use?