Thread: Hide DOS window

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    1

    Lightbulb 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.

  2. #2
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    That looks more like a win32 function. Have you tried msdn?

  3. #3
    Banned Yuri's Avatar
    Join Date
    Aug 2005
    Location
    Breukelen, The Netherlands
    Posts
    133
    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.

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    You could link your program as a GUI application and use a WinMain function, no more console window.

  5. #5
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    If you use CreateProcess() one of its parameters will create the process without a window. See MSDN for details

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why only 32x32? (OpenGL) [Please help]
    By Queatrix in forum Game Programming
    Replies: 2
    Last Post: 01-23-2006, 02:39 PM
  2. Window scrollbar
    By maxorator in forum Windows Programming
    Replies: 2
    Last Post: 10-07-2005, 12:31 PM
  3. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 10:50 AM
  4. dos to window
    By Eavan Hyde in forum Windows Programming
    Replies: 2
    Last Post: 03-18-2004, 01:24 AM
  5. Invoking MSWord
    By Donn in forum C Programming
    Replies: 21
    Last Post: 09-08-2001, 04:08 PM