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. How to add "File Edit View..." menù in a CDialog ?

How to add "File Edit View..." menù in a CDialog ?

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
5 Posts 4 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.
  • L Offline
    L Offline
    Lockhart
    wrote on last edited by
    #1

    Hi, I'm wondering how coudl I insert a "File Edit View.." standard Menu on thetop of CMyDialog class. I found information about inserting a ToolBar and I added it succesfully (with RepositionBars(), at least!), but nothing about the menù :( Any help will be appreciated! Bye.

    R P M L 4 Replies Last reply
    0
    • L Lockhart

      Hi, I'm wondering how coudl I insert a "File Edit View.." standard Menu on thetop of CMyDialog class. I found information about inserting a ToolBar and I added it succesfully (with RepositionBars(), at least!), but nothing about the menù :( Any help will be appreciated! Bye.

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      You can add a menu resource to a dialog using the resource editor. Nothing special is required in order to do this. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

      1 Reply Last reply
      0
      • L Lockhart

        Hi, I'm wondering how coudl I insert a "File Edit View.." standard Menu on thetop of CMyDialog class. I found information about inserting a ToolBar and I added it succesfully (with RepositionBars(), at least!), but nothing about the menù :( Any help will be appreciated! Bye.

        P Offline
        P Offline
        Paul M Watt
        wrote on last edited by
        #3

        1. create your menu resource in the menu editor. 2. Call: HMENU hMenu = LoadMenu(hInstance, MAKEINTRESOURCE(ID_MENU)); Where ID_MENU is your menu resource handle and hInstance is the instance to your current application. You could also use ::GetModuleHandle(NULL) //instead of hInstance. this will load your menu resource and assign it to an HMENU. 3. Call the SetMenu member function of your CDialog class in order to assign this menu with your dialog window. If you want to change the menu out later or get rid of this menu call SetMenu with a new menu handle or NULL, respectively. When your app is done, free the menu resources with DestroyMenu(hMenu); You can also associate a menu with a dialog if you have created a special class that subclasses the dialog class by setting the MENU field in the CLASSINFO structure before you register your class. If you would like more details on this method feel free to ask.

        1 Reply Last reply
        0
        • L Lockhart

          Hi, I'm wondering how coudl I insert a "File Edit View.." standard Menu on thetop of CMyDialog class. I found information about inserting a ToolBar and I added it succesfully (with RepositionBars(), at least!), but nothing about the menù :( Any help will be appreciated! Bye.

          M Offline
          M Offline
          Mazdak
          wrote on last edited by
          #4

          Just go to dialog editor,in property page of dialog,there is combo box to set your menu.:) Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
          Wish You Were Here-Pink Floyd-1975

          1 Reply Last reply
          0
          • L Lockhart

            Hi, I'm wondering how coudl I insert a "File Edit View.." standard Menu on thetop of CMyDialog class. I found information about inserting a ToolBar and I added it succesfully (with RepositionBars(), at least!), but nothing about the menù :( Any help will be appreciated! Bye.

            L Offline
            L Offline
            Lockhart
            wrote on last edited by
            #5

            I like both the static and the dynamic solutions. :) (I love this board, too)

            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