/// <summary> /// Retrieves the handle to the ancestor of the specified window. /// </summary> /// <param name="window">A handle to the window whose ancestor is to be retrieved. If /// this parameter is the desktop window, the function returns null.</param> /// <param name="flags">The ancestor to be retrieved. This parameter can be any of /// the <see cref="GetAncestorFlags"/> flags.</param> /// <returns>The return value is the handle to the ancestor window.</returns> public static IWin32Window GetAncestor(IWin32Window window, GetAncestorFlags flags) { IntPtr result = NativeMethods.GetAncestor(window.Handle, flags); if (result == IntPtr.Zero) { return(null); } return(new Win32Window(result)); }
internal static extern IntPtr GetAncestor(IntPtr hwnd, GetAncestorFlags gaFlags);
public static extern IntPtr GetAncestor(IntPtr hWnd, GetAncestorFlags gaFlags);
public static extern IntPtr GetAncestor(IntPtr hwnd, GetAncestorFlags flags);
public static IntPtr GetAncestor(IntPtr hwnd, GetAncestorFlags flags) { return(NativeMethods.GetAncestor(hwnd, flags)); }
private static extern IntPtr GetAncestor(IntPtr hwnd, GetAncestorFlags flags);
static extern IntPtr GetAncestor(HandleRef hWnd, GetAncestorFlags flags);
internal static extern IntPtr GetAncestor(IntPtr hwnd, GetAncestorFlags flags);
public static extern IntPtr GetAncestor(IntPtr windowHandle, GetAncestorFlags gaFlags);
public static extern IntPtr GetAncestor(IntPtr hwnd, GetAncestorFlags flags); // hWnd를 포함하는 최상위 핸들을 얻어옵니다.
public static extern Hwnd GetAncestor(Hwnd hwnd, GetAncestorFlags flags);
private static extern IntPtr GetAncestor(IntPtr hWnd, GetAncestorFlags gaFlag);
internal static extern IntPtr GetAncestor(IntPtr hWnd, GetAncestorFlags flags);