Consider this situation:
- on a multi-monitor system,
- an application was maximized, then minimized,
- in my application I have the HWND of the main window of above application
Now, how can I determine which monitor the window will show on when restored from minimized state? GetWindowRect and GetWindowInfo results in negative values, and apparently the same for all monitors. GetWindowPlacement gives good values in rcNormalPosition, but these are the coordinates the application returns to when un-maximized, which could be partly or wholly on another monitor.
WINDOWPLACEMENT.ptMaxPositiongive you the answer? - arx