Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friend,
I use createprocess function open an exist app such as 'calc.exe'. But how can i hide the gui interface?The STARTUPINFO member 'wShowWindow=SW_HIDE' doesn't work.
C++
PROCESS_INFORMATION pi;
STARTUPINFO si;
memset(&si,0,sizeof(si));
si.cb=sizeof(si);
si.dwFlags=STARTF_USESHOWWINDOW;
si.wShowWindow=SW_HIDE;
BOOL fRet=CreateProcess(_T("C:\\Windows\\system32\\calc.exe"),
                        NULL,
                        NULL,
                        FALSE,
                        NULL,
                        NULL,
                        NULL,
                        NULL,
                        &si,
                        &pi);
Posted
Updated 2-Sep-12 21:45pm
v2

1 solution

I suspect that this is something to do with calc.exe itself ignoring this parameter. I have just tried it with a test program and it works correctly, as described in the documentation.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900