OPENFILENAME ofn; // common dialog box structure TCHAR szFile[MAX_PATH]; // buffer for file name // Initialize OPENFILENAME ZeroMemory...
var SI : TStartupInfo; PI : TProcessInformation; pid:DWORD; begin ZeroMemory(@SI, SizeOf(SI)); //ZeroMemory宏用0来填充一块内存区域 SizeOf//Pasca...
分类:
其他好文 时间:
2014-10-18 15:31:56
阅读次数:
119
TCHAR path[MAX_PATH]; //存放路径的变量ZeroMemory(path, 255);GetCurrentDirectory(MAX_PATH, path); //获取程序的当前目录
分类:
其他好文 时间:
2014-10-18 15:26:53
阅读次数:
130
bool gAppIsWindowsVistaOrHigher() { OSVERSIONINFO osvi; ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); osvi.dwOSVersionInfoSize = sizeof(OSVERSION...
分类:
其他好文 时间:
2014-10-18 15:17:12
阅读次数:
189
使用C/C++编程时,常使用ZeroMemory、memset或 “={0}”来对结构体对象进行初始化或清零。然而这三种方式都有各自的特点,使用时需谨慎,否则容易出现严重错误,导致宕机的bug,乱用ZeroMemory所致。http://www.cplusplus.com/reference/cst...
分类:
编程语言 时间:
2014-08-07 18:10:30
阅读次数:
232
1、MFC中点出对话框显示另存为的一个路径和文件:
void CPatchDlg::OnBnClickedBtnPath()
{
//一下为选择另存为一个路径
m_strSavepath = "";
BROWSEINFO bi;
ZeroMemory(&bi, sizeof(BROWSEINFO));
bi.hwndOwner = m_hWnd;
bi.ulFlags = BIF_...
分类:
编程语言 时间:
2014-07-10 23:51:47
阅读次数:
323
void CWriteWnd::OpenFileDialog(){ OPENFILENAME ofn; TCHAR szFile[MAX_PATH] = _T(""); ZeroMemory(&ofn, sizeof(ofn)); ofn.lStructSize = sizeof(ofn); o.....