摘要: 关于三个SDK函数: WinExec, ShellExecute,CreateProcess 的其他注意事项:【1】定义头文件必须定义以下两个头文件:#include <shlobj.h> // 可替换为 windows.h#include <shellapi.h>如果定义了头文件 #include <windows.h>的话就不必定义 #include <shlobj.h>了。【2】定义路径C++中所表示的路径要用 " \\ "而不是平常所用的" \ ",所以以上三个函数表示路径都为:disk:\\Dir 阅读全文
posted @ 2011-09-19 12:01 蝌蚪归来 阅读(866) 评论(0) 推荐(0) 编辑
摘要: //获取程序根目录方法CString GetAppPath(){ CString strPath; char cCurrentFilePath[255]; int nTemp; GetModuleFileName(NULL, cCurrentFilePath, 255); strPath = cCurrentFilePath; nTemp = strPath.ReverseFind('\\'); strPath = strPath.Left(nTemp+1); return strPath;} 阅读全文
posted @ 2011-09-19 11:15 蝌蚪归来 阅读(1169) 评论(0) 推荐(0) 编辑
摘要: 配置文件中经常用到ini文件,在VC中其函数分别为:写入.ini文件:bool WritePrivateProfileString(LPCTSTR lpAppName,LPCTSTR lpKeyName,LPCTSTR lpString,LPCTSTR lpFileName);读取.ini文件:DWORD GetPrivateProfileString(LPCTSTR lpAppName,LPCTSTR lpKeyName,LPCTSTR lpDefaut,LPSTR lpReturnedString,DWORD nSize,LPCTSTR lpFileName);读取整形值:UINT Get 阅读全文
posted @ 2011-09-19 10:59 蝌蚪归来 阅读(924) 评论(0) 推荐(0) 编辑
摘要: 对文件读写的三种方法 1.C中 FILE *pFile=fopen("1.txt","w");fwrite("http://www.sunxin.org",1,strlen("http://www.sunxin.org"),pFile");//fseek(pFile,0,SEEK_SET);//fwrite("ftp:",1,strlen("ftp:"),pFile);//fwrite("http://www.sunxin.org",1,strl 阅读全文
posted @ 2011-09-19 09:42 蝌蚪归来 阅读(1368) 评论(0) 推荐(0) 编辑