Lamer's question
How to append a NEW line in standard EDIT control in Win32?
I use this sequence in C
==============
int ndx = GetWindowTextLength (hEditLog);
SendMessage (hEditLog, EM_SETSEL, (WPARAM)ndx, (LPARAM)ndx);
SendMessage (hEditLog, EM_REPLACESEL, 0, (LPARAM) ((LPSTR) szBuf));
==================

But what symbols (10, 13 '\n')make the edit to switch to the next line and how to make it not to print black rectangles for these control symbols?
Posted on 2002-11-11 16:27:33 by Sergo
You should use \r\n (C style) aka 0x0D 0x0A. Funny, some days ago I posted on this web site a snippet to obtain the same effect of your piece of code but with string formatting capabilities... If you would like to give a look to... :grin:
Posted on 2002-11-11 16:40:08 by LuHa
Thanks a lot, I thought it was impossible.
Amazing, it works.
My last unsuccesful attempt was 10,13 ;(
What was the filename you posted on that website?
Posted on 2002-11-11 19:40:44 by Sergo
Posted on 2002-11-12 04:59:18 by LuHa
But what symbols (10, 13 '\n')make the edit to switch to the next line and how to make it not to print black rectangles for these control symbols?

To do that you have to set the style of the edit control to be ES_MULTILINE

Furthermore your code should be ok

hmm.. you should pass 0Dh, 0Ah (CRLF) or rather 10 and 13 in decimal.
Posted on 2002-11-12 05:52:14 by roticv
Hi,

13 and 10, not 10 and 13...

Greetings,
(S)
Posted on 2002-11-13 12:55:33 by Sm?rebr?d