CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 1999
    Posts
    15

    How not to have a menu in a regular MFC app ?

    Hi,
    I have a regular MFC app which I created through the AppWiz.
    I don't want to have the menu. How can I do it ?

    Any input will be appreciated.

    -Thanks!



  2. #2
    Join Date
    May 1999
    Location
    Seattle, WA USA
    Posts
    423

    Re: How not to have a menu in a regular MFC app ?

    in the InitInstance method of your "theApp" class, there should be a call to ::LoadMenu. just delete that call and no menu will be loaded.

    --michael


  3. #3
    Join Date
    May 1999
    Posts
    15

    Re: How not to have a menu in a regular MFC app ?

    Mike, I don't see any call to LoadMenu() in initinstance().


  4. #4
    Join Date
    May 1999
    Location
    Seattle, WA USA
    Posts
    423

    Re: How not to have a menu in a regular MFC app ?

    sorry, if you have a Doc/View kinda app, the the DocTemplate creates the menu for you. In this case, you can just call
    SetMenu (NULL);
    to get rid of it (If you have the standard initinstance created by the APWiz, you would just call pMainFrame->SetMenu (NULL); at the end of the method)

    --michael


  5. #5
    Join Date
    May 1999
    Posts
    15

    Re: How not to have a menu in a regular MFC app ?

    Mike,
    Thanks a lot it worked!!


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