如何在运行时更新任务栏图标的工具提示文本? [英] How to update tooltip text of tray icon at runtime?

查看:146
本文介绍了如何在运行时更新任务栏图标的工具提示文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我被困在某一点.我已经制作了一个应用程序,其中我要在其图标的工具提示中以百分比显示任务的进度状态.我该怎么办?

以下是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.


这篇关于如何在运行时更新任务栏图标的工具提示文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆