Isuru
Isuru

Reputation: 182

Hiding the Command Console from a MFC dialog application

I have a MFC dialog based application in which I use ::system() function to physically open a text file. When I do it the command console also opens. How can I hide the command console so that it doesn't pop up when I'm opening the text file?

Thank You!!!

Upvotes: 0

Views: 817

Answers (1)

Agnel Kurian
Agnel Kurian

Reputation: 59456

Use ShellExecute or CreateProcess instead of ::system. ::system will cause the shell (cmd.exe on windows) to be launched which is why the console window is displayed.

Upvotes: 1

Related Questions