NI::CNiSystemTrayIcon

Hello
Yesterday I tried to add system tray icon to my C++ (MFC, MS Visual Studio 7.1.3088) application. NI::CNiSystemTrayIcon class provides this, so I thought it will be easy. Well, maybe it is, but not for me :-). I found out that even adding the following line:
NI::CNiSystemTrayIcon system_tray_icon;
to my CWnd - derived main window class (sidenote: I'm using MFC but not Document/View, MDI or other MS inventions, just plain MFC CWnd and my own derived classes) causes assertion failure on application startup. Please note that I don't call any methods on this class (except constructor, which of course gets called automatically) and yet it causes assertion failure!
I also tried to create NI::CNiSystemTrayIcon dynamically, using operator new, when my main window gets created (just after Create returns).
That causes assertion failure, too, when application is run in debug mode (traced). No assertion failure occurs if I just run executable file (debug version, but run independently), thought.
My question is: how to use CNiSystemTray icon properly? What I'm doing wrong?
Best regards
Michal

Hi Michal,
There is an example using CNiSystemTrayIcon that is installed with Measurement Studio. I would recommend taking a look at this example, seems like that is exactly what you're looking for. The example is located at
C:\Program Files\National Instruments\MeasurementStudio\VC\Examples\Utility\SimpleSystemTrayIcon
I hope this helps.
SijinK
National Instruments.

Similar Messages

Maybe you are looking for

  • Calling Soap Action in Soap Receiver

    Hi ALL, I have a requirement where i have a WSDL file which contains multiple actions and multiple Soap Action Parameters , whereas i need to combine all the Soap action Parameters into single SOAP Parameter and call it in my SOAP action parameter at

  • I can't find my programs!

    I have downloaded, installed, and registered my product. When I first got the programs I used Bridge and Photoshop a bit, and it worked fine. But now, I've gone to use them again, and I can't find the programs! Under "Adobe" on my start menu is just

  • Handling digitally signed and encrypted emails

    Hi all, Is it possible to handle digitally signed emails with LiveCycle ES? And what about encrypted emails? Sincerely Kim Christensen

  • Swaps in ST02

    Hi all, We just increased the program buffer from 850 MB to 950 MB 3 weeks back and then to 1050 MB a week back.The system looks normal for a few days and then again i can see the swpas increaing.We already have 16 GB of memory on a 64bit Win NT plat

  • Cisco Security Manager - Integration with LMS/DCR

    Following on from my posts in: http://forum.cisco.com/eforum/servlet/NetProf?page=netprof&forum=Network%20Infrastructure&topic=Network%20Management&topicID=.ee71a02&fromOutline=&CommCmd=MB%3Fcmd%3Ddisplay_location%26location%3D.2cc16e9f How do I conf