VC6中的“隐藏控制台"窗口 [英] Hiding Console window in VC6
问题描述
大家好
我正在VC 6中编写应用程序.
在Win32控制台应用程序格式中.
我想在.exe启动时立即隐藏控制台窗口,而不停止exe.此exe不需要用户交互.
我想在没有PC用户的情况下在我不在的情况下在PC上运行该应用程序,这就是为什么我希望以某种方式立即关闭控制台窗口的原因.
如果有人从任务管理器中关闭它,那就顺其自然.
如果有解决方案,我将按照以下步骤操作
1.启动cmd
2.执行.exe,(它应立即隐藏控制台窗口)
3.如果需要,我将从任务管理器中将其停止.
谢谢
kanade
Hi All
I am writing a application in VC 6
in Win32 console application format.
I want to hide the console window as soon as .exe starts without stopping the exe . this exe do not require interaction from the user.
I want to run the application on a PC in my absence, without obvious knowledge of a PC user, that is why i want the console window to be closed immediately somehow.
If someone is closing it from task manager let it be.
if there is a solution i shall be following these steps
1. start cmd
2. execute the .exe, ( it should hide the console window immidiately)
3. i will stop it from task manager if required.
Thanks
kanade
推荐答案
然后不要将其创建为控制台应用程序.创建一个Windows应用程序,但不创建任何可见窗口.如果需要处理消息,则可能需要隐藏的窗口.
Do not create it as a console app then. Create a windows-app but do not create any visible windows. You may want a hidden window if you need to handle messages.
这篇关于VC6中的“隐藏控制台"窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!