Discussion:
Show/Hide my program in the task bar
(too old to reply)
Icyculyr
2008-10-12 06:31:32 UTC
Permalink
Hi, I was wondering how I can show/hide my program in the task bar,
Can anyone let me know?

Kind Regards
Icyculyr
Christian ASTOR
2008-10-12 07:27:56 UTC
Permalink
Post by Icyculyr
Hi, I was wondering how I can show/hide my program in the task bar,
A window is displayed in the Taskbar if
ext.style & WS_EX_APPWINDOW or
it's visible (IsWindowVisible() or (style & WS_VISIBLE)),
it's not owned (GetWindow(hWnd, GW_OWNER) == NULL),
ext.style has not WS_EX_TOOLWINDOW or WS_EX_NOACTIVATE
Icyculyr
2008-10-13 00:25:52 UTC
Permalink
Great thanks,
I do not quite understand how I would remove it, I want my window to be
visible (it's not owned), but I don't want it to show the task bar button,
I'm unsure how to do this other than hiding the window, which I don't want
to do.

Is this possible..?

Kind Regards
Icyculyr
Post by Christian ASTOR
Post by Icyculyr
Hi, I was wondering how I can show/hide my program in the task bar,
A window is displayed in the Taskbar if
ext.style & WS_EX_APPWINDOW or
it's visible (IsWindowVisible() or (style & WS_VISIBLE)),
it's not owned (GetWindow(hWnd, GW_OWNER) == NULL),
ext.style has not WS_EX_TOOLWINDOW or WS_EX_NOACTIVATE
rt15
2008-10-13 12:11:16 UTC
Permalink
Hi (And sorry for my horrible english),

Read carefully at Christian Astor post. He explain the neccessary
reasons in order to have your window displayed in the taskbar. So if
you create a window that don't respect these conditions, your window
won't be anymore in the taskbar.

For example, you can use exStyle WS_EX_TOOLWINDOW.

CreateWindowEx(WS_EX_TOOLWINDOW, ...);

You can also use SetWindowLong to affect the extended style of an
existing window.
Icyculyr
2008-10-14 02:11:33 UTC
Permalink
Thanks, I found out about WS_EX_TOOLWINDOW, however I have one problem with
it,
I want my program to show in the "Alt + Tab" menu, but not in task bar,

WS_EX_TOOLWINDOW removes from both, is there anyway to keep it in the Alt
Tab Menu?

Kind Regards
Icyculyr
Post by rt15
Hi (And sorry for my horrible english),
Read carefully at Christian Astor post. He explain the neccessary
reasons in order to have your window displayed in the taskbar. So if
you create a window that don't respect these conditions, your window
won't be anymore in the taskbar.
For example, you can use exStyle WS_EX_TOOLWINDOW.
CreateWindowEx(WS_EX_TOOLWINDOW, ...);
You can also use SetWindowLong to affect the extended style of an
existing window.
Christian ASTOR
2008-10-14 06:16:33 UTC
Permalink
Post by Icyculyr
Thanks, I found out about WS_EX_TOOLWINDOW, however I have one problem with
it,
I want my program to show in the "Alt + Tab" menu, but not in task bar,
WS_EX_TOOLWINDOW removes from both, is there anyway to keep it in the Alt
Tab Menu?
You can use ITaskbarList interface (::DeleteTab(), ...)
Icyculyr
2008-10-14 10:20:35 UTC
Permalink
Thanks, I am having trouble finding the ITaskbarList...

I searched for it in MSDN, and did: #include <shobjidl.h>, but I still can't
see it...

I read that it said, You do not implement ITaskbarList; it is implemented by
the Shell,

I found IShellLink, and saw it had this in it's header "shobjidl.idl", I
tried including that, didn't work, it's not .lib, so I don't think linking
it will work...?

Can you help here, sorry.

Kind Regards
Icyculyr
Christian ASTOR
2008-10-14 14:19:53 UTC
Permalink
Post by Icyculyr
Thanks, I am having trouble finding the ITaskbarList...
I searched for it in MSDN, and did: #include <shobjidl.h>, but I still can't
see it...
Yes, you just have to #include <shobjidl.h>
Your Windows SDK must not be too old, otherwise update it.
Icyculyr
2008-10-14 22:56:03 UTC
Permalink
Thanks, how do you tell if it's #include <shobjidl.h> or #include
"shobjidl.h".. I always get confused with those.

Kind Regards
Icyculyr
Nathan Mates
2008-10-14 23:21:02 UTC
Permalink
Post by Icyculyr
Thanks, how do you tell if it's #include <shobjidl.h> or #include
"shobjidl.h".. I always get confused with those.
Solution #1: read the MSDN article, and copy what it says.

Solution #2: Think! Basically, if it came with the compiler or a
Microsoft SDK (e.g. DirectX), then use #include <...>. Or, flip the
question around -- "if I didn't write it or download some 3rd party
source, then I should use #include "..."".

Nathan Mates

--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Icyculyr
2008-10-15 00:52:55 UTC
Permalink
Erm ok thanks.

Kind Regards
Icyculyr

Loading...