Hello Everybody,
I have a problem how do i Append a string in an RichEdit box in Win32 API.
Thanking You,
Sonali.....
HAVE A GUD DAY!!!!!
Printable View
Hello Everybody,
I have a problem how do i Append a string in an RichEdit box in Win32 API.
Thanking You,
Sonali.....
HAVE A GUD DAY!!!!!
SendMessage(hWnd, EM_SETSEL, - 1, 0);
SendMessage(hWnd, EM_REPLACESEL, (WPARAM)bCanUndo, (LPARAM)text);
I don't remember what exactly must be -1, 0 or 0, -1 in the first SendMessage.
CHARRANGE cr;
cr.cpMin = -1;
cr.cpMax = -1;
SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM)&cr);
SendMessage(hwnd, EM_REPLACESEL, 0, (LPARAM)stringtoadd);