Group: Window - Library: user32
Retrieves the identifier of the thread that created the specified window and, optionally, the identifier of the process that created the window.
Terminating all running applications from a VFP program
Obtaining names and positions for shortcuts located on the Windows Desktop
Moving shortcut to a specified position on the Windows Desktop
DWORD GetWindowThreadProcessId(
HWND hWnd, // handle to window
LPDWORD lpdwProcessId // process identifier
); DECLARE INTEGER GetWindowThreadProcessId IN user32;
INTEGER hWnd,;
INTEGER @ lpdwProcId hWnd [in] Handle to the window.
lpdwProcessId [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?
Home