CString str(_T("ABCDEFG")); #ifdef _UNICODE wchar_t * t = str.GetBuffer(str.GetLength()); // wchar_t to char int size = WideCharToMultiByte(CP_ACP, 0, t, -1, NULL, 0, NULL, NULL); char * s = new char[size]; WideCharToMultiByte(CP_ACP, 0, t, -1, s, size, 0, 0); #else // Multibyte char * s = str.GetBuffer(0); #endif ... #ifdef _UNICODE delete [] s; #endif str.ReleaseBuffer();
댓글 없음:
댓글 쓰기