Solved

dialog creation fails for rich edit control

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need to retreive data from .TFS file exported by DVR 8 218
substring method in java 1 129
sumHeights2  challenge 7 114
Fibonacci challenge 11 133
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

856 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