I want to move windows programmatically. It works fine except for all windows belonging to UWP apps. When I try to read out all HWNDs of Microsoft Movies & TV there are 3 possibilities:
The Window is minimized: I can read out 3 HWNDs two of them having bounds of 0,0,0,0 and the 3rd has nonzero bounds but they do not a bit equal with the window size. When I try to ShowWindow all of them, it doesn't work (flag: SW_RESTORE 0x09) no matter if the process is suspended or not, which happens after a small amount of time after minimizing.
The window is visible: The nonzero bounds HWND cannot be read out anymore but when calling SetForegroundWindow the window still gets put in the foreground so the nonzero bounds HWND was not the handle of the visible window.
The window is maximized and in fullscreen: I cannot read out any HWND.
When I try to call SetWindowPos while the window is minimized only the zero bounds HWNDs change their RECT information but when I show the window it's still at the same wrong position. The nonzero bounds HWND doesn't even change the values.
Same for when the window is visible, except for that I cannot read out the nonzero bounds HWND.
So HOW can I show windows of a UWP app and move them to a specified location on one of the possible screens?