Reload Icon when Explorer Crashes
-
Can someone point me in the right direction? The only way to access my app is via its tray icon. When Explorer does the nasty, it takes all the icons down with it. How can I detect that it has crashed and that my app needs to reinstall its icon? I'm using Chris' CSystemTray, and PJ's CInstanceChecker, and Windows 98 (if that helps). Thanks. :suss: -Jason nirgle.bitdevil.com
-
Can someone point me in the right direction? The only way to access my app is via its tray icon. When Explorer does the nasty, it takes all the icons down with it. How can I detect that it has crashed and that my app needs to reinstall its icon? I'm using Chris' CSystemTray, and PJ's CInstanceChecker, and Windows 98 (if that helps). Thanks. :suss: -Jason nirgle.bitdevil.com
In Win 2K when explorer crashes [that's rare, very rare] it has the decency to bring back all the icons on the task tray :-) I guess what the user could do is to run your program again and your program can check for an earlier version using a mutex and then re-add the icon to the tray. You can check for its existence by sending a NIM_MODIFY message and if it fails it means the icon is not there [I hope so] Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
-
Can someone point me in the right direction? The only way to access my app is via its tray icon. When Explorer does the nasty, it takes all the icons down with it. How can I detect that it has crashed and that my app needs to reinstall its icon? I'm using Chris' CSystemTray, and PJ's CInstanceChecker, and Windows 98 (if that helps). Thanks. :suss: -Jason nirgle.bitdevil.com
personally, i'd install a timer, and in the timer proc (attempt to) remove the icon and reinstall it again. doing this every 5 seconds or so won't take much cpu time and should work ok. Sorry to dissapoint you all with my lack of a witty or poignant signature.
-
Can someone point me in the right direction? The only way to access my app is via its tray icon. When Explorer does the nasty, it takes all the icons down with it. How can I detect that it has crashed and that my app needs to reinstall its icon? I'm using Chris' CSystemTray, and PJ's CInstanceChecker, and Windows 98 (if that helps). Thanks. :suss: -Jason nirgle.bitdevil.com
How about doing it the way that Microsoft recommends... Look up the "TaskbarCreated" registered message (requires that IE 4.0 or greater is installed). It is sent by Explorer whenever the Taskbar is (re)created, so if Explorer crashes and restarts, your app will get sent the message, and can re-add its icon. This is the way Services can install an Icon to the Taskbar's Status Area* when someone logs on. * Calling it a "Tray Icon" is a common mistake. Peace! -=- James.
-
How about doing it the way that Microsoft recommends... Look up the "TaskbarCreated" registered message (requires that IE 4.0 or greater is installed). It is sent by Explorer whenever the Taskbar is (re)created, so if Explorer crashes and restarts, your app will get sent the message, and can re-add its icon. This is the way Services can install an Icon to the Taskbar's Status Area* when someone logs on. * Calling it a "Tray Icon" is a common mistake. Peace! -=- James.
Thanks for the response; I'm looking into it now. And, what's the best way to crash Explorer (besides using it normally)? Gotta love testing :) -Jason nirgle.bitdevil.com
-
How about doing it the way that Microsoft recommends... Look up the "TaskbarCreated" registered message (requires that IE 4.0 or greater is installed). It is sent by Explorer whenever the Taskbar is (re)created, so if Explorer crashes and restarts, your app will get sent the message, and can re-add its icon. This is the way Services can install an Icon to the Taskbar's Status Area* when someone logs on. * Calling it a "Tray Icon" is a common mistake. Peace! -=- James.
****James R. Twine wrote: Calling it a "Tray Icon" is a common mistake. Err, why is that a mistake? --Mike-- My really out-of-date homepage He who laughs last, didn't get the punchline and is just laughing so he won't look silly. Sonork - 100.10414 AcidHelm Big fan of Alyson Hannigan.
-
In Win 2K when explorer crashes [that's rare, very rare] it has the decency to bring back all the icons on the task tray :-) I guess what the user could do is to run your program again and your program can check for an earlier version using a mutex and then re-add the icon to the tray. You can check for its existence by sending a NIM_MODIFY message and if it fails it means the icon is not there [I hope so] Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
Not true. I have never had an explorer crash in W2K where the task try icons were restored properly. Best Regards
-
Thanks for the response; I'm looking into it now. And, what's the best way to crash Explorer (besides using it normally)? Gotta love testing :) -Jason nirgle.bitdevil.com
> And, what's the best way to crash Explorer (besides using it normally)? On NT/Win@K, Task Manager, Processes tab, select Explorer, right-click and select End Process. On Win9x, CTRL-ALT-DELETE, (while the task list dialog is up, click on the Explorer window (the desktop) a few times for about 5-10 seconds, and select Explorer int the dialog and try to end it. You should get the end task dialog for Explorer. Peace! -=- James.
-
****James R. Twine wrote: Calling it a "Tray Icon" is a common mistake. Err, why is that a mistake? --Mike-- My really out-of-date homepage He who laughs last, didn't get the punchline and is just laughing so he won't look silly. Sonork - 100.10414 AcidHelm Big fan of Alyson Hannigan.
Michael Dunn wrote: Err, why is that a mistake? Because calling the Taskbar Notification Area the/a "Tray" is actually a mistake. Hence, calling a Taskbar Noticification Area Icon a "Tray Icon" is also a mistake. Sorta like the widely experienced mixup with "COM" being called both "Component Object Model" and "Common Object Model". Peace! -=- James.
-
Not true. I have never had an explorer crash in W2K where the task try icons were restored properly. Best Regards
Bill Leibold wrote: Not true. I have never had an explorer crash in W2K where the task try icons were restored properly. I think that Nish is just lucky enough to have apps on his system that correctly handle that situation (i.e. the "TaskbarCreated" message :))! Peace! -=- James.