From: C++8x on 19 Feb 2010 15:23 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.
|
Pages: 1 Prev: how to store the listcontrol values into file Next: MVP Award... |