|
各位高手,请指点一下,
case WM_LBUTTONDOWN:
MouseClick(hWnd,LOWORD(lParam),HIWORD(lParam),wParam);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//鼠标单击
void MouseClick(HWND hWnd,int x,int y,WPARAM wParam)
{
SHELLEXECUTEINFO ShExecInfo;
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd =NULL;
ShExecInfo.lpVerb ="open";
ShExecInfo.lpFile="D:\\GameManage\\Debug\\DigEarth.exe";
ShExecInfo.lpParameters = " ";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow =SW_MAXIMIZE;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
}
DigEarth.exe是用Directdraw+MFC写的。
用C语言控制台程序执行ShellExecuteEx(&ShExecInfo);是没错的。
单击鼠标,执行老是出错啊,
谢谢您的指点! |
|