Use the Shell_NotifyIcon function to send messages to add, modify, or delete icons from the status area. The parameters for Shell_NotifyIcon include the identifier of the message to send and the address of a NOTIFYICONDATA structure. The structure members contain information that the system needs to process the specified message.
To add an icon to the taskbar's status area, send the NIM_ADD message. The NOTIFYICONDATA structure that accompanies the message specifies the handle of the icon, the identifier of the icon, and any ToolTip text for the icon. If the Show Clock check box in the taskbar properties is selected, the system places the icon to the immediate left of the clock. Otherwise, the icon appears on the right side or at the bottom of the taskbar. Any existing icons are shifted to the left to make room for the new icon.
You can delete an icon from the status area by sending the NIM_DELETE message. You can send the NIM_MODIFY message to modify the information that the system maintains for a taskbar icon, including its icon handle, ToolTip text, and callback message identifier.