How to hide console window at startup ? 
Author Message
 How to hide console window at startup ?

Hello,
I want  to create a console window, that is not visible at startup.

Something like ShowWindow(hWnd,SW_HIDE) is only working with the console
window already created and visible, because you need the HWND of the
console window.

Is it possible to modify directly the STARTUPINFO structure before the
console window is created by e.g. AllocConsole()?

Does anybody have an idea?

Thanks in advance,

Ludwig.



Sat, 29 Jun 2002 03:00:00 GMT  
 How to hide console window at startup ?
Did you try using a regular win32 app, it won't show a window unless you
explicitly create one. You will still be able able to do about as much a you
need in the console app, exept for some I/O operations that you probably
don't care about since you do no want to see the window.

HTH

Stephane

Quote:
> Hello,
> I want  to create a console window, that is not visible at startup.

> Something like ShowWindow(hWnd,SW_HIDE) is only working with the console
> window already created and visible, because you need the HWND of the
> console window.

> Is it possible to modify directly the STARTUPINFO structure before the
> console window is created by e.g. AllocConsole()?

> Does anybody have an idea?

> Thanks in advance,

> Ludwig.



Sat, 29 Jun 2002 03:00:00 GMT  
 How to hide console window at startup ?
Hello,

   When your Win32 console application start
the active window is your console window.
use HWND GetActiveWindow(VOID) function
to get a handle to this window and then
use:

BOOL ShowWindow (HWND hWnd,      // handle to window
                 int  nCmdShow   // show state of window
                );

with nCmdShow SW_HIDE. Look at the help, there's
a lot of parameters that you can use to set the
desire window state.

Hope this help,
regards,

Marc Bonet

--
Is better to know useless things than
don't know anything at all

Sent via Deja.com http://www.deja.com/
Before you buy.



Sun, 30 Jun 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Hiding Dialog Window on Startup!!!

2. Hiding main window of my app at startup

3. Hide apps window on startup

4. Hiding main window of my app at startup

5. Hiding the SDI main window and taskbar icon on startup

6. Hiding MFC Dialog Window on Startup

7. Hiding the Console Window

8. Can I hide Console Window in C++????

9. Can I hide Console Window in C++????

10. Hidden window in console app

11. Hide Console Window

12. Can I hide Console Window in C++????

 

 
Powered by phpBB® Forum Software