如何将其他视图作为拆分器窗口 [英] How to make other views as a splitter window

查看:45
本文介绍了如何将其他视图作为拆分器窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个单视图的SDI应用程序(CMyView,CMyDocument)。现在我正在添加其他视图,例如用户登录(MyLogOn - > CFormView)。我在应用程序启动时通过在InitInstance中提供RUNTIME_CLASS(MyLogOn)来启动CLogOn视图。所以我能够将其作为第一个视图启动。现在,当用户成功登录时,我正在推动另一个视图(MyMainView - > CFormView),但我需要的是将此视图拆分为两个垂直部分,但无法执行此操作。

我知道当想要分割视图时我们可以在CMainFrame :: OnCreateClient函数中编写代码,但我的MyMainView是从CFormView派生而不是从CFrameWnd派生的。

如果我想实现这一点,我该如何处理呢。我还尝试通过定义CCreateContext * pContext在CMainView :: OnCreate中创建分割器wnd,但它不会创建分割器wnd。



Regds

解决方案

请参阅在CFormView中添加拆分器窗口 [ ^ ]。

Hi
I have a SDI application with single view (CMyView, CMyDocument). Now I am adding other views into it say for user login (MyLogOn --> CFormView). I am lauching CLogOn view at application start by providing RUNTIME_CLASS(MyLogOn )) in InitInstance. So I am able to launch this as a first view. Now when user logs in successfully I am lauching another view (MyMainView --> CFormView) but what I need here is to split this view in two vertical parts but unable to do so.
I know that when want to split the view we can write the code in CMainFrame::OnCreateClient function but my MyMainView is derived from CFormView and not from CFrameWnd.
If I want to achieve this how can I handle this. I also tried to create the splitter wnd in CMainView::OnCreate by defining CCreateContext* pContext but it does not create splitter wnd.

Regds

解决方案

See Adding splitter window in CFormView[^].


这篇关于如何将其他视图作为拆分器窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆