Solved

dialog creation fails for rich edit control

Posted on 1997-06-18
5
525 Views
Last Modified: 2013-11-20
I have a dialog that contains a CEdit control. The creation
(call of DoModal () of the dialog related class) works fine.
If I replace the edit control by a rich text edit control I get the
warning "Dialog creation failed!".

Why? Do I have to make something special for dialogs that
contain rich text edit  controls?

I am using VC++ 5.0.
0
Comment
Question by:european
  • 3
5 Comments
 
LVL 4

Accepted Solution

by:
AVaulin earned 50 total points
ID: 1302180
It sounds like you want to attach Edit control to CRichEditView object. But you can't do this. If you want to use rich edit control you must add it in OnInitDialog method with help Create method. Be sure that CRichEditView object is dialog class member.
Good luck.
0
 
LVL 1

Expert Comment

by:MarkusLoibl
ID: 1302181
I think that is'n the problem. I tried using CRichEditCtrl, and that has nothing to do with CRichEditView, and I resolved the problems described above. Also SubClassDlgItem() didn't work.
0
 
LVL 4

Expert Comment

by:AVaulin
ID: 1302182
OK! Can you show more code? Best way is sending sources to me (I'm at av@protec.kiev.ua). I sure that I can help you.
0
 

Author Comment

by:european
ID: 1302183
The problem is very easy to reproduce:

Start VC5++. Create a new project with
New/Project.
Select "MFC AppWizard (exe)",
and create a Dialog based application.

Compile and run the application - everything
is fine.

Add a RichEdit control to the Dialog using
the resource editor. Recompile and run
the program. The program will instantly
exit, with a warning that the dialog could
not be created (in debug mode).
0
 
LVL 4

Expert Comment

by:AVaulin
ID: 1302184
OK! I really use VC 4.1 (it haven't posibility to add rich control to dialog). I've tried to do what you did with VC 5.0 and saw situation like you. The only way I see to solve your problem is deleting rich control from dialog resource and adding it in OnInitDialog method with help Create method.
Try and if you'll see no success you must reject my answer to give posibility to answer another experts.
Good luck.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Perl Awk Need Help 3 136
dog bark java program 15 119
has22 challenge 11 106
withoutTen challenge 14 137
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question