Click here to Skip to main content
15,911,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CryptEncrypt Pin
devvvy1-Dec-02 20:43
devvvy1-Dec-02 20:43 
QuestionHow can I multiple single instance application ? Pin
AhMan1-Dec-02 18:12
AhMan1-Dec-02 18:12 
AnswerRe: How can I multiple single instance application ? Pin
geo_m2-Dec-02 2:47
geo_m2-Dec-02 2:47 
GeneralError with OLE DB Pin
deffer1-Dec-02 18:11
deffer1-Dec-02 18:11 
GeneralStill looking for book Pin
Steven M Hunt1-Dec-02 17:38
Steven M Hunt1-Dec-02 17:38 
GeneralScreen Saver Problem Pin
Angelzzzzz1-Dec-02 17:19
Angelzzzzz1-Dec-02 17:19 
GeneralRe: Screen Saver Problem Pin
Jase Jennings2-Dec-02 0:04
Jase Jennings2-Dec-02 0:04 
Generalhowto? animate system tray icon tool tip text Pin
Fred Koschara1-Dec-02 17:02
professionalFred Koschara1-Dec-02 17:02 
When my application is minimized to the task bar, updating the window title
updates the tool tip text in real time from my OnTimer() handler. Thus, if the
mouse cursor hovers over the application icon in the task bar, I can display a
countdown timer. However, if the program is minimized to the system tray, the
tool tip is only updated when I move the mouse cursor away and back, forcing
the tip to be freshly drawn: It seems that Windows fetches the tool tip text
for the system tray icon once when the mouse hovers first over the icon, and
never again.

I've spent many hours following leads from doing searches on Google,
CodeProject and CodeGuru for "system tray tool tip real time" and all I find
are basic articles about how to add the icon to the system tray, or animate the
icon itself.

The m_IconData structure is properly set up in the InitDialog() method, and
displays the system tray icon correctly:

m_IconData.cbSize = sizeof(NOTIFYICONDATA);
m_IconData.hWnd = m_hWnd;
m_IconData.uID = 0;
m_IconData.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
m_IconData.uCallbackMessage = WM_TRAY_NOTIFY;
m_IconData.hIcon = pApp->m_hIcon;
GetWindowText(csItem); // known to be <63 chars. here
strcpy(m_IconData.szTip,csItem);

Shell_NotifyIcon(NIM_ADD,&m_IconData);

This is the code I'm using in my OnTimer() routine, which does not update the
tool tip text in real time:

GetWindowText(m_IconData.szTip,63); // read updated title text
m_IconData.szTip[63] = '\0'; // insure C string terminated
Shell_NotifyIcon(NIM_MODIFY,&m_IconData); // update the tool tip text

The tool tip text _is_ being updated, just not on the screen.

How do I get the screen to update?

TIA.

________________________________________________________________
L5 Software Development - "out of this world" sites and software

ThmIndxr(tm), the *only* HTML thumbnail/indexer you need!
http://www.L5Software.com/go?ThmIndxr
wCapLock(tm), makes CapsLock work like it does on a typewriter
http://www.L5Software.com/go?wCapLock
BannerAds(tm), join multiple affiliate programs with one banner
http://www.L5Software.com/go?BannerAds
KeywordGo(tm), provides keyword access to your popular pages
http://www.L5Software.com/go?KeywordGo

Domain registration only $15.95/year, $29.95/2 years
http://FKEinternet.com/domains/

For private sector (commercial) space development, visit
http://www.L5Development.com

GeneralCreateProcess problem Pin
IGx891-Dec-02 15:09
IGx891-Dec-02 15:09 
GeneralRe: CreateProcess problem Pin
Michael Dunn1-Dec-02 16:46
sitebuilderMichael Dunn1-Dec-02 16:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.