MDI:选项卡上的文件名称

时间:2022-03-23 16:10:50

I have an MDI application that initially doesn't have the main window open. When you click on file and select new, it opens a new tab with the default file name on it.

我有一个MDI应用程序,最初没有打开主窗口。单击文件并选择新文件时,将打开一个新选项卡,其上包含默认文件名。

My application should work like this, when you click on file and select new, a dialog box comes out asking for the name of the file you want to create. After clicking "Ok", the name you input on the textbox should appear on the tab.

我的应用程序应该像这样工作,当您单击文件并选择新建时,会出现一个对话框,询问您要创建的文件的名称。单击“确定”后,您在文本框中输入的名称应显示在选项卡上。

How do you set the name on the tab?

如何在选项卡上设置名称?

Thanks.

1 个解决方案

#1


You need to override CDocTemplate::SetDefaultTitle.

您需要覆盖CDocTemplate :: SetDefaultTitle。

#1


You need to override CDocTemplate::SetDefaultTitle.

您需要覆盖CDocTemplate :: SetDefaultTitle。