|
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
|
|
|
|
|
I'm having a problem with specifying command line arguments, as the second parameter, when calling CreateProcess. If the argument string has "-root" in it, the called program doesn't receive that. For example, if I specify "-root -server", the called program only gets "-server". Is that a bug, or an "undocumented feature"?
Thanks!
|
|
|
|
|
Pass NULL as the first param, and the entire command line (with the EXE name quoted if necessary) as the second.
bSuccess = CreateProcess ( NULL, _T("C:\\path\\to\\program.exe -root -server"), ... );
--Mike--
"Adventure. Excitement. A Jedi craves not these things."
-- Silent Bob
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I have an edit control working as a log, but when new text gets added to the control that makes the scrollbar active, it scrolls to the top so you can't see what has happened. Is it possible to set it to scroll to the bottom automatically, or is there a message you can send so it does it? I'm programming Win32 BTW.
Thanks all.
|
|
|
|
|
|
ifstream & operator >> (ifstream &ifs, const DownKind & d)
{
ifs >> d.m_strKind >> endl >> d.m_strPath >> endl >>
d.m_strSuffix >> d.m_id >> d.m_idParent >> d.m_lstSub.size()
>> endl;
return ifs;
}
ofstream & operator << (ofstream &ofs, const DownKind & d)
{
return ofs;
}
// class declare
#define DOWNKINDBASE DownKindBase
class DownKind : public DOWNKINDBASE {
public:
friend ifstream & operator >> (ifstream &ifs, const DownKind &d);
friend ofstream & operator << (ofstream &, const DownKind &);
DownKind() ;
DownKind(string, string, string, int idParent = -1);
virtual ~DownKind() { clear(); }
string getKindName();
void setKindName(string);
string getPath();
void setPath(string);
void setSuffix(string);
string getSuffix();
virtual void clone(DownKindBase *);
void load();
void save();
virtual void addChild(DownKindBase *);
DownKindBase *findByKind(string );
protected:
virtual void readFile(FILE *);
virtual void writeFile(FILE *);
virtual void clear();
virtual void setParentId(int);
virtual int getParentId();
private:
string m_strKind;
string m_strSuffix;
string m_strPath;
int m_idParent; // parent id
int m_id; // current id
list<downkindbase*> m_lstSub;
};
could u please tell me what's wrong with this code, don't laught at me.
|
|
|
|