Using the system tray icon (design/impl approach) 
Author Message
 Using the system tray icon (design/impl approach)

Hi,

I want to provide a system tray icon for my application.  I want it to
remain available when the main window is closed, so the users can dbl-click
the system tray icon to reopen the application, or possibly right click it
and select from a context menu for Open/Properties/etc...  I have added a
routine using Shell_Notify( ) to put the icon in the system tray.

How is this done? Specifically, do I need to handle/intercept the
WM_SYSCOMMAND ( SC_CLOSE ) so that when they try to close the app it doesn't
really close, but just hides the window? Or is there another recommended
technique?

If anyone is aware of MSJ issues or other articles discussing how to do this
I'd appreciate you pointing me to them.  Thank you!

Colin Reinhardt



Fri, 10 Sep 2004 06:43:27 GMT  
 Using the system tray icon (design/impl approach)
A common approach in this case is to create a hidden window expressly for
the purposes of accepting system tray icon messages.

Dirk


Quote:
> Hi,

> I want to provide a system tray icon for my application.  I want it to
> remain available when the main window is closed, so the users can
dbl-click
> the system tray icon to reopen the application, or possibly right click it
> and select from a context menu for Open/Properties/etc...  I have added a
> routine using Shell_Notify( ) to put the icon in the system tray.

> How is this done? Specifically, do I need to handle/intercept the
> WM_SYSCOMMAND ( SC_CLOSE ) so that when they try to close the app it
doesn't
> really close, but just hides the window? Or is there another recommended
> technique?

> If anyone is aware of MSJ issues or other articles discussing how to do
this
> I'd appreciate you pointing me to them.  Thank you!

> Colin Reinhardt



Sat, 11 Sep 2004 01:43:52 GMT  
 Using the system tray icon (design/impl approach)
See also PRB: Menus for Notification Icons Do Not Work Correctly (Q135788):

http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q13578...
-US&rnk=1&SD=msdn&FR=0&qry=Q135788&src=DHCS_MSPSS_msdn_SRCH&SPR=MSALL&

for a workaround to some undesirable behavior you may encounter.

Dirk


Quote:
> Hi,

> I want to provide a system tray icon for my application.  I want it to
> remain available when the main window is closed, so the users can
dbl-click
> the system tray icon to reopen the application, or possibly right click it
> and select from a context menu for Open/Properties/etc...  I have added a
> routine using Shell_Notify( ) to put the icon in the system tray.

> How is this done? Specifically, do I need to handle/intercept the
> WM_SYSCOMMAND ( SC_CLOSE ) so that when they try to close the app it
doesn't
> really close, but just hides the window? Or is there another recommended
> technique?

> If anyone is aware of MSJ issues or other articles discussing how to do
this
> I'd appreciate you pointing me to them.  Thank you!

> Colin Reinhardt



Sun, 12 Sep 2004 01:34:11 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. CoolHide - Help you hide/minimize window to Tray and hide icons from the system tray

2. System Tray Icon using CTrayIcon under Win2K

3. System Tray ICON for Serial PC card: uses standard serial driver

4. Looking for opinions on design approach -- using database with multiple views

5. Creating a system tray icon?

6. How to access system tray icons

7. System Tray Icons

8. System Tray Icon

9. System tray icon

10. System tray icon disappears

11. Generating a menu when the system tray icon is clicked

12. Getting a menu to pop up where the installed system tray icon is

 

 
Powered by phpBB® Forum Software