MFC判断编辑框是否为中文
//判断是否为中文
bool IsChinese(CString p_str)
{
int t_intLen = p_str.GetLength();
if(p_str.GetLength()<=0)
{
return false;
}
CString str = p_str;
for(int i = 0 ; i <str.GetLength();i++)
{
//unicode 大于255为中文
int unicode = (int)str.GetAt(i);
if (unicode > 255)
{
return true;
}
else
{
}
}
return false;
}