Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Home » Tip Bank » C++
Language: C++
Expertise: Beginner
Mar 13, 1998

System Tray

Question:
Can you program C++ to allow a program run in the system tray (next to the clock) like VB? If so, is there sample code somewhere?

Answer:
This task is easier to do in C than it is in VB. Unfortunately, the code to do this is a little long to fit here.

Basically, you should use the Shell_NotifyIcon API function to add, modify, and remove icons from the system tray (or taskbar notification area). This function takes two arguments: either NIM_ADD, NIM_DELETE, or NIM_MODIFY to indicate the action you want to take, and a pointer to a NOTIFYICONDATA structure that specifies the icon and other information about the icon you are placing on the taskbar.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date