CWnd::OnContextMenu
Visual Studio 2010
Called by the framework when the user has clicked the right mouse button (right clicked) in the window.
afx_msg void OnContextMenu( CWnd* pWnd, CPoint pos );
You can process this message by displaying a context menu using the TrackPopupMenu.
If you do not display a context menu you should pass this message onto the DefWindowProc function. If your window is a child window, DefWindowProc sends the message to the parent. Otherwise, DefWindowProc displays a default context menu if the specified position is in the window's caption.