Sometimes we may want to make an app which doesn't actually need an annoying box in the taskbar. I hope this snippet will help.
- Global Declaration
Here is some short explanation about the interface used:
DECLARE_INTERFACE(iface) is used to declare an interface that does not derive from a base interface.
DECLARE_INTERFACE_(iface, baseiface) is used to declare an interface that does derive from a base interface. This is the one that is used. And the interface will be derived from
And then, let's create an alias definition for the derived interface.
STDMETHOD(QueryInterface)(THIS_ REFIID riid,LPVOID* ppvObj) PURE;
typedef ITaskbarList *LPITaskbarList;
- In the Dialog Based Class declaration
Here is up to you, whether you want to declare the
pTaskbar as an attribute of a Dialog class or not. It's not a problem, actually, since the implementation (next step) will only need the window handle (
class CMyDlg : public CDialog
Don't forget to set the
NULL in the construction method for your dialog class.
This is the function that you can use to hide the "box" in taskbar.
Try the other methods for
pTaskbar, and you will experience some stuff.
Forgive me if this article doesn't explain much. My purpose is just to provide another alternative. Since this "way" hasn't been posted yet.