Click here to Skip to main content
15,884,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C++
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate( 
IDR_MAINFRAME,
RUNTIME_CLASS(CHTMLEditDoc),
RUNTIME_CLASS(CMainFrame),       // main SDI frame window
RUNTIME_CLASS(CHTMLEditView));
if (!pDocTemplate)
{ 
    MessageBox(NULL,NULL,0,0);
    //return FALSE;
}  
HINSTANCE hClientResources = AfxGetResourceHandle(); 
AfxSetResourceHandle(::GetModuleHandle("pgdtg.dll")) 
Phan_len_lich_dialog dlg ; 
dlg.DoModal(); 
AfxSetResourceHandle(hClientResources); 


AddDocTemplate(pDocTemplate); 






dlg shows up correctly , but adddoctemplate create "Failed to create empty document" . I am sure that has problem with extended dll pgdtg.dll when is used with adddoctemplate() . pgdtg.dll is extended mfc dll and this test with dialog based project . pgdtg.dll and pgdtg.lib are copied to release folder as normal .
Posted
Updated 3-Mar-14 22:44pm
v2
Comments
Richard MacCutchan 4-Mar-14 4:45am    
Check with the person who provided the dll.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900