Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.19 KB

GetParent.md

File metadata and controls

43 lines (30 loc) · 1.19 KB

Home

Function name : GetParent

Group: Window - Library: user32


The GetParent function retrieves a handle to the specified window"s parent or owner. To retrieve a handle to a specified ancestor, use the GetAncestor function.


Code examples:

Simple Window Viewer
Terminating all running applications from a VFP program
The window and its ancestors

Declaration:

HWND GetParent(
  HWND hWnd   // handle to child window
);  

FoxPro declaration:

DECLARE INTEGER GetParent IN user32;
	INTEGER hwnd  

Parameters:

hWnd [in] Handle to the window whose parent window handle is to be retrieved.


Return value:

If the window is a child window, the return value is a handle to the parent window. If the window is a top-level window, the return value is a handle to the owner window. If the window is a top-level unowned window or if the function fails, the return value is NULL.