Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

failed to create empty document

74 views
Skip to first unread message

et

unread,
Aug 7, 2006, 4:18:01 AM8/7/06
to
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

unread,
Aug 7, 2006, 11:31:07 AM8/7/06
to
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

"et" <e...@discussions.microsoft.com> wrote in message
news:09ED5277-713B-44AC...@microsoft.com...

Ajay Kalra

unread,
Aug 7, 2006, 2:28:22 PM8/7/06
to

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

unread,
Aug 13, 2006, 6:39:01 AM8/13/06
to
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.

et

unread,
Aug 13, 2006, 6:43:01 AM8/13/06
to
I'm very grateful to YOU, Ajay for writing me.

et

unread,
Aug 16, 2006, 6:35:01 AM8/16/06
to
How do I initialize RichEdit controul in Initinnstance()? Please write me an
example.
Thank you!

Ajay Kalra

unread,
Aug 16, 2006, 2:48:21 PM8/16/06
to
> 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

unread,
Aug 21, 2006, 10:58:02 AM8/21/06
to
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?
0 new messages