> In the unicode cases I use  "LPCTSTR" not CString, and I agree with Paul
> about rather using new and delete functions instead of malloc.
> /Mostafa

It's a shame you had not used MFC's CString - it has a (const char *)
extraction operator to get out a char * even under Unicode conditions (and
an (LPCTSTR) extraction operator for getting proper Unicode characters, as
you would use in most other places).

The simplest way to find out if UNICODE is defined is to do some conditional
compiling with a known bad line so that the compiler itself can tell you:

#ifdef UNICODE
        Yes, I'm Unicode        // Obviously won't compile, not valid C++!
#else
        No, I'm not Unicode     // Obviously won't compile, not valid C++!
#endif

The compiler will choke on either line, but at least you'll be able to tell
whether the symbol is defined by which line it complains about - then you
can remove the dummy code.

--
Jason Teagle
[EMAIL PROTECTED]




Reply via email to