想实现类似Windows 资源管理器的效果,MainFrame中采用CSplitterWnd 产生了两个视图,
CLeftView,CMainView, 现在需要通过响应菜单命令 隐藏、显示CLeftView,
不知如何实现?????
1.m_wndSplitter.GetPane(0,0)->ShowWindow(SW_HIDE);
2.m_wndSplitter.DeleteView(0,0);
两个方法都试了,CMainView 不能自动扩充CLeftView的占据空间
?????????????
CLeftView,CMainView, 现在需要通过响应菜单命令 隐藏、显示CLeftView,
不知如何实现?????
1.m_wndSplitter.GetPane(0,0)->ShowWindow(SW_HIDE);
2.m_wndSplitter.DeleteView(0,0);
两个方法都试了,CMainView 不能自动扩充CLeftView的占据空间
?????????????
解决方案 »
- vs2010 编写DLL编译后怎么依赖那么多动态库?
- 调试时无错但运行出错,请教各位!
- 共500分!每个问题100分!!!mfc使用webbrowser控件如何截获控件向历史记录添加信息的事件并阻止?
- icmp 协议属于网络层?
- 如何将数据库中的一列全部加到Combo Box中,供下拉时选择?
- 请教如何双击打开U盘时,自动运行U盘中的一个可执行文件???
- ActiveX控件基于CSocket类的出错问题(base class undefined)
- 怎么才能让regsvr32注册成功的窗口不弹出来?
- Net send 命令原理是什么?
- CGridCtrl 怎么合并单元格?
- 如何看一个com实现了那些接口?
- windows和linux的socket通讯的问题
virtual void RecalcLayout( BOOL bNotify = TRUE );ParametersbNotifyDetermines whether the active in-place item for the frame window receives notification of the layout change. If TRUE, the item is notified; otherwise FALSE.ResCalled by the framework when the standard control bars are toggled on or off or when the frame window is resized. The default implementation of this member function calls the CWnd member function RepositionBars to reposition all the control bars in the frame as well as in the main client window (usually a CView or MDICLIENT).
{
// 显示隐藏侧边栏
static BOOL bShow = TRUE; bShow = !bShow;
if(bShow) // 显示
{
wndSplitter.SetColumnInfo( 0, m_nLeftWidth, 0 );
}
else
{
int cxMin;
wndSplitter.GetColumnInfo(0, m_nLeftWidth, cxMin);
wndSplitter.SetColumnInfo( 0, 0, 0 );
}
wndSplitter.RecalcLayout();
}
wndSplitter.SetColumnInfo( 0, 0, 0 ); 效果不好,尤其那个拆分条,
视图隐藏之后,拆分条也应该为不可见, 还望多多指教!!!