Menu

#70 Add String::Collate() support for Windows CE

wont-fix
None
5
2017-11-14
2007-06-13
hfann
No

Currently, CString::Collate() and CString::CollateNoCase() methods (atlmisc.h) are not available on Windows CE. I suggest adding the following Windows CE compatible version:

inline int CString::Collate(LPCTSTR lpsz) const
{
int nRet = CompareString(LOCALE_USER_DEFAULT, 0, m_pchData, -1, lpsz, -1);
ATLASSERT(nRet != 0);
return nRet - CSTR_EQUAL; // Convert to strcmp convention.
}

inline int CString::CollateNoCase(LPCTSTR lpsz) const
{
int nRet = CompareString(LOCALE_USER_DEFAULT, NORM_IGNORECASE, m_pchData, -1, lpsz, -1);
ATLASSERT(nRet != 0);
return nRet - CSTR_EQUAL; // Convert to strcmp convention.
}

Herbert

Discussion

  • Nenad Stefanovic

    • assigned_to: nobody --> nenadstefanovic
     
  • Nenad Stefanovic

    • status: open --> wont-fix
    • Group: --> Next Release (example)
     
  • Nenad Stefanovic

    WTL doesn't support Windows Mobile any more

     

Anonymous
Anonymous

Add attachments
Cancel