Menu per view in a splitter window
-
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
-
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
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?" -
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
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.