Set window to move / SetWindowPosition for another process

I was working on a piece of recording software that I developed in a game called LA Noire. The game may work in windowed mode, but they do not seem to allow window movement.

One thing that I noticed when the game lingered during launch is that you can move the window and it will stay where you put it. Digging more in Windows 7, I found out that I can make the menu window with SHIFT + right-click and confirm that the window can actually move.

I grabbed the Win32 API calls SetWindowPosand implemented my C # code to “follow” the window. This works for other apps like uTorrent, Calc and all the other regular apps I've tried. However, for LA Noire, this does not work. I tried switching flags to SetWindowPos, for example, one that says it doesn't deliver it to WndProc, without showing / not moving it, without resizing, etc.

I also tried other options SetWindowPoslike MoveWindowthat didn't help move LA Noire, but still worked with Calc, etc.

What is the next logical step? Should I send WM_MOVEmanually to the process or set the hook in the window?

+4
source share

Source: https://habr.com/ru/post/1534580/


All Articles