Use QProcess to create a child process, then set its screen position

StackOverflow https://stackoverflow.com/questions/23612099

  •  20-07-2023
  •  | 
  •  

Frage

I need to launch another program from my code but I also need to set its screen position? Is this possible using QT? Very simple In principal but as usual extremely difficult in QT...

War es hilfreich?

Lösung 2

This can be done by setting the dwX and dwY varibles In the STARTUPINFO struct and then setting dwFlags to STARTF_USEPOSITION.

Then call CreateProcess

Andere Tipps

If the program you are calling allows it through the command line arguments then it is definitely possible.

in windows there is the option of providing the STARTUPINFO but that only works if the program uses CW_USEDEFAULT for its location

Otherwise you would need to use a debugger to hook into the relevant setLocation call and change the arguments, this is very hard without intimate knowledge of the program in question.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top