Dear all,
Is that possible to convert from [1]CString to const char *, [2] TCHAR to const char * when unicode is set ?
Could you share any sample codes.. I searched for lot - but got result only for unicode not set....
>Is that possible to convert from [1]CString to const char *, [2] TCHAR to const char * when unicode is set ?
Yes - but bear in mind that converting from Unicode to ANSI/MBCS is a lossy conversion - any characters not in the code page will be lost.
See "ATL and MFC String Conversion Macros" http://msdn.microsoft.com/en-us/library/87zae4a3(v=vs.90).aspx
Dave
>Sample codes will help a lot
Follow the link, it has examples.