I know this may sound like a stupid questions , but everytime i insert a rich edit control in my dialog box ( or forms) , and execute it , i receive an error message , cannot initialize empty control !!!1
Printable View
I know this may sound like a stupid questions , but everytime i insert a rich edit control in my dialog box ( or forms) , and execute it , i receive an error message , cannot initialize empty control !!!1
Hi,
You have just to insert the following line, before creating the CRichEditCtrl object:
AfxInitRichEdit( );
Actually when we insert rich edit control at design time(not run time), we don't get the creation line in our source code. so where to call that function AfxInitRichEdit() ?
You can call AfxInitRichEdit() in the constructor of the dialog where you are using the CRichEditCtrl.
Hi,
A better recommended approach is to call AfxInitRichEdit()in your
CWinApp::InitInstance(). This is a Global function that will initialize
the richedit control by loading the necessay system DLL'S
Good Luck