|
Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte. Informations supplémentaires.
|
Traduction
Source
|
CEdit::LineIndex
Visual Studio 2012
int LineIndex( int nLine = -1 ) const;
// The string for replacing. CString strString(_T("Hi, we're the replacements.")); int nBegin, nEnd; // Replace the second line, if it exists, of the edit control // with the text strString. if ((nBegin = m_myEdit.LineIndex(1)) != -1) { nEnd = nBegin + m_myEdit.LineLength(nBegin); m_myEdit.SetSel(nBegin, nEnd); m_myEdit.ReplaceSel(strString); }