I'm setting a Text in an EditBox with "SetDlgItemText"-Function. And I want that the second time I use this function, the Text is displayed in a new line.
But in my tests, the old Text is just overwritten, when I'm calling the "SetDlgItemText"-Function the second time.

Any Ideas how to solve this problem...
Posted on 2003-03-11 15:16:23 by ChigpA
Hi ChigpA,

You could use GetDlgItemText to retrieve the current text from the edit window, then concatinate the current text with the new line and new text. Then use SetDlgItemText to display the change.

I don't think it's possible to "add" a string to the end without having to replace the whole text with the modifications.

Posted on 2003-03-11 15:29:47 by JamesE
I use this code [http://www.john.findlay1.btinternet.co.uk/Snippets/ApendTxt.htm]. Sorry, but it is written in C, you have to translate to Win32ASM... Basically it select 'nothing' at the end of the text and then replace the selection with the new text line.
Posted on 2003-03-11 16:10:41 by LuHa
Thats an interesting way to do it Luha
Posted on 2003-03-11 16:51:44 by JamesE
Try invoke SendMessage,hwnd,uMsg,wParam,lParam

hwnd = handle of the EditBox
wParam = 0
lParam = address to your text

To insert a linefeed just SendMessage with lParam = address to crlf where crlf db 0Dh,0Ah,0 (ascii for carriage return and line feed)
Posted on 2003-03-12 00:59:44 by minor28
thx minor 28

I'll try it, sounds good
Posted on 2003-03-12 07:20:31 by ChigpA