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

richedit cotrol

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
mimd
Asked:
mimd
1 Solution
 
Roshan DavisCommented:
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
 
SteveGTRCommented:
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
 
mimdAuthor Commented:
thank you it worked for me.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

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