大家帮我看看,CString:Right()用法,我错在哪了?
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,str1;
m_Inf.GetWindowText(str);
str1=str.Right(1);
MessageBox(str1,0,0);
[解决办法]
void CWinsockClientDlg::OnChangeEditInf()
{
CString str;
m_Inf.GetWindowText(str);
//str.ReleaseBuffer;
str = str.Right(1);
MessageBox(str,0,0);
}