C programming win32 api RichEdit control problem
Posted on 2003-10-29
Hello I am haveing a problem creating a richedit control.I load the riched.dll in the window main like so......
MessageBox(hwnd, "Could not load Riched32.dll", "Error", MB_OK | MB_ICONERROR);
then I create my window in the WM_CREATE like so ......
hEditBox = CreateWindowEx(WS_EX_CLIENTEDGE, "RICHEDIT", "",WS_CHILD | WS_VISIBLE|ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL,
0, 0, 100, 100, hwnd, (HMENU)IDC_MAIN_EDIT, GetModuleHandle(NULL), NULL);
if(hEditBox == NULL)
MessageBox(hwnd, "Could not create hEditBox.", "Error", MB_OK | MB_ICONERROR);
Everything compiles just fine but when I go and run it my MessageBox prompts me it could not create the hEditBox control.I am using windows 98 sec.Can anyone help me out and maybe tell me what I am doing wrong.If anyone needs any more information please let me know.Also I have tried to load the riched20.dll for 2.0 and use RICHEDIT_CLASS with no luck.
Thank you for your time and help