摘要:
#include #include #include /*功能:将输入的字符串中英文大写字母改成对应小写字母,并且过滤掉非英文字母字符 输入:字符串 输出:结果字符串,保证输出地址有效。 返回:0表示成功,其它返回-1 */int ProcessString(char * strInput,char *strOutput){ while (*strInput) { if (isalpha(*strInput)) { char single = *strInput; *strOutp... 阅读全文
摘要:
// 获取IEXPLORE所在路径 CRegKey reg; LPCTSTR lpszKey = _T("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\IEXPLORE.exe"); CString strValue = _T(""); DWORD size = 1000; if(ERROR_SUCCESS == reg.Open(HKEY_LOCAL_MACHINE, lpszKey)) { reg.QueryValue(strValue.GetB... 阅读全文
摘要:
// 遍历文件夹,获取文件信息void TravelFolder(CString strDir){ // 文件当前目录 TCHAR Buffer[MAX_PATH]; DWORD dwRet = GetCurrentDirectory(MAX_PATH, Buffer); CString strCurrent(Buffer); CFileFind filefind; //声明CFileFind类型变量 CString strWildpath = strDir + _T("\\*.... 阅读全文
摘要:
SetItemState(i, 0, -1);SetItemState(i, 0, LVIS_SELECTED);参考:http://blog.csdn.net/tuying_001/article/details/6220753说明:MSDN中有以下一段话:CListCtrl::SetItemStateParametersnStateNew values for the state bits.nMaskMask specifying which state bits to change.LVITEM StructurestateMaskValue specifying which bits 阅读全文
摘要:
char szSqlCmd[SQL_LENGTH] = {0};/* SQL缓存 */sprintf(szSqlCmd, "select name from sqlite_master where type='table' order by name");sqlite3_command cmd( *conn, szSqlCmd );sqlite3_reader rdr = cmd.executereader();// 循环读取所有数据vector vecStrTableName;while ( rdr.read() ){vecStrTableName.pus 阅读全文