as a newbie to the rich edit control, i want to create a simple rich edit for my chat program. The rich edit control will contain text that other people send.
now the problem is how do i start?
1. i use VC6++ to create a rich edit control using resource editor
2. read on MSDN to do "LoadLibrary("riched20.dll ") ;"
but the dialog doesnt even show up when i added the rich text control in. any idea how to start using rich edit?
btw using visual
- c++6.0
- win98
- used to API style of working
Code:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
WNDCLASSEX wc;
HWND hwnd;
MSG Msg;
wc.cbSize = sizeof(WNDCLASSEX);
//and so on.... the styles dont matter coz i am making an invisible window that doesnt show up
LoadLibrary("riched20.dll ") ; // I loaded library but no the dialog doesnt show up when rich edit control is added into the dialog resource
hwnd = CreateWindowEx(
0,
"myWindowClass",
"The title of my window",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 240, 120,
NULL , NULL, hInstance, NULL);
if(hwnd == NULL)
{
MessageBox(NULL, "Window Creation Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}
while(GetMessage(&Msg, NULL, 0, 0) > 0)
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
return Msg.wParam;
}