I am trying to put default text into a Edit Control when I run my program. It sort of works, but if I want to put line feeds in, it screws up on the display.
char *buff = "Temp.\n\rRar.";
SetDlgItemText(hWnd, IDC_EDIT_TEXT, (LPCTSTR)buff);
When I run this, the output in the window has two vertical bars where the \n\r are supposed to be. I just tried to copy and paste the output from my program, and those bars somehow turn into the carriage return when I paste it, but on the screen it looks wrong. If I run the program and hit enter within the edit control, it works just fine, so I think the problem has something to do with the way I send default text to my edit control.
I've tried using
SetWindowText(hList, buff);
where hList is a handle to IDC_EDIT_TEXT, and it displays the text, but still has the same problem with the two bars appearing where the \n\r is supposed to be.
I've tried switching to a rich edit control, but if I put a rich edit control on my dialog the program won't display anything, and I haven't found a way to fix that yet. I've tried the
InitCommonControls();
statement, but it doesn't seem to help. I'm not even sure making a rich edit field would fix the problem though.
Any help would be appreciated. Thanks.