Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有一种简单的方法可以从 MFC 功能包标题栏中删除关闭按钮?
(我不是说窗口标题,我说的是可以出现在这些应用程序的客户区顶部的小信息栏 - 即:CMFCCaptionBar)
谢谢
想出了一个办法...
class CNoCloseCaptionBar : public CMFCCaptionBar { public: CNoCloseCaptionBar() { } virtual void RecalcLayout() { __super::RecalcLayout(); m_rectClose.SetRectEmpty(); } };
删除位图对我有用。请参阅 Visual C++ 2008 功能包中的 MSOffice2007Demo 示例。
注释掉 CMainFrame:CreateMessageBar() 中的以下行
//m_wndMessageBar.SetBitmap(IDB_INFO, RGB(255, 255, 255), FALSE, CMFCCaptionBar::ALIGN_LEFT);
没有关闭按钮的字幕栏