Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to show a hint for an iconized application Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
Show a hint for an iconized application 08-Nov-02
Category
System
Language
Delphi 4.x
Views
112
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas 

I need to show some information to the user when the mouse moves over the icon in 
the tray sector. I am using the Shell_NotifyIcon funtion with NIM_ADD, NIM_DELETE 
parameters to show or not show the icon. How to show that hint?

Answer:

It is automatic, you only need to tell Shell_NotifyIcon which hint to use.

1   {Update the tray icons tooltip}
2   
3   procedure UpdateTrayTip;
4   var
5     nim: TNotifyIconData;
6   begin
7     FillChar(nim, sizeof(nim), 0);
8     nim.cbSize := Sizeof(nim);
9     nim.Wnd := wnd;
10    nim.uID := ICONID;
11    nim.uFlags := NIF_TIP;
12    StrLCopy(nim.szTip, GetTrayTooltip, Sizeof(nim.szTip) - 1);
13    Shell_NotifyIcon(NIM_MODIFY, @nim);
14  end;


GetTrayTooltip is a function that in my case returns a PChar pointing at an entry in a constant array of Pchars. You can use StrPLCopy if you have a String holding the tooltip instead. You can set the tip on NIM_ADD as well.

			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC