1)
Code:
GetWindowText (windowID, char, sizeofarray);
so basicly,
Code:
GetWindowText (hwnd, buffer, 50);
2) use the
Code:
SetWindowText(windowID, char );
3) using SetWindowText() will clear all contents of the window your writing to before adding new text, you can use a AppendText() to add to a window without destroying contents which is like
Code:
void AppendText(HWND childt, char* TXT)
{
/* Move selection to end of text */
SendMessage(childt, EM_SETSEL,
GetWindowTextLength(windowID),
GetWindowTextLength(windowID));
/* Add the text line and scroll it into view */
SendMessage(windowID, EM_REPLACESEL, FALSE, (LPARAM) TXT);
SendMessage(windowID, EM_SCROLLCARET, 0, 0);
}
then just use the
Code:
AppendText(windowID, char );
function to add text
also easy way to clear a single window would be to
Code:
SetWindowText(windowID, "");
hope that helps