Hi, Roland -
I assume your app restores it's last known position and size when it opens, so it needs to be a little smarter.
Consider using the WinAPI MonitorFromRect function. Pass in a Windows rect structure loaded with your app's desired x,y,w,h properties (all values in pixels) as the first argument and zero as the second argument. Windows will pass back a monitor handle of the monitor that contains the largest portion of the rectangle (the app window). It returns zero if NO monitor contains any portion of the rectangle.
If you get a monitor handle return value of zero, force your app's window to position itself at 0,0 or 100,100, etc.
I've also used this technique for detecting when a sheet window will open outside of the MDI Client area.
HTH
- John