MFC ......如何更改名称

时间:2018-05-04 07:10:52

标签: c++ mfc project

enter image description here 我不能改变图片中的名字...... 我想更改电话簿的标题名称和新标题...查看图片。

CMultiDocTemplate* pDocTemplatePersons;
pDocTemplatePersons = new CMultiDocTemplate(IDR_PhoneBookTYPE,
    RUNTIME_CLASS(CPersonsDocument),
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame
    RUNTIME_CLASS(CPersonsView)
    );
if (!pDocTemplatePersons)
    return FALSE;
AddDocTemplate(pDocTemplatePersons);

CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(IDR_PhoneBookTYPE,
    RUNTIME_CLASS(CCitiesDocument),
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame
    RUNTIME_CLASS(CCitiesView)
    );
if (!pDocTemplate)
    return FALSE;
AddDocTemplate(pDocTemplate);

CMultiDocTemplate* pDocPhoneTypes;
pDocPhoneTypes = new CMultiDocTemplate(IDR_PhoneBookTYPE,
    RUNTIME_CLASS(CPhoneTypesDocument),
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame
    RUNTIME_CLASS(CPhoneTypesView)
    );
if (!pDocPhoneTypes)
    return FALSE;
AddDocTemplate(pDocPhoneTypes); 

1 个答案:

答案 0 :(得分:1)

请检查您使用的字符串资源IDR_PhoneBookTYPE。名称以此字符串编码。

您可以在CMultiDocTemplate::CMultiDocTemplate的构造函数中找到说明,并在CDocTemplate::GetDocString

中详细说明