how can i create a richedit without mfc ?
below code gets an error message of 1407 which means class name not found
-=-----------
HINSTANCE hInst;
static HWND hwndRichEdit = NULL;
DWORD dw;
switch (msg)
{
case WM_CREATE:
hInst = LoadLibrary("RICHED20.DLL");
if ( NULL == hInst)
{
MessageBox(NULL,"RICHEDIT Loading Error!!","ERROR",MB_OK|MB_ICONSTOP);
PostQuitMessage(0);
return 0;
}
hwndRichEdit = CreateWindow("RICHEDIT_CLASS",NULL,WS_CHILD|WS_HSCROLL|WS_VISIBLE|WS_VSCROLL,
0,0,0,0,hwnd,(HMENU)100,hInstance,NULL);
dw = GetLastError();
if ( NULL==hwndRichEdit)
{
MessageBox(NULL,"RICHEDIT Creating!!","ERROR",MB_OK|MB_ICONSTOP);
PostQuitMessage(0);
return 0;
}
break;
case WM_SIZE:
MoveWindow(hwndRichEdit,0,0,LOWORD(lParam),HIWORD(lParam),TRUE);
break;
Read between the lines
below code gets an error message of 1407 which means class name not found
-=-----------
HINSTANCE hInst;
static HWND hwndRichEdit = NULL;
DWORD dw;
switch (msg)
{
case WM_CREATE:
hInst = LoadLibrary("RICHED20.DLL");
if ( NULL == hInst)
{
MessageBox(NULL,"RICHEDIT Loading Error!!","ERROR",MB_OK|MB_ICONSTOP);
PostQuitMessage(0);
return 0;
}
hwndRichEdit = CreateWindow("RICHEDIT_CLASS",NULL,WS_CHILD|WS_HSCROLL|WS_VISIBLE|WS_VSCROLL,
0,0,0,0,hwnd,(HMENU)100,hInstance,NULL);
dw = GetLastError();
if ( NULL==hwndRichEdit)
{
MessageBox(NULL,"RICHEDIT Creating!!","ERROR",MB_OK|MB_ICONSTOP);
PostQuitMessage(0);
return 0;
}
break;
case WM_SIZE:
MoveWindow(hwndRichEdit,0,0,LOWORD(lParam),HIWORD(lParam),TRUE);
break;
Read between the lines