GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 29-Dec-2007, 05:17
shobhit.ra shobhit.ra is offline
New Member
 
Join Date: Dec 2007
Posts: 3
shobhit.ra is on a distinguished road
Question

Display a small popup message in the system tray icon.


Hello everyone.

I have a Client/Server application.
My client application is running in hidden mode in the startup. Only its icon is displaying in the system tray.

When server application that is running on other PC sends any message, then when I click on the icon of client application on my PC it displays the messages sent by server on the dialog.

Actually I have to display a small popup message "One message received" or something else over the icon in the system tray when server sends any message.

What should I do. Please suggest me. If anyone have done something for this then tell me.
I have to do this in MFC.
  #2  
Old 29-Dec-2007, 10:43
dlp dlp is offline
Member
 
Join Date: May 2006
Posts: 157
dlp has a spectacular aura about

Re: Display a small popup message in the system tray icon.


Shell_IconNotify, process Windows Messages. Here's a code guru example:
http://www.codeguru.com/cpp/controls...cle.php/c5933/
  #3  
Old 30-Dec-2007, 04:34
shobhit.ra shobhit.ra is offline
New Member
 
Join Date: Dec 2007
Posts: 3
shobhit.ra is on a distinguished road
Question

Re: Display a small popup message in the system tray icon.


Quote:
Originally Posted by dlp
Shell_IconNotify, process Windows Messages. Here's a code guru example:
www.codeguru.com

hi
thanks for the reply.
but I have already done this. My applications icon is displaying in the system tray.
The actual problem is that I have Client/server application. My appl. is Client.
Which icon is displaying in the system tray. when server appl. running on other PC send any message to my client application. then when I click on the Client icon it displays the Dialog with the messages sent by client.

But I have to display a small popup message over the Client appl. icon in the system tray without displaying the dialog when it receives any mesage from the server.

Please help me for this.
Reply me soon.
thanks
  #4  
Old 31-Dec-2007, 09:26
dlp dlp is offline
Member
 
Join Date: May 2006
Posts: 157
dlp has a spectacular aura about

Re: Display a small popup message in the system tray icon.


Something like this:
CPP / C++ / C Code:
NOTIFYICONDATA nid;
nid.cbSize = sizeof( NOTIFYICONDATA );
nid.hWnd = m_hWnd; // or whatever HWND you provided when you created it
nid.uID = ID_OF_TRAY_ICON // or whatever ID you provided when you created it
nid.uFlags = NIF_INFO;
nid.uTimeout = 1; // In milliseconds. Min value is 10 seconds, max is 30 seconds. If outside of range, it automatically takes closest limit
nid.dwInfoFlags = NIIF_INFO;
strcpy( nid.szInfo, "Your message here" );
strcpy( nid.szInfoTitle, "Title of message here" );

Shell_NotifyIcon( NIM_MODIFY, &nid );

Give it a shot, let me know how it went.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Message Class TransformedBG C++ Forum 5 29-Nov-2006 21:28
problem with system() and win32 shell lordfuoco C++ Forum 0 27-Jun-2006 03:09
Help with a complex program lordfuoco C++ Forum 5 24-Jun-2006 06:03
How to minimize window in to system tray using WIN32 abhisekjana MS Visual C++ / MFC Forum 2 04-Apr-2006 20:10
How to minimize a application to the system tray? Thomas555 C++ Forum 12 20-May-2005 13:35

Network Sites: GIDNetwork · GIDApp · GIDBlog · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 17:15.


vBulletin, Copyright © 2000 - 2014, Jelsoft Enterprises Ltd.