SetParent function user32

Win32Result<HWND> SetParent(
  1. HWND hWndChild,
  2. HWND? hWndNewParent
)

Changes the parent window of the specified child window.

To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-setparent.

Implementation

Win32Result<HWND> SetParent(HWND hWndChild, HWND? hWndNewParent) {
  final result_ = SetParent_Wrapper(hWndChild, hWndNewParent ?? nullptr);
  return .new(value: .new(result_.value.ptr), error: result_.error);
}