1. 说明 :
virtual void RecalcLayout( BOOL bNotify = TRUE );
Called by the framework when the standard control bars are toggled on or off or when the frame window is resized.
==> 当标准控制条打开或关闭或框架窗口调整大小时,由框架调用。
CFrameWnd::RecalcLayout 是 调用CWnd的成员函数RepositionBars完成控制条窗口的重新放置。
Header: afxwin.h
2. 调用示例:
2.1. 这是一个显示标题的示例,显示标题栏后调用RecalcLayout:
未 调用显示标题前:
调用显示标题后:
如上 图所示, 中间多了黄色的标题栏,并且各个控制条之间是重新排列了的!
2.2 如果不调用RecalcLayout,则各个控件条之间没有重新计算排列,如下所示:
插入的 标题栏 直接覆盖在了原来的黑色部分区域;
3. 参数
- bNotify
Determines whether the active in-place item for the frame window receives notification of the layout change. If TRUE, the item is notified; otherwise FALSE.
这个参数决定框架窗口的活动控制条项是否接收布局更改的通知。 如果接受通知,该参数设为真, 否则为假。