Is there an easy way to remove the close button from the title bar of an MFC package?
(I do not mean the window title, I am talking about a small information panel that can be displayed at the top of the client area in these applications, that is: CMFCCaptionBar)
thanks
Figured out one way ...
class CNoCloseCaptionBar : public CMFCCaptionBar { public: CNoCloseCaptionBar() { } virtual void RecalcLayout() { __super::RecalcLayout(); m_rectClose.SetRectEmpty(); } };
Removing a bitmap worked for me. See the MSOffice2007Demo example in Feature Visual C ++ 2008.
Comment the following line in the CMainFrame: CreateMessageBar ()
//m_wndMessageBar.SetBitmap(IDB_INFO, RGB(255, 255, 255), FALSE, CMFCCaptionBar::ALIGN_LEFT);
Caption Bar without a close button
Source: https://habr.com/ru/post/1708050/More articles:I did a loading script in PHP. How to avoid overwriting files? - phpReplacing xml namespace prefixes in SQL Server using XQuery - sqlIf ANSI C ++ does not support multithreading, how will unmanaged C ++ applications be multithreaded? - c ++Problem installing pyscopg2 on mac os x - pythonSupport for multiple processes in one application? - c #Возвращаемый дескриптор GetPhysicalMonitorsFromHMONITOR всегда имеет значение null - interopiphone офлайн кэшированных приложений dissapear после закрытия в сафари? - safariTransfer header data to e-mails - emailHow to select a row in a table using jquery? - jqueryhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1708055/linq-to-sql-and-concurrency-with-rob-conery-repository-pattern&usg=ALkJrhg3aX6-vzcCATrvnOcV-KMsvUdSKgAll Articles