中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 程序开发 > 编程语言 > C/C++
在程序中使用 Windows的Task Bar
作者:firetoucher 时间:2006-06-08 12:18 出处:网络转载 责编:LOKI
              摘要:暂无
在程序中使用 Windows的Task Bar。 Windows的Task Bar是一标准控件。 使用到的结构是NOTIFYICONDATA: typedef struct _NOTIFYICONDATA { DWORD cbSize; HWND hWnd; UINT uID; UINT uFlags; UINT uCallbackMessage; HICON hIcon; char szTip[64]; } NOTIFYICONDATA, *PNOTIFYICONDATA; Contains information that the system needs to process taskbar status area messages. cbSize :Size of this structure, in bytes. hWnd : Handle to the window that will receive notification messages associated with an icon in the taskbar status area. uID :Application-defined identifier of the taskbar icon. uFlags: Array of flags that indicate which of the other members contain valid data. This member can be a combination of the following: NIF_ICON The hIcon member is valid. NIF_MESSAGE The uCallbackMessage member is valid. NIF_TIP The szTip member is valid. uCallbackMessage : Application-defined message identifier. The system uses this identifier for notification messages that it sends to the window identified in hWnd. These notifications are sent when a mouse event occurs in the bounding rectangle of the icon. hIcon :Handle to the icon to add, modify, or delete. szTip : Tooltip text to display for the icon. 使用的通信函数是Shell_NotifyIcon: WINSHELLAPI BOOL WINAPI Shell_NotifyIcon( DWORD dwMessage, PNOTIFYICONDATA pnid); Sends a message to the system to add, modify, or delete an icon from the taskbar status area. Returns nonzero if successful, or zero otherwise. dwMessage : Message value to send. This parameter can be one of these values: NIM_ADD Adds an icon to the status area. NIM_DELETE Deletes an icon from the status area. NIM_MODIFY Modifies an icon in the status area. pnid : Address of a NOTIFYICONDATA structure. The content of the structure depends on the value of dwMessage. 通过上面的结构和函数可以很容易把我们的程序做得更加professional.
关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有