开发者

MFC MDI Tabs are enumerated

开发者 https://www.devze.com 2023-04-03 01:38 出处:网络
I have an MFC (VS2010) MDI application (created by the wizard). I want that each tab will be created with the s开发者_如何学Pythoname label and not enumerated value (i.e the tab\'s caption should alwa

I have an MFC (VS2010) MDI application (created by the wizard). I want that each tab will be created with the s开发者_如何学Pythoname label and not enumerated value (i.e the tab's caption should always be "New Tab" and not "New Tab 1" ... "New Tab N".

I want this option since upon the creation of a new tab (each tab is holding CHtmlView) I'm changing his caption to the HTML title (like browsers act). So now when I create the first tab it gets "New Tab 1" and I change it to be "MyCaption" when I open another tab the 1st receives "New Tab 1" the 2nd (newly opened) receives "New Tab 2" I change it to "MyCaption" but going to the first tab again causes the 2nd tab to be called "New Tab 2". How can I disable this mechanism?

Thanks a lot,

Guy


Use CDocument::SetTitle to permanently change the title displayed in the tab.

0

精彩评论

暂无评论...
验证码 换一张
取 消