Author: David WebberDavid Webber Date: Jun 13, 2008 23:58
"Joseph M. Newcomer" flounder.com> wrote in message
news:8i2554d5mpbhu7moa9qpv9jthjt87gqcgo@4ax.com...
> What is the value of CUnicodeString over CStringW? Or, if you are
> compiling for Unicode,
> just CString?
Looking at CodeGuru, CUnicodeString dates from 2000, which I suspect was
before CStringW and CStringA could do a lot of the stuff they do now (like
converting between the default code page and unicode). So its raison d'etre
seems to have been largely overtaken.
However there is one real pain in the neck with CString and friends: the one
you get from ATL is a different object from the one you get from MFC. So
try to pass them between MFC and non-MFC DLLs, and disatster unfolds
:-( This seems to be a serious design flaw with the way they have made
CString "independent of MFC".
That in itself may one reason for using CUnicodeString [and in fact I am
going on using my own CStringW and CStringA clones rather than deriving my
(even more capable) strings from the standard ones].
|