Yep, you may not use any MFC global functions (those starting with Afx) outside an MFC app. Neither may you include any MFC header (they also start with afx).

You can use every control with pure API, though it is a little easier with MFC (sometimes a lot easier). But you're absolutly right if you want to learn API first.

You don't need the AfxInitRichEdit function. It is only used to prepare MFC internal state for rich edit controls. BTW, it loads riched32.dll. You can load riched20.dll by doing this:
Code:
// global var
HINSTANCE g_hInstRichEdit = NULL;
// during init:
g_hInstRichEdit = LoadLibrary(TEXT("RICHED20.DLL"));
if(g_hInstRichEdit == NULL)
{
  // critical initialization error: could not load required library!
}