CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 1999
    Location
    Chile
    Posts
    177

    How to get the Menu of the Main Frame

    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


  2. #2
    Join Date
    Jun 1999
    Posts
    126

    Re: How to get the Menu of the Main Frame

    Try

    AfxGetMainWnd()->GetMenu()




    Timo


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured