From: C++8x on
On Feb 19, 6:44 am, Seetharam <smi...(a)gmail.com> wrote:
> I would do it like this:
>
> void CMyView::OnContextMenu(CWnd* pWnd, CPoint point)
> {
>         CMenu PopupMenu;
>         CMenu subMenu;
>         PopupMenu.CreatePopupMenu();

Thanks,

That crossed my mind, but I'm still interested in what is the MFC
way.

One of the ways the MSDN suggests to is you Attach CMenu object to an
existing menu, manipulate, than Detach() it from it. But in my case
the menu is not Attached, but created.
Is it true to think that PopupMenu (root popup) will destroy windows
menu object when its CMenu is destroyed, but subMenu's CMenu object
will not do that.