If you ever tried RichEdit control in Vc++ , may be at first use you will notice that your application may crash , or the dialog is not coming. The problem is , the RichEdit module is not loaded to memory initially. We need to load it explicitly. IF you are using MFC there are functions like
AfxInitRichEdit2(); // RichEdit Version 2and
AfxInitRichEdit(); // RichEdit version 1.
If you are doing pure win32 , just by loading the richedit2.dll to meory will solve the problems , like
LoadLibrary("c:\\WINDOWS\\system32\\riched20.dll"); // this is richedit version 2.also remember to unload the module with FreeLibrary function.
You need to call the approrpiate function (AfxInitRichEdit or LoadLibrary) before creating richedit. The best way is to call is in the InitInstance in MFC , or winmain Win32.