Output box.
-
I am using a common edit control for the purpose of displaying output in text format in my application. Every time I need to write something to the screen I find that I need to put the contents of the edit box into a string put the new output into anothor string, concatenate these two strings togethor and then output this new longer string to the screen. For simplicities sake isn't there a way to just call a function similar to idcoutput->SetWindowText(); that will add text and not overwrite the box with the new text? Thank you, Eric Sepich
-
I am using a common edit control for the purpose of displaying output in text format in my application. Every time I need to write something to the screen I find that I need to put the contents of the edit box into a string put the new output into anothor string, concatenate these two strings togethor and then output this new longer string to the screen. For simplicities sake isn't there a way to just call a function similar to idcoutput->SetWindowText(); that will add text and not overwrite the box with the new text? Thank you, Eric Sepich
If you're using CStrings there is a function called 'Append' that lets you add to a string. From the looks of it you aren't using DDX so you're still going to have to call SetWindowText in order to set it, but the append function will allow you to just add to the string. Not sure if this is the case for strings other than CStrings, but I bet any type of string has this functionality. Mike
-
I am using a common edit control for the purpose of displaying output in text format in my application. Every time I need to write something to the screen I find that I need to put the contents of the edit box into a string put the new output into anothor string, concatenate these two strings togethor and then output this new longer string to the screen. For simplicities sake isn't there a way to just call a function similar to idcoutput->SetWindowText(); that will add text and not overwrite the box with the new text? Thank you, Eric Sepich
CHARRANGE crEnd = {-1, -1};
SendMessage(hwnd, EM_EXSETSEL, 0, LPARAM(&crEnd));
SendMessage(hwnd, EM_REPLACESEL, FALSE, LPARAM(pszText));Your class library of choice probably wraps those messages into something prettier, but that's the plain SDK version of what you are looking for. -- -Blake (com/bcdev/blake)