You can use the RunPopupMenu function (found in the User Interface library) to display a right-click context menu.
To use it in your program you can create a callback function for your panel and in its EVENT_RIGHT_CLICK event handler case call this function to display the context menu.
Now, the thing about the RunPopupMenu function is that it actually displays items found within a "menu-bar" designed within the CVI User Interface Editor. So make sure that you design a menu-bar first, and then reference it in the RunPopupMenu function.
I have attached an example project that illustrates a simple right-click context menu's use.
Jason F.
Applications Engineer
National Instruments
www.ni.com/ask