Some programs solved the situation by using Rich Edit controls in. And you won't need to include another library (such as MFC or ATL) in your project to make.
Add text to rich edit control
Add text to rich edit control
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.
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;
{
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.