Solved

dialog creation fails for rich edit control

Posted on 1997-06-18
5
490 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
mixString challenge 36 98
Looking for a specific application/software 2 91
dog bark java program 15 82
zeroMAx challenge 20 76
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now