Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.46 KB

File metadata and controls

54 lines (37 loc) · 1.46 KB

Home

Function name : GetWindowThreadProcessId

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.


Code examples:

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

Declaration:

DWORD GetWindowThreadProcessId(
  HWND hWnd,             // handle to window
  LPDWORD lpdwProcessId  // process identifier
);  

FoxPro declaration:

DECLARE INTEGER GetWindowThreadProcessId IN user32;
	INTEGER   hWnd,;
	INTEGER @ lpdwProcId  

Parameters:

hWnd [in] Handle to the window.

lpdwProcessId [out] Pointer to a variable that receives the process identifier.


Return value:

The return value is the identifier of the thread that created the window.


Comments:

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?