• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 536
  • Last Modified:

Issue with Rich Edit 2.0 Control

I am having an issue with adding a rich edit 2.0 control to a dialog MFC application.  I have an existing application and I added a dialog to display a log.  If I use a multi line edit box it shows in it but the line breaks dont work.  I wanted to use a rich edit 2.0 control but every time I add it it compiles fine but when I click view log it crashes with debug assertion failed.  So I tried creating a new test app with the MFC wizard and adding a rich edit 2.0 control to the main dialog and it to crashes.  So I installed .net 2002 versus .net 2003 and STILL same issue.  So I built a second windows computer and installed .vs .net 2002 and I tried again to create a new clean app and add a rich edit 2.0 control and it just crashes.  If I take the rich edit 2.0 control out it load the dialog with no issue.  Any no what I am doing wrong here????
0
acameron
Asked:
acameron
1 Solution
 
AlexFMCommented:
From MSDN topic "CRichEditCtrl Class":
If you are using a rich edit control in a dialog box (regardless whether your application is SDI, MDI, or dialog-based), you must call AfxInitRichEdit once before the dialog box is displayed. A typical place to call this function is in your program's InitInstance member function.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now