
MFC
chengjuan0814
这个作者很懒,什么都没留下…
展开
-
VC程序命令行参数获取
CString str=::GetCommandLine(); 获取命令行 void GetArgs(CString &arg1, CString &arg2, CString &arg3) { CString commandArgs=AfxGetApp()->m_lpCmdLine; if (commandArgs.IsEmpty()) { return; }原创 2014-05-16 11:28:33 · 4786 阅读 · 0 评论 -
FileMap
在开发软件过程里,也经常碰到进程间共享数据的需求。比如A进程创建计算数据,B进程进行显示数据的图形。这样的开发方式可以把一个大程序分开成独立的小程序,提高软件的成功率,也可以更加适合团队一起开发,加快软件的开发速度。下面就来使用文件映射的方式进行共享数据。先要使用函数CreateFileMapping来创建一个想共享的文件数据句柄,然后使用MapViewOfFile来获取共享的内存地址,然后使用O转载 2014-05-14 09:02:57 · 3437 阅读 · 0 评论 -
系统路径函数应用小杂烩
#include "shlobj.h" //包含头文件 WINSHELLAPI HRESULT WINAPI SHGetSpecialFolderLocation (HWND hwndOwner, int nFolder,LPITEMIDLIST * ppidl); //函数声明原创 2014-05-14 09:38:22 · 591 阅读 · 0 评论 -
CFileFind的用法
void Recurse(LPCTSTR pstr) { CFileFind finder; // build a string with wildcards CString strWildcard(pstr); strWildcard += _T("\\*.*"); // start working for files BOOL bWorking = finder.FindFile(strW原创 2014-07-11 09:40:39 · 1080 阅读 · 0 评论