CDockablePane停靠窗口,当点击‘x’按钮关闭pane时候,我想捕获这个事件做其他的处理。结果遍寻google和baidu无果Bill说:
CPane::OnPressCloseButton
Visual Studio 2010Other Versions Visual Studio 2008Called by the framework when the user presses the close button on the caption for the pane.Copyvirtual void OnPressCloseButton();
Res
--------------------------------------------------------------------------------This method is called by the framework when a user presses the Close button on the pane's caption. To receive notifications about the Close event, you can override this method in a derived class.结果我发现当pane在floating状态,根本不会执行这个函数,而是进入了floating状态的CloseMiniFrame()函数。这个是MFC的代码,真的没有其他办法了么???有熟悉sp1的tx么?最近本sp1折腾的厉害不熟悉就是不行
CPane::OnPressCloseButton
Visual Studio 2010Other Versions Visual Studio 2008Called by the framework when the user presses the close button on the caption for the pane.Copyvirtual void OnPressCloseButton();
Res
--------------------------------------------------------------------------------This method is called by the framework when a user presses the Close button on the pane's caption. To receive notifications about the Close event, you can override this method in a derived class.结果我发现当pane在floating状态,根本不会执行这个函数,而是进入了floating状态的CloseMiniFrame()函数。这个是MFC的代码,真的没有其他办法了么???有熟悉sp1的tx么?最近本sp1折腾的厉害不熟悉就是不行
{
return FALSE;
}BOOL CMainFrame::OnCloseDockingPane(CDockablePane* /*pWnd*/)
{
return FALSE;
}果然解决问题!
比如我添加的这两句,那个窗口无论停靠还是浮动都不可关闭,呵呵。
就是不知道要是想在让那个“X”不可见,咋弄。