?
Solved

Systray needs update when explorer.exe crashes.

Posted on 2006-05-05
3
Medium Priority
?
214 Views
Last Modified: 2010-05-01
When explorer.exe crashes and restarts, some applications (ie: mIRC) replace their icon in the SysTray.  How do I go about getting my application to do the same?

-Javin
0
Comment
Question by:Javin007
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 16617570
Use the RegisterWindowMessage() API to look for the TaskBarCreated message.

Take a look here:
http://www.experts-exchange.com/Programming/Programming_Platforms/Win_Prog/Q_20126354.html

An example of using TASKBARCREATED with RegisterWindowMessage() here:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_10255427.html

So whenever you get the TaskBarCreated messaged, add your tray icon again using the Shell_NotifyIcon() API with the NIM_ADD message.
0
 
LVL 4

Author Comment

by:Javin007
ID: 16617810
So is this a constant check I'll have to do, or will it fire an event somewhere?

0
 
LVL 4

Author Comment

by:Javin007
ID: 16617879
Ah, just read the part about subclassing.

Thanks for the answer!

-Javin
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

840 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