DwFlags=STARTF_USESHOWWINDOW | | STARTF_USESIZE | | STARTF_USEPOSITION such Settings, can be opened for the new application of the position and size, but the results didn't have any effect, trouble, to help the younger brother to see how to solve this problem, thank you,
Specific code is as follows:
PROCESS_INFORMATION PI;
STARTUPINFO si={sizeof (si)};
Si. DwFlags=STARTF_USESHOWWINDOW | | STARTF_USESIZE | | STARTF_USEPOSITION;
Si. WShowWindow=SW_SHOWDEFAULT;
Si. The dwX=0;
Si. DwY=0;
Si. DwXSize=800;
Si. DwYSize=600;
Char szApplicationName []="D: \ \ iQIYI \ \ IQIYI Video \ \ LStyle \ \ 6.7.82.6548 \ \ QyClient exe";
Char szCommandLine []="QyClient. Exe";
BOOL bRet=CreateProcess (szApplicationName szCommandLine, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, & amp; Si, & amp; PI);
CodePudding user response:
DwXIgnored unless dwFlags specifies STARTF_USEPOSITION. Specifies the x offset, in pixels, of the upper left corner of a window if a new window is created. The offset is the from the upper left corner of the screen. The processes For GUI, the specified position is, informs the first time the new process calls CreateWindow to create an overlapped window if the x parameter of CreateWindow is CW_USEDEFAULT.
DwY
Ignored unless dwFlags specifies STARTF_USEPOSITION. Specifies the y offset, in pixels, of the upper left corner of a window if a new window is created. The offset is the from the upper left corner of the screen. The processes For GUI, the specified position is, informs the first time the new process calls CreateWindow to create an overlapped window if the y parameter of CreateWindow is CW_USEDEFAULT.
CodePudding user response:
Then FindWindowMoveWindow
CodePudding user response: