如何获取视图句柄? 在VC中,建一单文本应用程序,将窗口分割为两部分,一部分是基于CTreeView类的视图,另一部分是基于CListView类的视图,如何在主框架CMainFrame的菜单响应事件中获取这两个视图的句柄? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这个对你有用,自己修改下就是你想要的了 获取分割视图中各个视图的指针 CSplitterWnd m_wndSplitter; m_wndSplitter.CreateStatic(this, 1, 2);//分割成一行两列 m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftPaneView), CSize(10, 10), pContext); m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CRightPaneFrame), CSize(0, 0), pContext); //获取左边视图的两种方法 CLeftPaneView* pLeftPaneView = (CLeftPaneView*) m_wndSplitter.GetPane(0,0); //上一句可以用下句代替: //CLeftPaneView* pLeftPaneView = (CLeftPaneView *)GetActiveView(); //获取右边视图 pLeftPaneView->m_pRightPaneFrame = (CRightPaneFrame*) m_wndSplitter.GetPane(0,1); auxDIBImageLoad如何载入内部资源? CreatDib()颜色表怎么设置? sleep精度与CPU占用问题 关于数据库连接问题 关于TCP连接关闭的一个问题 有谁有读取INI文件突破64K限制的类,急求 如何去掉CRichEditCtrl中的自动换行? VC程序员是不是特难招聘哦 为什么我看不见菜单呢? 使用CSocket为什么会陷入缓慢等待中? 谁借我500可用分?以后还他550! 检测应用程序是否具有管理员权限
m_wndSplitter.CreateStatic(this, 1, 2);//分割成一行两列
m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftPaneView), CSize(10, 10), pContext);
m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CRightPaneFrame), CSize(0, 0), pContext);
//获取左边视图的两种方法
CLeftPaneView* pLeftPaneView = (CLeftPaneView*) m_wndSplitter.GetPane(0,0);
//上一句可以用下句代替:
//CLeftPaneView* pLeftPaneView = (CLeftPaneView *)GetActiveView();
//获取右边视图
pLeftPaneView->m_pRightPaneFrame = (CRightPaneFrame*) m_wndSplitter.GetPane(0,1);