如题,先谢过

解决方案 »

  1.   


    CString CCodeToLight::DBCTOSBC(CString strInput)
    {
        char *pSzTemp = new char[strInput.GetLength() + 1];
        CString strResult;
        BYTE c1, c2;    pSzTemp = (LPSTR)(LPCTSTR)strInput;
        for (int i = 0; i < strInput.GetLength(); i++)
        {
            c1 = pSzTemp[i];
            c2 = pSzTemp[i + 1];        if (163 <= c1)
            {
                strResult = strResult + char(c1);
                strResult = strResult + char(c2);
                i++;
            }
            else if (' ' == c1)
            {
                strResult = strResult + char(161);
                strResult = strResult + char(161);           
            }
            else if (163 > c1)
            {
                strResult = strResult + char(163);
                strResult = strResult + char(c1 + 128);
            }
        }    return strResult;
    }
    这个是C++下面写的半角转成全角,你调用这个,然后你稍作修改就可以了。
    至于要得到,你就传递"."进去就可以得到了。
      

  2.   

    你这个字符半角下也显示不出来哦。
    半角转全角可以用vb方法,添加Microsoft.VisualBasic.dll引用。
    在代码中using Microsoft.VisualBasic;
    string s = "・";
    string s2 = Strings.StrConv(s, VbStrConv.Wide,1);