Ok, further to my last; why I see the (correct TreadID) result when I minimise, is that once I minimise, the previous app gets back the focus hence the lParam change. This dosn't work
when my app gets the focus, as it is the current tread.

I have unsuccessfully tried different WM_ constants in order to capture the losing focus app ID once my Apps sub-class is envoked.