判断CString 是否含有中文

BOOL HasChineseChar(CString Cstr)
{
int nLen = Cstr.GetLength();
unsigned char ch1, ch2;
for(int i = 0; i != nLen; ++i)
{
ch1 = Cstr[i];
if (ch1 >= 0xA0)
{
return TRUE;
}
else
{
continue;
}

return FALSE;


}
posted @ 2012-12-06 15:28  废弃账号  阅读(301)  评论(0编辑  收藏  举报