Skip to content

Commit d098398

Browse files
committed
Adds users32 methods for GetTopWindow and FindWindowEx
1 parent 6cc637e commit d098398

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Rubberduck.VBEEditor/NativeMethods.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@ public static class NativeMethods
5555
[DllImport("User32.dll")]
5656
internal static extern IntPtr GetParent(IntPtr hWnd);
5757

58+
/// <summary> Gets the child window at the top of the Z order. </summary>
59+
///
60+
/// <param name="hWnd"> The window handle. </param>
61+
/// <returns> The child window IntPtr handle. </returns>
62+
[DllImport("user32.dll")]
63+
internal static extern IntPtr GetTopWindow(IntPtr hWnd);
64+
65+
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
66+
internal static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string lclassName, string windowTitle);
67+
5868
/// <summary> Gets window caption text by handle. </summary>
5969
///
6070
/// <param name="windowHandle"> Handle of the window to be activated. </param>

0 commit comments

Comments
 (0)