Is there another/better way to add text to RichEdit-control ?
void Add2REdit(HWND hEdit, char *szText)
{
SETTEXTEX st = {ST_SELECTION, CP_ACP};
SendMessage(hEdit, EM_SETTEXTEX, (WPARAM)&st, (LPARAM)szText);
}
An example:
Add2REdit(hEdit, "{\\rtf\\ansi\\deff0{\\fonttbl{\\f0 New Courier;}}Text1\\par \\b Text2\\par ");
Add2REdit(hEdit, "{\\rtf\\ansi\\deff0{\\fonttbl{\\f0 New Courier;}}Text3\\par \\b Text4\\par ");