开发者

How to make a console program doesn't have console window

开发者 https://www.devze.com 2022-12-21 05:27 出处:网络
I\'m writing a console program. The program do开发者_高级运维esn\'t print anything. So, it doesn\'t need to a console window.

I'm writing a console program.

The program do开发者_高级运维esn't print anything.

So, it doesn't need to a console window.

I tried to call FreeConsole() function at program starting point.

When I execute the program from windows explorer, a console window appears and then disappears.

But I wish the console window never appears.

How can I do that?

Thanks in advance.


If you are using Visual Studio .Net then create a normal console application and change the output type to Windows application.


Use WinMain instead of main as your program's entry point: WinMain at MSDN

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号