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

有帮助吗?

解决方案 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

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top