Larry,
Another idea that we might pursue here. VFP's error dialog displays a Help button. If it generates a WM_HELP message, it might provide a clue as to which window to pass the message to and help resolve the issue of getting the proper hWnd. Just a thought...
George
Ubi caritas et amor, deus ibi est