我用以下程序已经可以打开exe文件receiver.exe(我自己写的)
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "c:\\receiver.exe";
ShExecInfo.lpParameters = "";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
然后我用
HWND hWnd = ::FindWindow(NULL,"Receiver");
怎么找不到窗口啊?
注:我已经设置m_pMainWnd->SetWindowText("Receiver");
      我试过sleep(10000)了,不行,不是时间的问题。