20. How do I stop my application appearing on the taskbar?
There is more than one way to skin a cat (never understood
that proverb...perhaps it depends on whether you boil the cat first? I dunno, anyway,
we're digressing), and there is more than one way to stop a window appearing on the
taskbar.
- Rather than WS_EX_APPWINDOW, give your window the
WS_EX_TOOLWINDOW extended style. Since toolbars don't appear on the taskbar, this will
prevent it appearing there. Unfortunately, this has some rather negative repercussions on
the appearance of your window : it gets a thin caption with smaller title, and loses its
system menu. This is not acceptable to many people.
- Windows owned by an invisible window won't appear on the
taskbar. "Great", say you, "but my app is dialog based, so what now Mr
Smarty ?". Well, you can either recast your dialog app as an SDI with a hidden main
window, and have that main window shown at startup, or you can create your own hidden
window and set that as your dialogs owner, or you could just go look at tip
# 26, which explains the best way....