This function works to append text to the end of the window, but I'd like it to append it with a newline/break, appending \n doesn't seem to work.
if the current text in the text box is "cat" and i append "dog" the result will be "catdog" but i want it to be:
"cat
dog"
void appendmessage(LPCTSTR newText, HWND hwnd)
{
SendMessage(hwnd, EM_SETSEL, 0, -1);
SendMessage(hwnd, EM_SETSEL, -1, -1);
SendMessage(hwnd, EM_REPLACESEL, 0, (LPARAM)TEXT(newText));
}