Solved

Create RichEdit Control

Posted on 2006-07-10
2
572 Views
Last Modified: 2013-11-20
I have two applications.
In both of them I create RichEdit control

m_edCtrl.CreateEx(wsex,"RICHEDIT",NULL,WS_CHILD|WS_VISIBLE|ES_LEFT|ES_MULTILINE|ES_READONLY,
         rcDummy, this, (UINT)IDC_STATIC,NULL);

In the intialization I do:  RichEditDLL=LoadLibrary(_T("RICHED32.DLL"));

But, In one it creates the control, and in the other it does not. Why???
0
Comment
Question by:VapiSoft
2 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 500 total points
ID: 17071105
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.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

803 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