943,865 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 1081
  • C++ RSS
Aug 7th, 2009
0

trayicon balloon sometimes does not show up

Expand Post »
Hello, I compiled my trayicon utility c++ code in visual studio 2005 express edition and tray icon balloons showed up successfully but later I deleted my firewall, switched on to windows firewall and now I am on another firewall software. Now i ran my same project and balloons showed up successfully but when i rebuilt it, i can't see balloons anymore. My Shell_NotifyIcon method still returns true.

Here is the code:
C++ Syntax (Toggle Plain Text)
  1. nid.cbSize = sizeof( NOTIFYICONDATA_V2_SIZE ); // i've tested NOTIFYICONDATA //and nid as well
  2.  
  3. nid.hWnd = hWnd;
  4. nid.uID = uID;
  5. nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP|NIF_INFO; nid.dwInfoFlags = 0x00000004;
  6. strcpy(nid.szInfoTitle , balloonTitle);
  7. strcpy(nid.szInfo , balloonMsg);
  8. int ret = Shell_NotifyIcon( NIM_MODIFY, &nid );
Can anybody suggest where does the problem lie? it seems it is related to OS, my OS is XP and i've even modified "EnableBalloonTips" to 1.

Faran Shabbir
Last edited by faranshabbir; Aug 7th, 2009 at 9:41 am.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
faranshabbir is offline Offline
5 posts
since Aug 2009
Aug 10th, 2009
0

Re: trayicon balloon sometimes does not show up

anyone... please????
Reputation Points: 10
Solved Threads: 0
Newbie Poster
faranshabbir is offline Offline
5 posts
since Aug 2009
Aug 10th, 2009
0

Re: trayicon balloon sometimes does not show up

Read the following Link Carefully and check for MACRO & GUID that needs to be defined in case of XP, I am assuming that you are good in understanding msdn doc. If you still find it difficult to implement I will provide you the sample.

http://msdn.microsoft.com/en-us/libr...52(VS.85).aspx

Hope the above link helps.
Reputation Points: 113
Solved Threads: 20
Junior Poster
Laiq Ahmed is offline Offline
147 posts
since Jun 2006
Aug 11th, 2009
0

Re: trayicon balloon sometimes does not show up

Click to Expand / Collapse  Quote originally posted by Laiq Ahmed ...
Read the following Link Carefully and check for MACRO & GUID that needs to be defined in case of XP, I am assuming that you are good in understanding msdn doc. If you still find it difficult to implement I will provide you the sample.

http://msdn.microsoft.com/en-us/libr...52(VS.85).aspx

Hope the above link helps.
Thanks much... it has been helpful.

The problem was here:
C++ Syntax (Toggle Plain Text)
  1. nid.cbSize = sizeof( NOTIFYICONDATA_V2_SIZE );
it should be:
C++ Syntax (Toggle Plain Text)
  1. nid.cbSize = NOTIFYICONDATA_V2_SIZE;
It is used for Windows 2000 or later versions. The prior one was returning wrong value (as expected)
Last edited by faranshabbir; Aug 11th, 2009 at 3:11 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
faranshabbir is offline Offline
5 posts
since Aug 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Random Number Generator
Next Thread in C++ Forum Timeline: insert Image





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC