Returns a pointer to the window where the framework routes the pop-up menu messages.

CWnd* GetMessageWnd() const;

A pointer to the window that receives the pop-up menu messages; NULL if there is no window.

When you use the method CMFCPopupMenu::Create to create a pop-up menu, you specify what window receives the menu messages.

Header: afxpopupmenu.h