HWND hWnd, // handle to window
LPDWORD lpdwProcessId // process identifier);
DECLAREINTEGER GetWindowThreadProcessId IN user32;
INTEGER @ lpdwProcId
[in] Handle to the window.
[out] Pointer to a variable that receives the process identifier.
The return value is the identifier of the thread that created the window.
It would be interesting to compare thread Ids obtained from this function for the GetActiveWindow (main VFP window) and the GetFocus, applied to an active VFP form. Will it be just one thread or two different ones?
Word Index links for the GetWindowThreadProcessId :