convert CString to const char *
-
code to convert CString to const char * using UNICODE in application. so first I need to convert it to ANSI. anyone having working code.
Future Lies in Present. Manmohan Bishnoi
-
code to convert CString to const char * using UNICODE in application. so first I need to convert it to ANSI. anyone having working code.
Future Lies in Present. Manmohan Bishnoi
-
code to convert CString to const char * using UNICODE in application. so first I need to convert it to ANSI. anyone having working code.
Future Lies in Present. Manmohan Bishnoi
-
code to convert CString to const char * using UNICODE in application. so first I need to convert it to ANSI. anyone having working code.
Future Lies in Present. Manmohan Bishnoi
Use WideCharToMultiByte[^].
«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
code to convert CString to const char * using UNICODE in application. so first I need to convert it to ANSI. anyone having working code.
Future Lies in Present. Manmohan Bishnoi
Firstly if you are using wide char (Unicode)then CString will be of Type CStringW by default and thus all us need to do is if u have : CString str; // do the following CW2A(str); // this will give u const char* else if its Multibyte charset project CString will be of type CStringA by default: // u can directly cast it to char* as below: CString str; //do the following (CHAR*)str.GetString();// this will give u Const char* If you like this ans mark it and close the thread Regards Kushagra