Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing icons and keeping time 1

Status
Not open for further replies.

Jonah86

Programmer
Dec 11, 2003
152
US
So here's a stupid question.

I have a program that minimized to the system tray. That works fine now :)

I'm wanting to change the icon when a certain date comes about. So I want the user to be able to have the app open all the time, and see the icon change when something comes due. I've looked at a few sources for projects that change the icon, but I'm not sure it's what I need.

Any ideas, or advice that might help me see the light?
 
Use Shell_NotifyIcon(NIM_MODIFY, @IconData).

Set all the needed fields of the IconData : TNotifyIconData record; the hIcon field is the handle of the new icon. Pay close attention to the uFlags fields (DO NOT include NIF_TIP if you are not sending a valid string in szTip).

I'm supposing you used the same Shell_NotifyIcon to start the systray application (the right way), if you used any other not-per-the-rules method (highly unadvisable) all bets are off.

buho (A).
 
Got it. I am using shell_NotifyIcon, by the way.

Thanks for the help. Things seem to be working well so far.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top