方法一:

在继承CDockablePane的类中重写CanBeClosed()方法:

 

virtual BOOL CanBeClosed() const;
 
...
 
BOOL COutputWnd::CanBeClosed() const
 {
return FALSE;
}

 

方法二:

if (!m_wndView.Create(strFileView, this, CRect(0, 0, 250, 200), TRUE, ID_VIEW_VIEW,
  WS_CHILD | WS_VISIBLE | CBRS_LEFT | CBRS_HIDE_INPLACE | WS_CAPTION, AFX_CBRS_REGULAR_TABS, AFX_CBRS_RESIZE))
在Create的时候 后面加上这样的参数设置AFX_CBRS_REGULAR_TABS, AFX_CBRS_RESIZE 就不会有那个关闭按钮了

////方法二比较实用

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2021-12-11
  • 2021-07-03
  • 2022-12-23
  • 2021-08-15
猜你喜欢
  • 2022-12-23
  • 2021-05-18
  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2022-02-07
相关资源
相似解决方案