Click to See Complete Forum and Search --> : How to get the Menu of the Main Frame


Jaime
August 31st, 1999, 10:56 PM
hi all..

I'm programming an application that has a splitter window with 2 views. My problem is that I need to get the items of 1 submenu of the main menu to be displayed as trackpopupmenu when the user clicks the right mouse button.

The way: CMenu* pmenu = GetParent()->GetMenu() doesn't work since the view was created using the RUNTIME_CLASS macro this way:


m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftPaneView), CSize(rect.Width()/3, 0), pContext) )




How can I do it?
Thanks

Jaime

Timo Hahn
September 1st, 1999, 01:25 AM
Try

AfxGetMainWnd()->GetMenu()




Timo