Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

richedit

Status
Not open for further replies.

DeCoDeR

Programmer
Jun 4, 2002
37
0
0
US
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
 
in CreateWindow use RICHEDIT_CLASS instead of "RICHEDIT_CLASS"

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top