为什么输出的是"烫烫烫"?
我的程序是这样的,为什么输出的是"烫烫烫"?怎么解决?
BOOL CEditEx::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message==WM_CHAR)
{
TCHAR c=(TCHAR)pMsg->wParam;
if(c==VK_RETURN)
{
TCHAR ch[10];
int nindex=this->LineFromChar(-1);//当前行号
int rear=this->LineLength(-1);//当前行字符个数
BOOL m_success=0;
if(rear)
{
this->GetLine(nindex,ch);//取出当前行
ch[rear]='\0';
}
CString str=ch;
MessageBox(str);
}
}