If you are using CVI 5.5, there are very easy to use functions in the Programmer's Toolbox to do this (cvi\toolslib\toolbox\toolbox.fp). Under User Interface Utilities->System Tray Icons there are functions to install and remove system tray icons as well as setup popup menus for them.
Best Regards,
Chris Matthews
Measurement Studio Support Manager