Hi Anatoliy
>1) The same handle N is used when you call the CallWindowProc -- nhWnd parameter must be equal to N.
The value stored in THIS._WindowProc is the same as returned by an immediate call to ...Long() just before the problem call to ...Proc(). I hope I understood it correctly
>2) _vfp.HWnd is still equal to N and does not change through the session.
Confirmed this I saved the _VFP.Hwnd at the time of the ...Long() call and checked it just before the ...Proc() call and they are the same.
>Btw, is the main VFP window is visible when you run your application?
Yes.
>Also I would check the validity of windows involved in the CallWindowProc call using this function
DECLARE INTEGER IsWindow IN user32 INTEGER hWindow
WAIT WINDOW IsWindow(This._WindowProc)
WAIT WINDOW IsWindow(m.HWnd)
m.lnResult = apiCallWindowProc(This._WindowProc, m.HWnd, m.Msg, m.wParam, m.lParam)
This._WindowProc = 0 and m.HWnd = 1
Thanks for your continued support.