int aa= 12345;
CString bb;
bb.Format("%d",aa);
......

解决方案 »

  1.   

    本来没什么可说的了,可还是说一句,请 coffee_black (黑咖啡)不要介意啊,其实呢这样的问题你大可随便翻翻书就知道了,不过来这里也可以提醒一下另外的初学者也算一件好事!
      

  2.   

    直接用:pMsg->m_channel1 = itoa()就行了
    CString可对多个数据格式化
    单个还用:itoa(), atoi(), atof()...
      

  3.   

    int -> CString         int x=1000;
            CString temp;
            temp.Format("%d",x);
            //new temp="1000";
    CString -> int 
            CString temp="10000";
            int x=0;
            x=StrToInt(temp);         //now x=1000;
            //Detail 
    //         Header: Declared in shlwapi.h. 
    //         Import Library: shlwapi.lib.