CString->char*

CString strSource;//宣告CString
char* charSource; //宣告char* 法1:
charSource = (char*)strSource.GetBuffer(0); 法2:
charSource = (char*)strSource.GetBuffer(strSource.GetLength()); 法3:
charSource = (char*)(LPCTSTR)strSource;

char*->CString

char* temp;

....

//生成我们需要的CString对象
CString str(temp);

char*->LPCTSTR

char* res=..;
LPCTSTR lpc;
lpc = (LPCTSTR)(LPCTSTR)res;
04-22 11:44