I have a console program and I want to hide the console window when it executes. The only place it should be terminated must be the task manager’s processes window. How can I accomplish this?
I'm using XP.
Please help.
Thanks.
I have a console program and I want to hide the console window when it executes. The only place it should be terminated must be the task manager’s processes window. How can I accomplish this?
I'm using XP.
Please help.
Thanks.
If you never want the console to be displayed at all, why use a console program? Create a Win32 program, and simply don't create any windows or end the program. Eg:
When the program is run, nothing will show up on the screen, and you will only be able end it through the task manager. If you actually do want a console to which you can output text, it's possible to spawn a console through a Win32 program. Have a look at AllocConsole.Code:#include <windows.h> int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int) { do {} while(1); return 0; }
[email protected]
Microsoft Visual Studio .NET 2003 Enterprise Architect
Windows XP Pro
Code Tags
Programming FAQ
Tutorials