7,655
社区成员
发帖
与我相关
我的任务
分享
void CphotoDlg::OnOpen()
{
// TODO: 在此添加命令处理程序代码
//这里怎么写?假如我要打开"\Program Files\"
}
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = m_hWnd;
ShExecInfo.lpVerb = L"Open";
ShExecInfo.lpFile = L"\\Programs\\Empty\\";
ShExecInfo.lpParameters = NULL;
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
ShellExecute(this->m_hWnd,"open","d:\\","","", SW_SHOW );
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = L"Open";
ShExecInfo.lpFile = L"fexplore.exe";
ShExecInfo.lpParameters = L"\\Program Files";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
SHELLEXECUTEINFO ShExecInfo;
memset( &ShExecInfo, 0, sizeof( SHELLEXECUTEINFO ) );
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = m_hWnd;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = L"\\Program Files\\Empty\\Empty.exe";
ShExecInfo.lpParameters = NULL;
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOWNORMAL;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);