当我鼠标单击在第一个框重新输入六个字符的时候希望替换的原来-->是点击第一个框的时候,清除原来的吧?
当点击之后,你使用SetSel(0,-1)选择所有字符,然后用CEdit的成员函数Clear()清除数据就好啦。
void SetSel( int nStartChar, int nEndChar, BOOL bNoScroll = FALSE );
nStartChar
Specifies the starting position. If nStartChar is 0 and nEndChar is –1, all the text in the edit control is selected. If nStartChar is –1, any current selection is removed.