如果用替换某一行,用LineIndex,即EM_LINEINDEX
int nBegin, nEnd;
// Replace the second line, if it exists, of the edit control
// with the text lpszmyString.
if ((nBegin=pmyEdit->LineIndex(1)) != -1)
{
nEnd = nBegin + pmyEdit->LineLength(1);
pmyEdit->SetSel(nBegin, nEnd);
pmyEdit->ReplaceSel(lpszmyString);
}