Go Back  Xtreme .NET Talk > .NET > Syntax Specific > Visual C++ .NET > "Failed to Create Empty Document" Error


Reply
 
Thread Tools Display Modes
  #1  
Old 02-23-2003, 11:58 PM
amit_ra amit_ra is offline
Newcomer
 
Join Date: Feb 2003
Posts: 2
amit_ra is on a distinguished road
Default "Failed to Create Empty Document" Error

Hi,

I am trying to create a simple SDI application using MFC.
My programme is compiling correctly but when i am trying to execute it i get an error "Unable to Create empty Document" . The following is the code i used in my Application class InitInstance method...

Code:
BOOL C_CustomApp::InitInstance()
{
	CSingleDocTemplate* pDocTemplate;
	pDocTemplate= new CSingleDocTemplate(
	IDR_MAINFRAME,
    RUNTIME_CLASS(C_CustomDoc),
	RUNTIME_CLASS(C_MainFrame),
	RUNTIME_CLASS(C_CustomView));
	AddDocTemplate(pDocTemplate);
	EnableShellOpen();
	RegisterShellFileTypes();

	if(m_lpCmdLine[0] == '\0')
	{
		OnFileNew();
	}
	else 
	{
		OpenDocumentFile(m_lpCmdLine);
	}
	m_pMainWnd->DragAcceptFiles();
	return TRUE;
}
I am getting the error on the call of 'OnFileNew' function.

What is it that i am doing wrong . Please help.

Thanks..

Last edited by divil; 02-24-2003 at 03:15 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Reports .NET "Load Report Failed" error Netnoobie Database / XML / Reporting 4 08-20-2009 03:22 PM
"Error authenticating user. Cannot create ActiveX component" SteveoAtilla ASP.NET 1 06-21-2006 11:47 AM
"Load report failed." with Crystal Reports 9 nater Database / XML / Reporting 10 06-20-2006 05:00 AM
"Logon failed" eramgarden ASP.NET 1 09-23-2004 03:30 PM

Advertisement:

Powered by liquidweb