C & C++/C & C++

유니코드 환경에서 CString -> char[] 변환

izen8 2011. 12. 14. 13:30

CString strText = "Test"

char szText[] = "";


wchar_t *to = parm_ascii_string.GetBuffer(0);


WideCharToMultiByte( CP_ACP, 0, to, -1, szText, 128, NULL, NULL );

strText.ReleaseBuffer();