I am trying to start two instances of an application with the Window position a bit different for each application - i.e. cascade.
But one hide the other, what am I doing wrong, see code snipit below.
if(g_pIDX2->GetCheck ())
{
GetStartupInfo(&si[1]);
// Set the position of the window for IDX 2
si[1].dwFlags = si[1].dwFlags | STARTF_USEPOSITION;
si[1].dwX = 20;
si[1].dwY = 20;
CreateProcess(NULL, "c:\\IDX_Emu\\debug\\IDX_Emu.exe", // Name of app to launch
NULL, // Default process security attributes
NULL, // Default thread security attributes
FALSE, // Don't inherit handles from the parent
0, // Normal priority
NULL, // Use the same environment as the parent
NULL, // Launch in the current directory
&si[1], // Startup Information
&pi[1]); // Process information stored upon return
}
if(g_pIDX3->GetCheck ())
{
GetStartupInfo(&si[2]);
// Set the position of the window for IDX 2
si[2].dwFlags = STARTF_USEPOS
But one hide the other, what am I doing wrong, see code snipit below.
if(g_pIDX2->GetCheck ())
{
GetStartupInfo(&si[1]);
// Set the position of the window for IDX 2
si[1].dwFlags = si[1].dwFlags | STARTF_USEPOSITION;
si[1].dwX = 20;
si[1].dwY = 20;
CreateProcess(NULL, "c:\\IDX_Emu\\debug\\IDX_Emu.exe", // Name of app to launch
NULL, // Default process security attributes
NULL, // Default thread security attributes
FALSE, // Don't inherit handles from the parent
0, // Normal priority
NULL, // Use the same environment as the parent
NULL, // Launch in the current directory
&si[1], // Startup Information
&pi[1]); // Process information stored upon return
}
if(g_pIDX3->GetCheck ())
{
GetStartupInfo(&si[2]);
// Set the position of the window for IDX 2
si[2].dwFlags = STARTF_USEPOS