-
Hide DOS window
My application uses Boarland C++ and inside this application i use a cmd line to backup and zip a file but i don't want the program to open the DOS Window i tried
ShowWindow(GetConsoleWindow(), SW_HIDE);
after i call the cmd line but it is not classing the window. Can you tell me why it is not working. I'm using WINNT.
-
That looks more like a win32 function. Have you tried msdn?
-
You also could give the caption title a name and then hide name:
Code:
SetConsoleTitle ( "blah" );
hwnd = FindWindow ( 0, "blah" );
ShowWindow ( hwnd, SW_HIDE );
Just a simple solution.
-
You could link your program as a GUI application and use a WinMain function, no more console window.
-
If you use CreateProcess() one of its parameters will create the process without a window. See MSDN for details