user1157977
user1157977

Reputation: 917

How to hide console windows when calling system()?

currently im using system("\"C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe\""); to open up the virtual keyboard and system("TASKKILL /IM TabTip.exe /F"); to kill it

its seems working but there is always a console window poping up how can i get rid of that? thanks!

Upvotes: 1

Views: 1713

Answers (1)

Jun Ge
Jun Ge

Reputation: 420

Add below code in the beginning of your main, then create "TabTip.exe" with popen api. Because there is a hidden console in your app now, TabTip.exe created by the popen won't be shown.

AllocConsole();
ShowWindow(GetConsoleWindow(), SW_HIDE);

Upvotes: 9

Related Questions