I want to put a popup menu for my users when the right click on a CListCtrl. I need to check if they are actually on an item, or in white space. If they are on an item, a menu will be presented that says "Edit" or "Add". If they are on white space, just "Add" will be present.
How can I do this? Do I need 2 submenus? How can I tell if an item is highlighted in the list?