Ok, so I created an empty c++ project on visual studio. I created the main window, now I just added a Rich Edit control on it.
I don't know how to write text to it using code... I don't want to use an mfc app btw. I tried hTextZone->ReplaceSel("sometext"); and hTextZone->Lines->Add("text"); but I can't write text to my rich edit control.
Thanks in advance.
I don't know how to write text to it using code... I don't want to use an mfc app btw. I tried hTextZone->ReplaceSel("sometext"); and hTextZone->Lines->Add("text"); but I can't write text to my rich edit control.
Code:
LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
static HWND hTextZone;
LoadLibrary("RICHED20.DLL");
switch (uMsg)
{
case WM_CREATE:
hTextZone = CreateWindow("RichEdit20A", "", WS_CHILD | WS_VISIBLE | ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_NUMBER | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 5, 5, 580, 402, hwnd, NULL, hinst, NULL);
return 0;
Thanks in advance.