You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# pragma once
class CMapStringToPtrNoCase : public CMapStringToPtr {
public :
BOOL Lookup ( LPCTSTR key , void * & rValue ) const {
CString currentKey ;
POSITION pos = GetStartPosition ( ) ;
while ( pos ) {
GetNextAssoc ( pos , currentKey , rValue ) ;
if ( _tcsicmp ( currentKey , key ) = = 0 ) {
return TRUE ;
}
}
return FALSE ;
}
//// 重载HashKey方法, 使用CString::MakeUpper方法将键值转换为大写, 然后调用父类的HashKey方法
//UINT HashKey(LPCTSTR key) const {
// CString upperKey = key;
// upperKey.MakeUpper();
// return CMapStringToPtr::HashKey(upperKey);
//}
//// 重载CompareElements方法, 使用CString::CompareNoCase方法来比较键值
//BOOL CompareElements(LPCTSTR key1, LPCTSTR key2) const {
// CString strKey1(key1);
// CString strKey2(key2);
// return strKey1.CompareNoCase(strKey2) == 0;
//}
} ;