Question

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...

Was it helpful?

Solution 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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top