SDI App, Dont Want on task bar...

Posted on 2000-04-07
Last Modified: 2013-11-20
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.


Question by:VinExpert
LVL 31

Expert Comment

ID: 2692582
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.


Expert Comment

ID: 2692614
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

Author Comment

ID: 2692719

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.


Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center


Expert Comment

ID: 2692750
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
LVL 23

Expert Comment

ID: 2695626
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.
LVL 23

Expert Comment

ID: 2695628
The ITaskbarList interface is supported in shell versions 4.71 and later (Internet Explorer 4.0 with Web Integrated Desktop).

Accepted Solution

JunHaan earned 50 total points
ID: 2853352
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! :)


Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sumDigits challenge 9 170
string initialization in java 11 115
FizzBuzz challenge 9 82
sumHeights2  challenge 7 117
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question