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 per view in a splitter window

Menu per view in a splitter window

Scheduled Pinned Locked Moved C / C++ / MFC
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.
  • J Offline
    J Offline
    JTAnderson
    wrote on last edited by
    #1

    Could someone gimme some direction on how to create a specialized menu for each view in a splitter window? I want the menu to be drawn inside each of the CViews inside the splitter wnd. -JT

    L T 2 Replies Last reply
    0
    • J JTAnderson

      Could someone gimme some direction on how to create a specialized menu for each view in a splitter window? I want the menu to be drawn inside each of the CViews inside the splitter wnd. -JT

      L Offline
      L Offline
      l a u r e n
      wrote on last edited by
      #2

      you mean like dropping down from the splitter bar at the top of each splitter view? hmmm ... would a right-click pop-up menu for each pane not be good enough? i know it would sure be a lot easier to code


      situations to avoid #37:
      "good morning ... how many sugars do you take in your coffee ... and what was your name again?"

      1 Reply Last reply
      0
      • J JTAnderson

        Could someone gimme some direction on how to create a specialized menu for each view in a splitter window? I want the menu to be drawn inside each of the CViews inside the splitter wnd. -JT

        T Offline
        T Offline
        Tom Archer
        wrote on last edited by
        #3

        The problem here is that menus are attached to frames. The views in a splitter windows share the same frame so I don't see how you can do this without an awful lot of work. IDEAS) 1) I did something similar to what you need to do except that I used a dialog bar on one side that contained a tree view and I didn't allow the dialog bar to be undocked. The view on the right side was then a listview. This enabled me to define an CMDIChildWnd-derived frame window and attach a toolbar to it. That frame was then used in the creation of the view's doctemplate. 2) About 15 years ago, I wrote a similar thing in OS/2. This was long before the days of having classes to do the work for you. What I did was to create 3 MDI windows. The first two were my views. The third was a "splitter window". It was simply a window that was defined as being so narrow that only its borders were viewable. Therefore, it looked just like today's splitter. I then handled that window's WM_MOVE message and resized the other windows accordingly. The overall impression to the user was that of using a splitter to view different amounts of each window. This *might* do what you want as with each view you could create your own frame and attach a menu to it. I know these aren't the answers you were looking for. However, sometimes if someone talks about similar problems/solutions, it can jog ideas of your own that will solve your particular problem. Cheers, Tom Archer Author, Inside C# Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.

        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