failure opening an empty document 
Author Message
 failure opening an empty document

what this for a failure. i created a sdi doc app with the explorer style

in vc++ 6.0.
this app used a acces db.... the drivers are installed on the machine
i can run this app on my computer and on a winnt system..... but when i
run this app on a computer ( win95b, installed with acces db drivers )
there
comes the failure shown in subject....

here some code:

BOOL CVaksApp::InitInstance()
{

 /*{ CSingleDocTemplate* pNewDocTemplate = new CSingleDocTemplate(
   IDR_ADMINAUSWAHLVIEW_TMPL,
   RUNTIME_CLASS(CVaksDoc),  // document class
   RUNTIME_CLASS(CMainFrame),  // frame class
   RUNTIME_CLASS(CAdminAuswahlView));  // view class
  AddDocTemplate(pNewDocTemplate);
 }

 { CSingleDocTemplate* pNewDocTemplate1 = new CSingleDocTemplate(
   IDR_ADMINVIEW_TMPL,
   RUNTIME_CLASS(CVaksDoc),  // document class
   RUNTIME_CLASS(CMainFrame),  // frame class
   RUNTIME_CLASS(CAdminView));  // view class
  //AddDocTemplate(pNewDocTemplate);
 }

 { CSingleDocTemplate* pNewDocTemplate2 = new CSingleDocTemplate(
   IDR_FILMVIEW_TMPL,
   RUNTIME_CLASS(CVaksDoc),  // document class
   RUNTIME_CLASS(CMainFrame),  // frame class
   RUNTIME_CLASS(CFilmView));  // view class
  //AddDocTemplate(pNewDocTemplate);
 }

 {
  CSingleDocTemplate* pNewDocTemplate3 = new CSingleDocTemplate(
   IDR_KUNDENVIEW_TMPL,
   RUNTIME_CLASS( CVaksDoc ),  // document class
   RUNTIME_CLASS( CMainFrame ),  // frame class
   RUNTIME_CLASS( CKundenView ));  // view class
  //AddDocTemplate(pNewDocTemplate);
 }

 {
  CSingleDocTemplate* pNewDocTemplate4 = new CSingleDocTemplate(
   IDR_VERLEIHVIEW_TMPL,
   RUNTIME_CLASS( CVaksDoc ),  // document class
   RUNTIME_CLASS( CMainFrame ),  // frame class
   RUNTIME_CLASS( CVerleihView ));  // view class
  //AddDocTemplate(pNewDocTemplate);
 }

 {
  CSingleDocTemplate* pNewDocTemplate5 = new CSingleDocTemplate(
   IDR_KUNDENAUSWAHLVIEW_TMPL,
   RUNTIME_CLASS(CVaksDoc),  // document class
   RUNTIME_CLASS(CMainFrame),  // frame class
   RUNTIME_CLASS(CKundenAuswahlView));  // view class
  //AddDocTemplate(pNewDocTemplate);
 }*/

 //AfxEnableControlContainer();

#ifdef _AFXDLL
 Enable3dControls();   // Call this when using MFC in a shared DLL
#else
 Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif

 //LoadStdProfileSettings(0);  // Load standard INI file options
(including MRU)

 // initalize some code
 StartUp();

 // Register the application's document templates.  Document templates
 //  serve as the connection between documents, frame windows and views.

 CSingleDocTemplate* pDocTemplate;
 pDocTemplate = new CSingleDocTemplate(
  IDR_MAINFRAME,
  RUNTIME_CLASS(CVaksDoc),
  RUNTIME_CLASS(CMainFrame),       // main SDI frame window
  RUNTIME_CLASS(CKundenAuswahlView));
 AddDocTemplate(pDocTemplate);

how u can see i create only one template...  later i delete the view in
the splitter wnd and create a new one....
i think it could be that i must register the views on top of the
code..... can u help me????

when u know what's that for a problem... plz notify me.... also per
email... thanx

ingo eberhardt
ke->SOFTWARE



Sun, 14 Jul 2002 03:00:00 GMT  
 failure opening an empty document
Look at the OnNewDocument function in your CVaksDoc class.  Is this function
possibly returning FALSE?


Mon, 15 Jul 2002 03:00:00 GMT  
 failure opening an empty document
BOOL CVaksDoc::OnNewDocument()
{
         if (!CDocument::OnNewDocument())
                return FALSE;
 return true;

Quote:
}

Scot T Brennecke schrieb:
Quote:
> Look at the OnNewDocument function in your CVaksDoc class.  Is this function
> possibly returning FALSE?



Mon, 15 Jul 2002 03:00:00 GMT  
 failure opening an empty document
OK, so if CDocument::OnNewDocument() returns false, there's your problem!


Mon, 15 Jul 2002 03:00:00 GMT  
 failure opening an empty document
i wil try it.......

thanx

ingo eberhardt
ke->SOFTWARE server

Scot T Brennecke schrieb:

Quote:
> OK, so if CDocument::OnNewDocument() returns false, there's your problem!



Tue, 16 Jul 2002 03:00:00 GMT  
 failure opening an empty document
i found out that the failure occurs after


Wed, 17 Jul 2002 03:00:00 GMT  
 failure opening an empty document
i found out that it occurs after or in the block below

CSingleDocTemplate* pDocTemplate;
 pDocTemplate = new CSingleDocTemplate(
  IDR_MAINFRAME,
  RUNTIME_CLASS(CVaksDoc),
  RUNTIME_CLASS(CMainFrame),       // main SDI frame window
  RUNTIME_CLASS(CKundenAuswahlView) );
 AfxMessageBox( "After new, before AddDocTemplate" );
 AddDocTemplate( pDocTemplate );
 AfxMessageBox( "below adddoctemp" );

in the document i wrote in

BOOL CVaksDoc::OnNewDocument()
{
 /*if (!CDocument::OnNewDocument())
  return FALSE;*/
 return true;

Quote:
}

it always give true back.........

plz help me ?!?!?!?!??!?!?!?!?

Ingo Eberhardt
ke->SOFTWARE server



Wed, 17 Jul 2002 03:00:00 GMT  
 failure opening an empty document
I believe the failure is occurring in the CreateNewFrame function, then.  Either
the frame class's CreateObject is failing, or the LoadFrame is failing.


Wed, 17 Jul 2002 03:00:00 GMT  
 failure opening an empty document
when it helps... i use 4 formviews....

at first i create the normal splitter view with the leftview ( treectrl ) and a
normal
formview at the right side....

late i destroy the view on the right side an create a new one... and so one....
i do this to switch between 4 views......... could it be that the document doesnt
like that????

Ingo Eberhardt
ke->SOFTWARE server

Scot T Brennecke schrieb:

Quote:
> I believe the failure is occurring in the CreateNewFrame function, then.  Either
> the frame class's CreateObject is failing, or the LoadFrame is failing.



Thu, 18 Jul 2002 03:00:00 GMT  
 failure opening an empty document
I think the error is occurring during the initial opening of the document.
CreateNewFrame is called by OpenDocumentFile from the template class.  In the
process of creating the frame, the view named in the template constructor is
also created. I don't believe this error has anything to do with swapping views,
since the first view is just then being created.


Fri, 19 Jul 2002 03:00:00 GMT  
 failure opening an empty document
at first i thaught that happend because there are different dlls installed on the
computer
where it doesnt work.... but i copied all dlls from my system folder to the working
folder of the other machine and it always doesnt work...... is use vs6.0 win95b
is there are differences between dlls or other things???????

Ingo Eberhardt
ke->SOFTWARE server

Scot T Brennecke schrieb:

Quote:
> I think the error is occurring during the initial opening of the document.
> CreateNewFrame is called by OpenDocumentFile from the template class.  In the
> process of creating the frame, the view named in the template constructor is
> also created. I don't believe this error has anything to do with swapping views,
> since the first view is just then being created.



Fri, 19 Jul 2002 03:00:00 GMT  
 failure opening an empty document
Ingo,
        If you aren't willing to debug your code to discover the problem, I can't help
you.  I'm not going to speculate about such external things as differing DLLs.
I don't solve problems that way.  The best way to find out why the code is
failing is to step through it and watch it fail.  Anything else is just wasting
time.


Sat, 20 Jul 2002 03:00:00 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. failure till opening a empty document

2. failure to create empty document

3. Start-Up MDI app without opening empty document

4. Prevent certain document open failures from removing MRU

5. Opening documents from within documents

6. Start MDI application with no empty document

7. Failed to create empty document

8. Empty document, help me please

9. "Failed to create empty document"

10. Empty document, help me please

11. MS-C++6.0: Starting without empty document

12. Empty document, help me please

 

 
Powered by phpBB® Forum Software