如何在任务栏右下角添加一个图标,点击时会弹出一个菜单,单击内容时执行相应的操作,就同QQ那样的?

解决方案 »

  1.   

    这个看你 用的什么编程语言了,如果是用的net就是可以用控件的 
    如果是 6.0的 就用api,是shell_nitifyicondata这个api函数的。
      

  2.   


    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. 
    调用VB 和这个差不多
      

  3.   

    http://search.csdn.net/Expert/topic/1570/1570192.xml?temp=.8957025