CreateProcess 隐藏窗口启动一个进程? STARTUPINFO si;
PROCESS_INFORMATION pi;
memset(&si,0, sizeof(si) );
si.cb = sizeof(si);
si.lpReserved = NULL;
si.lpDesktop = NULL;
si.lpTitle = NULL;
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_HIDE;
si.cbReserved2 = NULL;
si.lpReserved2 = NULL;
si.lpDesktop = "";
memset(&pi,0, sizeof(pi) );
CreateProcess( NULL, "dlg.exe", NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi );
相关代码如上,但是窗口还是显示?请教了
PROCESS_INFORMATION pi;
memset(&si,0, sizeof(si) );
si.cb = sizeof(si);
si.lpReserved = NULL;
si.lpDesktop = NULL;
si.lpTitle = NULL;
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_HIDE;
si.cbReserved2 = NULL;
si.lpReserved2 = NULL;
si.lpDesktop = "";
memset(&pi,0, sizeof(pi) );
CreateProcess( NULL, "dlg.exe", NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi );
相关代码如上,但是窗口还是显示?请教了
或者http://blog.163.com/madengyao_super/blog/static/2859822020093249493150/
Ignored unless dwFlags specifies STARTF_USESHOWWINDOW. The wShowWindow member can be any of the SW_ constants defined in WINUSER.H. For GUI processes, wShowWindow specifies the default value the first time ShowWindow is called. The nCmdShow parameter of ShowWindow is ignored. In subsequent calls to ShowWindow, the wShowWindow member is used if the nCmdShow parameter of ShowWindow is set to SW_SHOWDEFAULT.
------------------
你的程序是console的么?