By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,369 Members | 966 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,369 IT Pros & Developers. It's quick & easy.

CreateProcess ignores dwX,dwY parameters in STARTUPINFO

P: n/a
I am trying to create a process at a particular set of coordinates (for
example 1,1) but the CreateProcess api seemingly ignores the settings in the
dwX and dwY properties of the STARTUPINFO structure which I have initialized
as follows:

STARTUPINFO si;
ZeroMemory((PVOID)&si, sizeof(si));
si.cb = sizeof(si);
si.dwFlags = STARTF_USEPOSITION;
si.dwX = 1;
si.dwX = 1;

PROCESS_INFORMATION pi;

and start the application as follows:

CreateProcess(NULL, "notepad.exe", NULL, NULL, FALSE,
CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &si, &pi);

The application window is not displayed at coordinates 1,1.
Mar 23 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi itmanager!
I am trying to create a process at a particular set of coordinates (for
example 1,1) but the CreateProcess api seemingly ignores the settings in the
dwX and dwY properties of the STARTUPINFO structure
I doubt that CreateProcess ignores these settings.
The problem is that the called application must handle these parameters
which are passed in WinMain...
CreateProcess(NULL, "notepad.exe", NULL, NULL, FALSE,
CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &si, &pi);


And it seems that notepad is not using these values...

See: GetStartupInfo
http://msdn.microsoft.com/library/en...tartupinfo.asp
Greetings
Jochen
Mar 23 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.