Win32Methods.SetParent(IntPtr, IntPtr) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Changes the parent window of the specified child window.
public:
static IntPtr SetParent(IntPtr hWnd, IntPtr hWndParent);
public static IntPtr SetParent (IntPtr hWnd, IntPtr hWndParent);
static member SetParent : nativeint * nativeint -> nativeint
Public Shared Function SetParent (hWnd As IntPtr, hWndParent As IntPtr) As IntPtr
Parameters
- hWnd
-
IntPtr
nativeint
Handle to the child window.
- hWndParent
-
IntPtr
nativeint
Handle to the new parent window. If this parameter is NULL, the desktop window becomes the new parent window.
Returns
IntPtr
nativeint
A handle to the previous parent window indicates success. NULL indicates failure.