Just to complete the answers already posted, have a look in this FAQ: How to append text to an edit control?
If you want add lines to a multiline edit control, it's much better to use CEdit::SetSel and CEdit::ReplaceSel instead of CWnd::GetWindowText and CWnd::SetWindowText.