Hello...
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...
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...
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.
James
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.
James
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.
Thats an interesting way to do it Luha
Try invoke SendMessage,hwnd,uMsg,wParam,lParam
hwnd = handle of the EditBox
uMsg = EM_REPLACESEL
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)
hwnd = handle of the EditBox
uMsg = EM_REPLACESEL
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)
thx minor 28
I'll try it, sounds good
I'll try it, sounds good