hide application from taskbar

hide application from taskbar

Post by Paul Turelinck » Thu, 05 Jun 2003 16:54:56



Hi all,

To be clear: I'm not trying to keep a dialog that my
application creates off the taskbar. My question involves
a spawned Win32 application (I only own the executable)
that performs a background task for an application I'm
writing. I launch the Win32 application using CreateProcess
(), but that don't seem to allow me hiding it. So here's
my question: does anyone know how to keep a spawned Win32
application from the taskbar?

Thanks,
Paul.

 
 
 

hide application from taskbar

Post by Alexander Gr? » Thu, 05 Jun 2003 17:54:40


I remember several flags in CreateProcess in the STARTUPINFO structure, that
control the displaying behaviour. how ever, you could also crete the
process, then WaitForInputIdle, and then enumerate the top level windows and
modifiying theirs style to be invisble.



Quote:> Hi all,

> To be clear: I'm not trying to keep a dialog that my
> application creates off the taskbar. My question involves
> a spawned Win32 application (I only own the executable)
> that performs a background task for an application I'm
> writing. I launch the Win32 application using CreateProcess
> (), but that don't seem to allow me hiding it. So here's
> my question: does anyone know how to keep a spawned Win32
> application from the taskbar?

> Thanks,
> Paul.


 
 
 

hide application from taskbar

Post by Paul Turelinck » Thu, 05 Jun 2003 19:01:38


Alexander,

I already tried some combinations of the dwCreationFlags
and STARTUPINFO values, but that didn't work. Maybe I just
missed the magic combination. It works for console
applications, but not for Win32 applications. My
application currently monitors the background task to
check when anyone closes it, so I might indeed try to
change the style after the task started. Thanks for your
advise.

Paul.

Quote:>-----Original Message-----

>I remember several flags in CreateProcess in the

STARTUPINFO structure, that
Quote:>control the displaying behaviour. how ever, you could
also crete the
>process, then WaitForInputIdle, and then enumerate the

top level windows and
>modifiying theirs style to be invisble.


Newsbeitrag

>> Hi all,

>> To be clear: I'm not trying to keep a dialog that my
>> application creates off the taskbar. My question
involves
>> a spawned Win32 application (I only own the executable)
>> that performs a background task for an application I'm
>> writing. I launch the Win32 application using
CreateProcess
>> (), but that don't seem to allow me hiding it. So here's
>> my question: does anyone know how to keep a spawned
Win32
>> application from the taskbar?

>> Thanks,
>> Paul.

>.

 
 
 

hide application from taskbar

Post by William DePalo [MVP VC++ » Fri, 06 Jun 2003 00:01:53



Quote:> To be clear: I'm not trying to keep a dialog that my
> application creates off the taskbar. My question involves
> a spawned Win32 application (I only own the executable)
> that performs a background task for an application I'm
> writing. I launch the Win32 application using CreateProcess
> (), but that don't seem to allow me hiding it. So here's
> my question: does anyone know how to keep a spawned Win32
> application from the taskbar?

Is it a console or windowed application?

If it is a console mode application, and you run on NT/2K/XP/2K+3 try using
the CREATE_NO_WINDOW flag with CreateProcess(). Another option is redirect
the standard input and output devices to pipes but it is more work.

If it is a windowed application, then you can give the main window the
WS_EX_TOOLWINDOW extended style bit. This has the side effect making the
caption somewhat smaller. If you don't like that you can waste a window.
That is, create an unowned main window and hide it. Create your real main
window specify this hidden window as owner.

If you are familiar with COM, another option is to use the ITaskBarList
interface exposed by the shell. I've not used it but I believe it is
available on 98/Me/2000/XP/2K+3.

Regards,
Will

 
 
 

hide application from taskbar

Post by Paul Turelinck » Fri, 06 Jun 2003 01:02:43


Will,

The solutions you propose are valid indeed for windows
created by my own application. But in my case, I'm
spawning a Win32 application, which poses some different
challenge. But you may have pointed me in the right
direction: according to the documentation, the
ITaskBarList interface allows me to manipulate the taskbar
buttons so I can hide the application there. What I'm
really looking for is to keep the spawned application out
of the tasklist altogether. Thanks for your advise.

Paul.  

>-----Original Message-----

message

>> To be clear: I'm not trying to keep a dialog that my
>> application creates off the taskbar. My question
involves
>> a spawned Win32 application (I only own the executable)
>> that performs a background task for an application I'm
>> writing. I launch the Win32 application using
CreateProcess
>> (), but that don't seem to allow me hiding it. So here's
>> my question: does anyone know how to keep a spawned
Win32
>> application from the taskbar?

>Is it a console or windowed application?

>If it is a console mode application, and you run on

NT/2K/XP/2K+3 try using
Quote:>the CREATE_NO_WINDOW flag with CreateProcess(). Another
option is redirect
>the standard input and output devices to pipes but it is
more work.

>If it is a windowed application, then you can give the
main window the
>WS_EX_TOOLWINDOW extended style bit. This has the side
effect making the
>caption somewhat smaller. If you don't like that you can
waste a window.
>That is, create an unowned main window and hide it.

Create your real main

- Show quoted text -

Quote:>window specify this hidden window as owner.

>If you are familiar with COM, another option is to use
the ITaskBarList
>interface exposed by the shell. I've not used it but I
believe it is
>available on 98/Me/2000/XP/2K+3.

>Regards,
>Will

>.

 
 
 

hide application from taskbar

Post by William DePalo [MVP VC++ » Fri, 06 Jun 2003 01:42:24



Quote:> The solutions you propose are valid indeed for windows
> created by my own application. But in my case, I'm
> spawning a Win32 application, which poses some different
> challenge.

Oh, I see. If it has a console there are the options I sketched. If not, you
can suggest how it shows its windows (see the wShowWindow member of the
STARTUPINFO structure passed to CreateProcess() or ShellExecute()'s nShowCmd
parameter) but an application is free to ignore the suggestion. Even if it
takes the suggestion, nothing prevents it from showing its windows later.

Quote:> But you may have pointed me in the right direction:

Cool! :-)

Quote:> Thanks for your advise.

You are welcome.

Regards,
Will