Solved

richedit cotrol

Posted on 2002-03-19
3
223 Views
Last Modified: 2013-11-20
i use win xp and visual c++6.0.whenever i place a richedit control and try to execute,my exe does not get
executed,but i get no compilation erroe.
at the same time the same project with the richedit control executes fine under win 98.

what is the problem?should i register any .ocx control or it is the error of xp.

help me.
0
Comment
Question by:mimd
3 Comments
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 6881969
From MSDN

"Important:-   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. You do not need to call it for each time you display the dialog box, only the first time. You do not have to call AfxInitRichEdit if you are working with CRichEditView."


Roshmon
0
 
LVL 30

Accepted Solution

by:
SteveGTR earned 100 total points
ID: 6882535
Be sure to check the return value of AfxInitRichEdit(). A value of FALSE indicates that the RICHED32.DLL could not be loaded.

if (!AfxInitRichEdit())
  {
  // RichEdit controls did not initialize!
  }

Good Luck,
Steve
0
 

Author Comment

by:mimd
ID: 6887592
thank you it worked for me.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

791 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