C++ 如何使用VC+获取默认浏览器的关闭事件+/C++;?

C++ 如何使用VC+获取默认浏览器的关闭事件+/C++;?,c++,visual-c++,mfc,C++,Visual C++,Mfc,首先,我使用shellexecute命令打开web浏览器。 那么,我们如何使用MFC/VC++/C++获取浏览器的关闭事件?: 获取有关作为应用程序启动的应用程序的信息 调用ShellExecute的结果,请使用ShellExecuteEx 快速查找stackoverflow,我在这里引用他的答案: SHELLEXECUTEINFO ShExecInfo = {0}; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask =

首先,我使用
shellexecute
命令打开web浏览器。 那么,我们如何使用MFC/VC++/C++获取浏览器的关闭事件?

获取有关作为应用程序启动的应用程序的信息 调用ShellExecute的结果,请使用ShellExecuteEx

快速查找stackoverflow,我在这里引用他的答案:

SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "c:\\MyProgram.exe";        
ShExecInfo.lpParameters = "";   
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL; 
ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);

监视浏览器进程是否正常?或WaitForSingleObject()