IDR_SCRIBTYPE "\nScrib\nScrib\nScribble 文件 (*.scb)\n.scb\nScribble.Document\nScrib Document"
class AFX_NOVTABLE CDocTemplate : public CCmdTarget
{
DECLARE_DYNAMIC(CDocTemplate)
.........
enum DocStringIndex
{
windowTitle, // 0default window title
docName, // 1user visible name for default document
fileNewName, // 2user visible name for FileNew
// for file based documents:
filterName, // 3user visible name for FileOpen
filterExt, // 4user visible extension for FileOpen
// for file based documents with Shell open support:
regFileTypeId, // 5REGEDIT visible registered file type identifier
regFileTypeName, //6 Shell visible registered file type name
};
.........
};
每一个字符串都可以在程序进行时获得,只要调用CdocTemplate::GetDocString,并在第2个参数中指定索引值(1~7)即可,但最好是以CdocTemplate所定义的7个常量代替没有字面意义的索引值.