CWinApp::AddDocTemplate
Belge şablonu uygulama tutan kullanılabilir belge şablonlarının listesine eklemek için bu üye işlevini çağırın.
void AddDocTemplate(
CDocTemplate* pTemplate
);
Parametreler
- pTemplate
Bir işaretçi CDocTemplate eklenecek.
Notlar
Tüm Belge şablonları bir uygulamaya, aramadan önce eklemeniz gereken RegisterShellFileTypes.
Örnek
// The following code is produced by the Application Wizard when you
// choose the MDI (multiple document interface) option.
CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(IDR_MYTYPE,
RUNTIME_CLASS(CMyDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CMyView));
if (!pDocTemplate)
return FALSE;
AddDocTemplate(pDocTemplate);
Gereksinimler
Başlık: afxwin.h