Solved

SDI App, Dont Want on task bar...

Posted on 2000-04-07
7
240 Views
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.

Thanks,

VinExpert
0
Comment
Question by:VinExpert
7 Comments
 
LVL 30

Expert Comment

by:Zoppo
Comment Utility
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.

ZOPPO
0
 
LVL 9

Expert Comment

by:ShaunWilde
Comment Utility
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
0
 
LVL 8

Author Comment

by:VinExpert
Comment Utility
Hi,

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.

Thanks.

VinExpert
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 9

Expert Comment

by:ShaunWilde
Comment Utility
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
0
 
LVL 23

Expert Comment

by:chensu
Comment Utility
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.
0
 
LVL 23

Expert Comment

by:chensu
Comment Utility
The ITaskbarList interface is supported in shell versions 4.71 and later (Internet Explorer 4.0 with Web Integrated Desktop).
0
 
LVL 2

Accepted Solution

by:
JunHaan earned 50 total points
Comment Utility
VinExpert,
You could actually do that by modifying Chris Maunder's real neat CSystemTray class to fit your application's needs...

http://www.codeproject.com/shell/systemtray.asp

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

http://www.codeguru.com/advancedui/Toggle_taskbar_button.shtml

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

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Mac OS 9 (Classic Environment) vs. MacBook Pro OS 10 8 36
Replacement selected text 2 47
zeroFront challenge 7 71
FizzBuzz challenge 9 71
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now