如何拉升CDockablePanel到一定大小不让拉升

zl80568947 2016-09-23 10:54:31
MFC中有一个是DOC VIEW结构的程序(其中VIEW是继承CFormView)在mainFrame里面有一个CDockablePane(放在底下),CDockablePanel往上拉的过程中会出现CFromView越来越小,如何保证FormView的最小大小呢?也就是不让CDockablePane再往上拉升
...全文
428 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
Eleven 2016-09-30
  • 打赏
  • 举报
回复
CDockablePane::IsResizable() By default, dockable panes are resizable. To prevent resizing, override this method in a derived class and return FALSE. Note that a FALSE value leads to a failed ASSERT in CPane::DockPane. Use CDockingManager::AddPane instead to dock a pane within a parent frame. Panes that cannot be resized can neither float nor enter auto-hide mode and are always located at the outer edge of the parent frame.
zl80568947 2016-09-30
  • 打赏
  • 举报
回复
@VisualEleven 已经试过 不行
Eleven 2016-09-30
  • 打赏
  • 举报
回复
重写虚函数 virtual BOOL IsResizable() const { return FALSE; }
zl80568947 2016-09-30
  • 打赏
  • 举报
回复
@赵4老师 好吧 还是很感谢。
zl80568947 2016-09-30
  • 打赏
  • 举报
回复
@syy64 浮动和停靠都要使用呢 ,有没有其他方法呢 CDockable拖动的过程中 WM_MOUSEMOVE都是无法响应的
赵4老师 2016-09-27
  • 打赏
  • 举报
回复
引用 3 楼 zl80568947 的回复:
@赵4老师 WM_GETMINMAXINFO 还是不行呢,CDockablePane还是可以拖动
没蒙对。 爱莫能助,另请高明吧。
zl80568947 2016-09-26
  • 打赏
  • 举报
回复
@赵4老师 WM_GETMINMAXINFO 还是不行呢,CDockablePane还是可以拖动
syy64 2016-09-23
  • 打赏
  • 举报
回复
那就不用停靠模式,而用浮动模式。
赵4老师 2016-09-23
  • 打赏
  • 举报
回复
WM_GETMINMAXINFO The WM_GETMINMAXINFO message is sent to a window when the size or position of the window is about to change. An application can use this message to override the window's default maximized size and position, or its default minimum or maximum tracking size. WM_GETMINMAXINFO lpmmi = (LPMINMAXINFO) lParam; // address of structure Parameters lpmmi Value of lParam. Pointer to a MINMAXINFO structure that contains the default maximized position and dimensions, and the default minimum and maximum tracking sizes. An application can override the defaults by setting the members of this structure. Return Values If an application processes this message, it should return zero. Remarks The maximum tracking size is the largest window size that can be produced by using the borders to size the window. The minimum tracking size is the smallest window size that can be produced by using the borders to size the window. QuickInfo Windows NT: Requires version 3.1 or later. Windows: Requires Windows 95 or later. Windows CE: Unsupported. Header: Declared in winuser.h. See Also Windows Overview, Window Messages, MoveWindow, SetWindowPos, MINMAXINFO

15,979

社区成员

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

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