How does tray icon redisplay after explorer crash?

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

docbrazen
Posts: 1
Joined: 2004-06-08 09:18

How does tray icon redisplay after explorer crash?

Post by docbrazen » 2004-06-08 09:26

Hello,

I was wondering how DC++ knows when to redisplay the tray icon in the event of an explorer crash? The only way I have heard of is to constantly redisplay the icon at set intervals. How did DC++ manage to fix this problem? I noticed you guys fixed it in version 0.174. Is there a way to detect if explorer crashes?

Thanks,
docbrazen

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 14:32

Post by Sedulus » 2004-06-08 11:07

in MainFrm it looks like this:

Code: Select all

trayMessage = RegisterWindowMessage("TaskbarCreated");

Code: Select all

MESSAGE_HANDLER(trayMessage, onTray)

Code: Select all

LRESULT onTray(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { 
   updateTray(true);
   return 0;
};


a google query for "RegisterWindowMessage(\"TaskbarCreated\")" turned up:
http://www.valhallalegends.com/docs/systemtrayicon.htm
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

Who is online

Users browsing this forum: Google [Bot] and 0 guests