Discussion:
failed to create empty document
(too old to reply)
et
2006-08-07 08:18:01 UTC
Permalink
When I run a program progect for drawing figures from Chuck Sphare's user
friendly textbook "Visual C++ 6.0"(introductory edition with examples with
two CD)
I compile it and after compilation ->*.exe file -> dilog box with message "
failed to create empty document" and I cannot execute *.exe file. My OS is
Windows'98.
Ihave no idea what to do. Please, help me!
Tom Serface
2006-08-07 15:31:07 UTC
Permalink
I don't know about the examples from the book, but does this apply to your
test program:

http://support.microsoft.com/kb/q166132/

Tom
Post by et
When I run a program progect for drawing figures from Chuck Sphare's user
friendly textbook "Visual C++ 6.0"(introductory edition with examples with
two CD)
I compile it and after compilation ->*.exe file -> dilog box with message "
failed to create empty document" and I cannot execute *.exe file. My OS is
Windows'98.
Ihave no idea what to do. Please, help me!
et
2006-08-13 10:39:01 UTC
Permalink
Hi Tom,
I'm very grateful to you for writing me that hyperlink. There I read that
the reason that appears "failed to greate empty document" is the RichEdit
control is not initialised. I read in the Help about AfxInitRichEdit function
and there is written it's no need to call it , provided we use rich edit via
CRichEditView, CRichEditCtrl or CRichEditDoc. In Edit\Find in Files I found
for AfxInitRich:
c:\Program Files\Microsoft Visual Studio\MFC\SRC\View
->CRichEditView::PreCreate Window(....)

C:\Progr. Files\Microsoft Visual Studio\VC98\MFC\SRCWinCtrl4.cpp:
CRichEditCtrl::Create(....)

So, that is in these paths in my project which is named "mdrw" in a
collaboration with the textbook "Learn Microsoft Visual C++6.0 Now",Author
Chuck Sphar. He is a former officer in a Microsoft Corporation.
That's why there no need I have to call AfxInitRichEdit function.
Well, I suppose in the examples of the book could hardly be any mistakes,
but I don't no what I have to do.
Post by Tom Serface
I don't know about the examples from the book, but does this apply to your
http://support.microsoft.com/kb/q166132/
Tom
Post by et
When I run a program progect for drawing figures from Chuck Sphare's user
friendly textbook "Visual C++ 6.0"(introductory edition with examples with
two CD)
I compile it and after compilation ->*.exe file -> dilog box with message "
failed to create empty document" and I cannot execute *.exe file. My OS is
Windows'98.
Ihave no idea what to do. Please, help me!
et
2006-08-16 10:35:01 UTC
Permalink
How do I initialize RichEdit controul in Initinnstance()? Please write me an
example.
Thank you!
Post by et
Hi Tom,
I'm very grateful to you for writing me that hyperlink. There I read that
the reason that appears "failed to greate empty document" is the RichEdit
control is not initialised. I read in the Help about AfxInitRichEdit function
and there is written it's no need to call it , provided we use rich edit via
CRichEditView, CRichEditCtrl or CRichEditDoc. In Edit\Find in Files I found
c:\Program Files\Microsoft Visual Studio\MFC\SRC\View
->CRichEditView::PreCreate Window(....)
CRichEditCtrl::Create(....)
So, that is in these paths in my project which is named "mdrw" in a
collaboration with the textbook "Learn Microsoft Visual C++6.0 Now",Author
Chuck Sphar. He is a former officer in a Microsoft Corporation.
That's why there no need I have to call AfxInitRichEdit function.
Well, I suppose in the examples of the book could hardly be any mistakes,
but I don't no what I have to do.
Post by Tom Serface
I don't know about the examples from the book, but does this apply to your
http://support.microsoft.com/kb/q166132/
Tom
Post by et
When I run a program progect for drawing figures from Chuck Sphare's user
friendly textbook "Visual C++ 6.0"(introductory edition with examples with
two CD)
I compile it and after compilation ->*.exe file -> dilog box with message "
failed to create empty document" and I cannot execute *.exe file. My OS is
Windows'98.
Ihave no idea what to do. Please, help me!
Ajay Kalra
2006-08-16 18:48:21 UTC
Permalink
Post by et
How do I initialize RichEdit controul in Initinnstance()? Please write me an
example.
Use the appropriate one:

AfxInitRichEdit2/AfxInitRichEdit

http://msdn2.microsoft.com/en-us/library/h6hweatz.aspx

---
Ajay
et
2006-08-21 14:58:02 UTC
Permalink
Hi Ajay,
The first requirement of the hyperlink for Afxcmn.h is performed. It exists
in the project. But how do I open mdrw.rc(mdrw is my project) file as text.
*.rc file is a listing and includes the icons, bitmap and so on. There is
*.rc2 file which contains resources that are not editable by the resource
editor in this file. But it's something other than. That's why I can't
change RichEdit to "RichEdit20a". What I have to do?
Post by Ajay Kalra
Post by et
How do I initialize RichEdit controul in Initinnstance()? Please write me an
example.
AfxInitRichEdit2/AfxInitRichEdit
http://msdn2.microsoft.com/en-us/library/h6hweatz.aspx
---
Ajay
Ajay Kalra
2006-08-07 18:28:22 UTC
Permalink
Post by et
When I run a program progect for drawing figures from Chuck Sphare's user
friendly textbook "Visual C++ 6.0"(introductory edition with examples with
two CD)
I compile it and after compilation ->*.exe file -> dilog box with message "
failed to create empty document" and I cannot execute *.exe file. My OS is
Windows'98.
Ihave no idea what to do. Please, help me!
In addition to the article mentioned by Tom, I have seen this message
if doctemplate has not been created. Step in the code and debug to
narrow it down.

---
Ajay
et
2006-08-13 10:43:01 UTC
Permalink
I'm very grateful to YOU, Ajay for writing me.
Post by Ajay Kalra
Post by et
When I run a program progect for drawing figures from Chuck Sphare's user
friendly textbook "Visual C++ 6.0"(introductory edition with examples with
two CD)
I compile it and after compilation ->*.exe file -> dilog box with message "
failed to create empty document" and I cannot execute *.exe file. My OS is
Windows'98.
Ihave no idea what to do. Please, help me!
In addition to the article mentioned by Tom, I have seen this message
if doctemplate has not been created. Step in the code and debug to
narrow it down.
---
Ajay
Continue reading on narkive:
Loading...