I am trying to get a popup menu to display when the right mouse button is clicked. However CMenu::GetSubMenu() seems to be returning a NULL pointer, and I don't know why!
Here is my code:-
void CMenuView::OnContextMenu(CWnd* pWnd, CPoint point)
// TODO: Add your message handler code here
CMenu *pPopup ;
// Store popup point, and convert to client coordinates
// for the drawing functions
m_ptMsg = point;
ScreenToClient( &m_ptMsg );
Test = zooMenu.LoadMenu( IDR_MENUPOP );
if (Test == 0 )
pPopup = zooMenu.GetSubMenu( 0 );
if (*pPopup == NULL)
Thanks for your help.