15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Control Bars in each splitter window pane?

Robert Tam -- rtam@acsu.buffalo.edu
Monday, December 16, 1996

Environment: Win95 VC++ 4.2b

Hi,

I hope somebody can help with this dilemma i'm facing. Here what I am
attempting to do. I have created an SDI app and also two views CView1,
CView2 both of which are derived from CView. I am able to override the
MainFrame's OnCreateClient to create the splitter window and 2 panes. I can
embed CView1 and CView2 in each of the panes. Everything seems to work ok.
Now I want to add a control bar like a tool bar into each of the panes. I
heard that I would have create my own classes derived from CFrameWnd and
embed them into the splitter window instead of embedding the 2 views
directly. I would very much appreciate it if somebody can outline some
procedures to do this. If somebody has a better (another) way of doing this
I would appreciate some hints as well.

TIA,
Rob
-----------------------------------------------------
Robert Tam
State University at Buffalo
Electrical Engineering & Computer Science Major
email: rtam@acsu.buffalo.edu
www: http://www.cs.buffalo.edu/~rtam




Paul E. Rosen -- prosen@fte.com
Thursday, December 19, 1996

Well, I can give you my experience with this, for what it's worth. My app is
MDI, but I think that doesn't matter in this case. What I did was add a
CToolBarCtrl to each view. I looked at the source for CToolBar  and the sample
CMNCTRLS for hints. I would post some code, but it's still buggy and hacked up
looking, but it generally does the trick.

The reason I haven't bothered to polish it yet is that I'm not sure about the
approach. There is an awful lot of non-client area in the window, what with
the title, the splitter bar, and the two toolbars. In my case it was worse,
since I wanted three panes. I'm rethinking the design. One possibility is to
do something similar to VIEWEX's three way splitter frame, but make the left
view nothing more that the toolbar.

----------
From: 	Robert Tam
Sent: 	Monday, December 16, 1996 4:08 PM
To: 	PRosen; mfc-l@netcom.com
Subject: 	Control Bars in each splitter window pane?

Environment: Win95 VC++ 4.2b

Hi,

I hope somebody can help with this dilemma i'm facing. Here what I am
attempting to do. I have created an SDI app and also two views CView1,
CView2 both of which are derived from CView. I am able to override the
MainFrame's OnCreateClient to create the splitter window and 2 panes. I can
embed CView1 and CView2 in each of the panes. Everything seems to work ok.
Now I want to add a control bar like a tool bar into each of the panes. I
heard that I would have create my own classes derived from CFrameWnd and
embed them into the splitter window instead of embedding the 2 views
directly. I would very much appreciate it if somebody can outline some
procedures to do this. If somebody has a better (another) way of doing this
I would appreciate some hints as well.

TIA,
Rob
-----------------------------------------------------
Robert Tam
State University at Buffalo
Electrical Engineering & Computer Science Major
email: rtam@acsu.buffalo.edu
www: http://www.cs.buffalo.edu/~rtam











| Вернуться в корень Архива |