如何在运行时更新任务栏图标的工具提示文本?
问题描述:
大家好
我被困在某一点.我已经制作了一个应用程序,其中我要在其图标的工具提示中以百分比显示任务的进度状态.我该怎么办?
以下是Icon的创建过程:
Hi All
I am stuck at one point. I have made an application in which I want to show the progress status of a task in percentage in the tool-tip of its icon. How can I do this?
Below is the creation procedure of Icon:
HINSTANCE hInstance = AfxGetResourceHandle();
CString strToolTipText = _T("This is a Tray Icon - Right click on me!");
// Create the tray icon
if (!TrayIcon.Create(hInstance,
theApp.GetMainWnd()->GetSafeHwnd(), // Parent window
WM_ICON_NOTIFY, // Icon notify message to use
strToolTipText, // tooltip
::LoadIcon(hInstance, (LPCTSTR)IDR_MAINFRAME),
NULL))
return FALSE;
我想更新"strToolTipText"运行时.请为此建议我一些.我在Application类中完成所有这些操作.图片中没有对话框.
在此先感谢
I want to update ''strToolTipText'' runtime. Please suggest me something for this. I do this all in Application class. No dialog is in picture.
Thanks in advance
答
您无法更新它!
因此,删除旧的工具提示并创建一个新的提示.
you cant update it!!!
So delete the old tooltip and create a new.