MFC程序运行后在任务栏的右下角有一个应用程序的图标,如何在这个图标上显示提示信息,比如说通过定时器检查到的某个盘符的可用剩余容量?MFC下如何实现?

解决方案 »

  1.   

    Shell_NotifyIcon参数2 NOTIFYICONDATA类型的 szTip成员,就是提示信息 
      

  2.   

    NOTIFYICONDATAszInfo
    Type: TCHAR[256]Windows 2000 and later. A null-terminated string that specifies the text to display in a balloon notification. It can have a maximum of 256 characters, including the terminating null character, but should be restricted to 200 characters in English to accommodate localization. To remove the balloon notification from the UI, either delete the icon (with NIM_DELETE) or set the NIF_INFO flag in uFlags and set szInfo to an empty string.
    或者在托盘图标添加 Balloon tooltip
      

  3.   


    错了是szTip  上面那个是使用ballon tooltip的
    szTip
    Type: TCHAR[64]A null-terminated string that specifies the text for a standard tooltip. It can have a maximum of 64 characters, including the terminating null character.
      

  4.   

    我是通过一个定时器检查比如D盘的剩余容量,执行一次定时器就要在右下角图标上显示检查结果,比如D盘还有。G.  NOTIFYICONDATA类型的 szTip成员是鼠标放到图标上显示的提示信息吧,我是要自动提示的
      

  5.   

    TrayIcon 中使用Ballon Tip  在Timer里调用...   不过对用户不友好
      

  6.   

    或者像Everest(AIDA64) HDTune 那样显示进度条或者百分比   不过可能要不停切换ICON
      

  7.   

    6楼得  huangcheng90  能不能说明白一点呀  不懂呀
     
      

  8.   

    网上有很多托盘编程的例子,google一下,或者到pudn 有很多源码
      

  9.   

    这个到网上找一下,有成熟的提示类SystemTray