简体   繁体   English

C / C ++控制台Windows WIN32

[英]C/C++ Console Windows WIN32

I know how to "hide" them. 我知道如何“隐藏”它们。 I know about FreeConsole(); 我知道FreeConsole(); and then finding the handle and changing it's attributes. 然后找到句柄并更改其属性。 However with these methods the window still pops up for a second than goes away. 但是,使用这些方法时,窗口仍然弹出一秒钟而不是消失。 How can I stop it from showing up completely? 如何阻止它完全显示?

Have you considered creating a windows application (with windows subsystem ) instead of a console application? 您是否考虑过创建Windows应用程序(带有Windows子系统 )而不是控制台应用程序? That should hide the console window all together. 那应该一起隐藏控制台窗口。

Try looking at WinMain 尝试看看WinMain

I believe you need to be a GUI application to not have the console displayed. 我相信您需要成为GUI应用程序才能不显示控制台。 Check out /SUBSYSTEM:WINDOWS 检出/ SUBSYSTEM:WINDOWS

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM