Perhaps you haven't called AfxInitRichEdit before trying to use that control?