Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. How to remove the initial menu created by the MFC Wizard

How to remove the initial menu created by the MFC Wizard

Scheduled Pinned Locked Moved IT & Infrastructure
questionc++tutorial
3 Posts 3 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sebb
    wrote on last edited by
    #1

    I want to remove the menu that the MFC wizard put into my application. How do i do it?

    E 1 Reply Last reply
    0
    • S sebb

      I want to remove the menu that the MFC wizard put into my application. How do i do it?

      E Offline
      E Offline
      Erik Thompson
      wrote on last edited by
      #2

      Go into the ResourceView for your project. Expand " resources/Menu. Depending if it is a MDI or SDI application, you may have 2 or 1 menus respectively. The IDR_MAINFRAME is the menu for the application. You can edit this menu and delete the items at the top by selecting a menu item and pressing the delete key.

      R 1 Reply Last reply
      0
      • E Erik Thompson

        Go into the ResourceView for your project. Expand " resources/Menu. Depending if it is a MDI or SDI application, you may have 2 or 1 menus respectively. The IDR_MAINFRAME is the menu for the application. You can edit this menu and delete the items at the top by selecting a menu item and pressing the delete key.

        R Offline
        R Offline
        Richard Aston
        wrote on last edited by
        #3

        The problem with that is that you get the message "Cannot create empty document". Find "BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)" override in MainFrm.cpp and add the line: cs.hMenu = static_cast(NULL); just before the return statement. Rebuild and voila! Menu gone.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups