16,548
社区成员




void FormString(CString& strText, const int TOKEN)
{
int nLen = strText.GetLength();
if(nLen < TOKEN)
{
return ;
}
CString strTmp(_T(""));
int nIndex = nLen;
while(nIndex > 0)
{
strText.Insert(nIndex, _T(","));
nIndex -= TOKEN;
}
AfxMessageBox(strText);
}
// 调用方法
#define MAX_TOKEN 3
CString strText = _T("1234567890");
FormString(strText, MAX_TOKEN);