1。TCHAR转char
char* str=(char*)lParam;
TCHAR strTemp[1000];
GetDlgItemText(IDC_EDIT7,strTemp,1000);
int iLen1 = wcslen(strTemp);
char* stringTemp = new char[iLen1+1];
wcstombs(stringTemp,strTemp,iLen1+1);
2。TCHAR转char
int iLen2 = 2*strlen(str);
TCHAR *newstr = new TCHAR[iLen2+1];
mbstowcs(newstr,str,iLen2+1);