Click here to Skip to main content
15,879,239 members

Comments by bolivar123 (Top 1 by date)

bolivar123 7-Oct-11 0:07am View    
You're welcome. You pass in the handle of the window that has the message handlers for your popup menu. I noticed by the message map macros you have the handler in your CTreeview window. That is correct the TPM_RETURNCMD flag causes the TrackPopupMenu function to hold modal until the user selects an item or dismisses the popup menu. The result of the TrackPopupMenu function call with the TPM_RETURNCMD flag is the command ID of the menu item the user chose.