请问用MFC如何实现像VS2013的类视图一样带CSplitterWnd的CDockablePane

Beyond-L 2015-12-25 11:04:56
请问用MFC如何实现像VS2013的类视图一样带CSplitterWnd的CDockablePane
就像这样的效果

上下分割的CDockablePane
十分急切,忘各位大神指点,,,,
...全文
164 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
向立天 2016-03-23
  • 打赏
  • 举报
回复
您好 我是本版版主 此帖已多日无人关注 请您及时结帖 如您认为问题没有解决可按无满意结帖处理 另外本版设置了疑难问题汇总帖 并已在版面置顶 相关规定其帖子中有说明 您可以根据规定提交您帖子的链接 如您目前不想结帖只需回帖说明 我们会删除此结帖通知 见此回复多日内无回应 我们将强制结帖 相关规定详见界面界面版关于版主结帖工作的具体办法
Beyond-L 2015-12-26
  • 打赏
  • 举报
回复
大神在哪里,,,
Beyond-L 2015-12-26
  • 打赏
  • 举报
回复
引用 4 楼 vcf_reader 的回复:
A pane is usually an application-specific object derived from CView, but it can be any CWnd object that has the appropriate child window ID. A CSplitterWnd object is usually embedded in a parent CFrameWnd or CMDIChildWnd object. Create a CSplitterWnd object using the following steps: Embed a CSplitterWnd member variable in the parent frame. Override the parent frame's CFrameWnd::OnCreateClient member function. From within the overridden OnCreateClient, call the Create or CreateStatic member function of CSplitterWnd. Call the Create member function to create a dynamic splitter window. A dynamic splitter window typically is used to create and scroll a number of individual panes, or views, of the same document. The framework automatically creates an initial pane for the splitter; then the framework creates, resizes, and disposes of additional panes as the user operates the splitter window's controls. When you call Create, you specify a minimum row height and column width that determine when the panes are too small to be fully displayed. After you call Create, you can adjust these minimums by calling the SetColumnInfo and SetRowInfo member functions. Also use the SetColumnInfo and SetRowInfo member functions to set an "ideal" width for a column and "ideal" height for a row. When the framework displays a splitter window, it first displays the parent frame, then the splitter window. The framework then lays out the panes in columns and rows according to their ideal dimensions, working from the upper-left to the lower-right corner of the splitter window's client area. All panes in a dynamic splitter window must be of the same class. Familiar applications that support dynamic splitter windows include Microsoft Word and Microsoft Excel. Use the CreateStatic member function to create a static splitter window. The user can change only the size of the panes in a static splitter window, not their number or order. You must specifically create all the static splitter's panes when you create the static splitter. Make sure you create all the panes before the parent frame's OnCreateClient member function returns, or the framework will not display the window correctly. The CreateStatic member function automatically initializes a static splitter with a minimum row height and column width of 0. After you call Create, adjust these minimums by calling the SetColumnInfo and SetRowInfo member functions. Also use SetColumnInfo and SetRowInfo after you call CreateStatic to indicate desired ideal pane dimensions. The individual panes of a static splitter often belong to different classes. For examples of static splitter windows, see the graphics editor and the Windows File Manager. A splitter window supports special scroll bars (apart from the scroll bars that panes may have). These scroll bars are children of the CSplitterWnd object and are shared with the panes. You create these special scroll bars when you create the splitter window. For example, a CSplitterWnd that has one row, two columns, and the WS_VSCROLL style will display a vertical scroll bar that is shared by the two panes. When the user moves the scroll bar, WM_VSCROLL messages are sent to both panes. When the panes set the scroll-bar position, the shared scroll bar is set.
这讲的是如何在Frame里面用CSplitterWnd 吧,但是我是想在CDockablePane里面用,请问怎么用呢
vcf_reader 2015-12-26
  • 打赏
  • 举报
回复
A pane is usually an application-specific object derived from CView, but it can be any CWnd object that has the appropriate child window ID. A CSplitterWnd object is usually embedded in a parent CFrameWnd or CMDIChildWnd object. Create a CSplitterWnd object using the following steps: Embed a CSplitterWnd member variable in the parent frame. Override the parent frame's CFrameWnd::OnCreateClient member function. From within the overridden OnCreateClient, call the Create or CreateStatic member function of CSplitterWnd. Call the Create member function to create a dynamic splitter window. A dynamic splitter window typically is used to create and scroll a number of individual panes, or views, of the same document. The framework automatically creates an initial pane for the splitter; then the framework creates, resizes, and disposes of additional panes as the user operates the splitter window's controls. When you call Create, you specify a minimum row height and column width that determine when the panes are too small to be fully displayed. After you call Create, you can adjust these minimums by calling the SetColumnInfo and SetRowInfo member functions. Also use the SetColumnInfo and SetRowInfo member functions to set an "ideal" width for a column and "ideal" height for a row. When the framework displays a splitter window, it first displays the parent frame, then the splitter window. The framework then lays out the panes in columns and rows according to their ideal dimensions, working from the upper-left to the lower-right corner of the splitter window's client area. All panes in a dynamic splitter window must be of the same class. Familiar applications that support dynamic splitter windows include Microsoft Word and Microsoft Excel. Use the CreateStatic member function to create a static splitter window. The user can change only the size of the panes in a static splitter window, not their number or order. You must specifically create all the static splitter's panes when you create the static splitter. Make sure you create all the panes before the parent frame's OnCreateClient member function returns, or the framework will not display the window correctly. The CreateStatic member function automatically initializes a static splitter with a minimum row height and column width of 0. After you call Create, adjust these minimums by calling the SetColumnInfo and SetRowInfo member functions. Also use SetColumnInfo and SetRowInfo after you call CreateStatic to indicate desired ideal pane dimensions. The individual panes of a static splitter often belong to different classes. For examples of static splitter windows, see the graphics editor and the Windows File Manager. A splitter window supports special scroll bars (apart from the scroll bars that panes may have). These scroll bars are children of the CSplitterWnd object and are shared with the panes. You create these special scroll bars when you create the splitter window. For example, a CSplitterWnd that has one row, two columns, and the WS_VSCROLL style will display a vertical scroll bar that is shared by the two panes. When the user moves the scroll bar, WM_VSCROLL messages are sent to both panes. When the panes set the scroll-bar position, the shared scroll bar is set.
Beyond-L 2015-12-26
  • 打赏
  • 举报
回复
引用 2 楼 vcf_reader 的回复:
用 CSplitterWnd 这个类
请问怎么用呢,,,能描述一下方法么,谢谢
vcf_reader 2015-12-26
  • 打赏
  • 举报
回复
用 CSplitterWnd 这个类

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧