LPCTSTR szBuf = (LPCTSTR)&nChar; AfxMessageBox(szBuf); 试下

解决方案 »

  1.   

    汉字会发送两次吧。俺发送过,好像就是发送两次,使用unicode的话,英文和汉字就一样了。
      

  2.   

     if (IsDBCSLeadByte( nChar ))
       {
       if ( flg )
       {
       ch_zn[1] = nChar;
       flg = false;
       CString  msg;
       msg.Format( "%s", ch_zn );
       AfxMessageBox( msg );
       }
       else
       {
       memset( ch_zn, 0x00, sizeof( ch_zn ) );
           ch_zn[0] = nChar;
       flg = true;
       }
       }已经测试成功,若需要源码。联系我