首页 > 代码库 > unicode下char*和CString

unicode下char*和CString

1、对话框打印char*

 char* info="";

::MessageBoxA(this->m_hWnd, info, "", MB_OK);

2、CString转char*

int nLen;
char * wsabuf = NULL;
#ifdef _UNICODE
//CString转换成char*
USES_CONVERSION;
wsabuf = W2A(send_txt_str);//send_txt_str为CString消息
#else
#endif

 

unicode下char*和CString