Solved

richedit cotrol

Posted on 2002-03-19
3
214 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

707 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

12 Experts available now in Live!

Get 1:1 Help Now