• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

SDI App, Dont Want on task bar...

Hi All,

I have a SDI app with minimize, maximize buttons. Now I dont want it to appear on the task bar at all(or on some condition). Now i used the WS_EX_TOOLWINDOW style in the PreCreateWindow() of the mainframe. This works as it prevents the task bar button from display. But it also removes the minimize and maximize buttons. I want the minimize and maximize and close buttons and also I dont want to display it on the task bar.


Vinayak Kumbar
Vinayak Kumbar
1 Solution
Hi VinExpert,

You could create a invisible window with WS_EX_TOOLWINDOW style and set it as parent of your mainframe. But then the mainframe will also not appear in TaskManager's application list or when switching between applications with ALT-TAB.

Create a parent window of you main window which is invisible and that should remove it from the systray

also you may want to look at ITaskbarList as this allows you to add and remove items on the systray at will
Vinayak KumbarSr Program ManagerAuthor Commented:

Ok, let me tell my requirements in detail to some extent. I have an SDI app. There is an option in the app, to minimize to systray. And depending on that option, if user double clicks on the systray, i have to restore the app but now it should not appear on the task bar. But if I uncheck that option, then it should appear.

I will be thankfull, if u can help me with some code/sample.

Zoppo, pls give me the code.


Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

I think the ITaskBarList is what you want then - just create the object and initialise it using HrInit method and then use the DeleteTab method
If your application is targeted on Windows 9x only, you may call RegisterServiceProcess to register it as a service process. To call RegisterServiceProcess, retrieve a function pointer using GetProcAddress on KERNEL32.DLL. Use the function pointer to call RegisterServiceProcess.
The ITaskbarList interface is supported in shell versions 4.71 and later (Internet Explorer 4.0 with Web Integrated Desktop).
You could actually do that by modifying Chris Maunder's real neat CSystemTray class to fit your application's needs...


You would also be interested in Dominik Filipp's article on hiding the taskbar icon dynamically...


And you should be able to figure out the rest.
Good Luck! :)

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now