void LogManage(void)
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &pi, sizeof(pi) );
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
si.dwFlags =STARTF_USESHOWWINDOW;
si.wShowWindow = SW_HIDE;//隐藏窗口,设置后位置后再显示
// Start the child process
if(CreateProcess(m_szLogQueryFile, _T(""), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
{
Sleep(700);
HWND hWnd;
hWnd = ::FindWindow(NULL,TEXT("显示播放日志查询系统"));
if(hWnd != NULL)
{
::SetWindowPos(hWnd,HWND_NOTOPMOST,960,80,950,950,SWP_SHOWWINDOW);
}
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
}
else
{
AfxMessageBox(_T("创建失败!"));
HANDLE hProcess = GetCurrentProcess();//get current process
TerminateProcess(hProcess,0); //close process
}
}