第一种:都变为大写 或者都变成小写。
str1.MakeUpper();
str2.MakeUpper();
or:
str1.MakeLower();
str2.MakeLower();
if(str1==str2)
AfxMessageBox("两个CString相同");
第二种:通过CString.CompareNoCase(),部分大小写比较。
if (str1.CompareNoCase(str2) == 0 )
AfxMessageBox("两个CString相同");;