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. General Programming
  3. C / C++ / MFC
  4. Menubar in doc/view

Menubar in doc/view

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 2 Posters 0 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.
  • E Offline
    E Offline
    EiSl
    wrote on last edited by
    #1

    Hello guru's, I've the feeling it's so simple, but I cannot manage it: :confused: We all know the standard menu in a MDI application made by MFC-wizard. But what I need now is having also the menu in each doc/view. I've tried some idea's, but they all failed. I succeeded in putting a toolbar and status bar, but the menu...arrghhhh!!! X| Do you have any idea's? Thanks in advance, EiSl

    T 1 Reply Last reply
    0
    • E EiSl

      Hello guru's, I've the feeling it's so simple, but I cannot manage it: :confused: We all know the standard menu in a MDI application made by MFC-wizard. But what I need now is having also the menu in each doc/view. I've tried some idea's, but they all failed. I succeeded in putting a toolbar and status bar, but the menu...arrghhhh!!! X| Do you have any idea's? Thanks in advance, EiSl

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      Just create new doc/view classes and add new document template in CYourApp::InitInstance:

      BOOL CGeNIeApp::InitInstance()
      {
      ...

      // this template generated by the AppWizard
      AddDocTemplate(new CMultiDocTemplate(
      IDR_YOURTYPE,
      RUNTIME_CLASS(CYourDoc),
      RUNTIME_CLASS(CYourFrame),
      RUNTIME_CLASS(CYourView)));

      // new template
      AddDocTemplate(new CMultiDocTemplate(
      IDR_ANOTHERTYPE,
      RUNTIME_CLASS(CAnotherDoc),
      RUNTIME_CLASS(CAnotherFrame),
      RUNTIME_CLASS(CAnotherView)));
      }
      ...
      }

      Just create the menu with IDR_ANOTHERTYPE and it will be displayed automatically when you switch between views. Tomasz Sowinski -- http://www.shooltz.com

      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