void CMianDlg::CStringToChar(CString strSource, char *chDes)
{
int nLength = strSource.GetLength();
int nBytes = WideCharToMultiByte(CP_ACP,0,strSource,nLength,NULL,0,NULL,NULL);
WideCharToMultiByte(CP_OEMCP, 0, strSource, nLength, chDes, nBytes, NULL, NULL);
}
CString str, strSqlDel;
str = m_listCtrl.GetItemText(nIndex, 5);
str = str.Trim();
strSqlDel.Format(_T("DELETE FROM nvr_ipc_table WHERE IPC_IP = '%s'"), str);
CStringA stra(strSqlDel.GetBuffer(0));
std::string strBuffer = stra.GetBuffer(0);