the system() function

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

Is anyone knows how to remove the Dos window thanks.
Yang Hui


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!