void CWinsockClientDlg::OnChangeEditInf()
{
CString str;
m_Inf.GetWindowText(str);
str.ReleaseBuffer;
str.Right(1);
MessageBox(str,0,0);
}我想每次在文本框按键时,显示出当前的字符,可结果老不正确。example:
键入a,输出a
再键入b,则输出ab不解??
{
CString str;
m_Inf.GetWindowText(str);
str.ReleaseBuffer;
str.Right(1);
MessageBox(str,0,0);
}我想每次在文本框按键时,显示出当前的字符,可结果老不正确。example:
键入a,输出a
再键入b,则输出ab不解??
m_Inf.GetWindowText(str);
//str.ReleaseBuffer;
str=str.Right(1);
MessageBox(str,0,0);
m_Inf.GetWindowText(str);
str1=str.Right(1);
MessageBox(str1,0,0);
{
CString str;
m_Inf.GetWindowText(str);
//str.ReleaseBuffer;
str = str.Right(1);
MessageBox(str,0,0);
}
m_Inf.GetWindowText(str);
MessageBox(str,0,0);
直接这样不行?
你的方法完全正确,本人刚接触MFC,还是不甚了解!谢谢你了!