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. Menu and Submenu

Menu and Submenu

Scheduled Pinned Locked Moved C / C++ / MFC
help
3 Posts 3 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.
  • K Offline
    K Offline
    kiranin
    wrote on last edited by
    #1

    Hello Guys, I m trying for a sample which si have menu with dynamic items (i seen sample in code project for dynamic items), whihch will dynamically create menu with menus and sub menus, but problem is main menu coming with left side(column) seprator for images and text and submenu are coming with without seprator, how we can set options with or without left separator

    B T 2 Replies Last reply
    0
    • K kiranin

      Hello Guys, I m trying for a sample which si have menu with dynamic items (i seen sample in code project for dynamic items), whihch will dynamically create menu with menus and sub menus, but problem is main menu coming with left side(column) seprator for images and text and submenu are coming with without seprator, how we can set options with or without left separator

      B Offline
      B Offline
      BobInNJ
      wrote on last edited by
      #2

      First, I am assuming that you using C++ and MFC. If this is not the case, please tell me what tools you are using and ignore my answer below. In MFC, there is a class called CMenu. This class has member functions to deal with menus including adding and modifying menus. You can look at the member functions AppendMenu and ModifyMenu. Also, if you want to get fancy you can consider the idea of Owner-Draw Menus. This is described in the book "Programming Windows with MFC" by Jeff Prosise. Bob

      1 Reply Last reply
      0
      • K kiranin

        Hello Guys, I m trying for a sample which si have menu with dynamic items (i seen sample in code project for dynamic items), whihch will dynamically create menu with menus and sub menus, but problem is main menu coming with left side(column) seprator for images and text and submenu are coming with without seprator, how we can set options with or without left separator

        T Offline
        T Offline
        transoft
        wrote on last edited by
        #3

        kiranin wrote:

        dynamic items

        Be careful with using CMenu while dealing with "dynamic items". You should destroy and delete the CMenu you used, else the memory leak will be introduced.

        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