Suppressing the console... 
Author Message
 Suppressing the console...

I have a program that launches another program when it is executed, but when it
is executed, I get a console that appears.  I was wondering if anyone knew how to
suppress this console when I execute my program.  I did create a Win32 console
application.  Do I need to create a different type of application or is there
code to actually have it suppressed?

Thanks,

Alex
.



Tue, 08 Jul 2003 05:47:44 GMT  
 Suppressing the console...
Alex,
    There are two ways i know of to do this:
1)  Use CreateProcess(), and use DETACHED_PROCESS as one of the
dwCreationFlags.

2)  In the child process, call FreeConsole()

Robby


Quote:

> I have a program that launches another program when it is executed,
but =
> when it=20
> is executed, I get a console that appears.  I was wondering if anyone
=
> knew how to=20
> suppress this console when I execute my program.  I did create a
Win32 =
> console=20
> application.  Do I need to create a different type of application or
is =
> there=20
> code to actually have it suppressed?

> Thanks,

> Alex
> .

Sent via Deja.com
http://www.deja.com/


Tue, 22 Jul 2003 07:28:38 GMT  
 Suppressing the console...
You could just create a Win32 Application. It will have a WinMain()
instead of main, but you can grab __argc and __argv and pass those
to your own main(). Voila - no console window.

Quote:

> Alex,
>     There are two ways i know of to do this:
> 1)  Use CreateProcess(), and use DETACHED_PROCESS as one of the
> dwCreationFlags.

> 2)  In the child process, call FreeConsole()

> Robby



> > I have a program that launches another program when it is executed,
> but =
> > when it=20
> > is executed, I get a console that appears.  I was wondering if anyone
> =
> > knew how to=20
> > suppress this console when I execute my program.  I did create a
> Win32 =
> > console=20
> > application.  Do I need to create a different type of application or
> is =
> > there=20
> > code to actually have it suppressed?

> > Thanks,

> > Alex
> > .

> Sent via Deja.com
> http://www.deja.com/

--
.Bruce Dawson, Humongous Entertainment (we're hiring).
http://www.humongous.com/
Send job applications by e-mail, post technical questions
to the newsgroups please. Thanks.


Tue, 22 Jul 2003 07:45:43 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Suppressing the console when executing program

2. Suppressing the Console Window

3. how to suppress DOS window in a console app

4. Running Console process without console ?

5. Executing a console application without it opening a console

6. Starting a console application without the console window

7. Building a Console Program without the Console Window (HELP)

8. clear console screen, and sleep() functions in the console window

9. how to use a console window in a win32 application..-- not console application

10. Console control in console application

11. Invoking a console app and hiding the console.

12. console application pauses when mouse clicks inside the console

 

 
Powered by phpBB® Forum Software