2 instantiations of HWND
UIAutomationClient (2)
MS\Win32\NativeMethods.cs (2)
38HWND hTemp = new HWND 54HWND hTemp = new HWND
217 references to HWND
UIAutomationClient (217)
MS\Internal\Automation\Accessible.cs (1)
83return ProxyManager.GetClassName(NativeMethods.HWND.Cast(hwnd)) == szClass;
MS\Internal\Automation\BoundingRectTracker.cs (3)
77if (!SafeNativeMethods.IsWindowVisible(NativeMethods.HWND.Cast( hwnd ))) 85NativeMethods.HWND nativeHwnd = NativeMethods.HWND.Cast( hwnd );
MS\Internal\Automation\ClientEventManager.cs (2)
593if ( rawEl != null && !HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.HWND.Cast( hwnd ) ) ) 647if ( HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.HWND.Cast( hwnd ) ) )
MS\Internal\Automation\FocusTracker.cs (4)
133provider = ProxyManager.ProxyProviderFromHwnd(NativeMethods.HWND.Cast(hwnd), idChild, UnsafeNativeMethods.OBJID_CLIENT); 162provider = ProxyManager.ProxyProviderFromHwnd(NativeMethods.HWND.Cast(hwnd), idChild, idObject); 254if (hwndCur == IntPtr.Zero || !SafeNativeMethods.IsWindow(NativeMethods.HWND.Cast(hwndCur))) 294IntPtr i = Misc.SendMessageTimeout(NativeMethods.HWND.Cast(hwnd), UnsafeNativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
MS\Internal\Automation\HwndProxyElementProvider.cs (104)
38internal HwndProxyElementProvider( NativeMethods.HWND hwnd ) 40Debug.Assert( hwnd != NativeMethods.HWND.NULL ); 42if( hwnd == NativeMethods.HWND.NULL ) 531NativeMethods.HWND hwndOwner = GetRealOwner( _hwnd ); 532if ( hwndOwner != NativeMethods.HWND.NULL ) 634NativeMethods.HWND hwndParent = SafeNativeMethods.GetAncestor(NativeMethods.HWND.Cast(_hwnd), SafeNativeMethods.GA_PARENT); 635if (!MapWindowPoints(NativeMethods.HWND.NULL, hwndParent, ref point, 1)) 690if (!Misc.SetWindowPos(_hwnd, NativeMethods.HWND.NULL, (int)x, (int)y, 0, 0, UnsafeNativeMethods.SWP_NOSIZE | UnsafeNativeMethods.SWP_NOZORDER | UnsafeNativeMethods.SWP_NOACTIVATE)) 951NativeMethods.HWND desktop = SafeNativeMethods.GetDesktopWindow(); 967unsafe private static bool GetMenuBarInfo(NativeMethods.HWND hwnd, int idObject, uint idItem, out UnsafeNativeMethods.MENUBARINFO mbi) 1003private static HwndProxyElementProvider Wrap(NativeMethods.HWND hwnd) 1005if( hwnd == NativeMethods.HWND.NULL ) 1015internal static bool IsWindowPatternWindow( NativeMethods.HWND hwnd ) 1060private static bool IsTransformPatternWindow( NativeMethods.HWND hwnd ) 1081internal static int[] MakeRuntimeId( NativeMethods.HWND hwnd ) 1134private static NativeMethods.HWND ScanVisible( NativeMethods.HWND hwnd, int dir, bool includeSelf, NativeMethods.HWND hwndOwnedBy ) 1136if( hwnd == NativeMethods.HWND.NULL ) 1144for( ; hwnd != NativeMethods.HWND.NULL ; hwnd = Misc.GetWindow( hwnd, dir ) ) 1151NativeMethods.HWND hwndOwner = GetRealOwner( hwnd ); 1164private NativeMethods.HWND GetFirstOrLastOwnedWindow( NativeMethods.HWND parent, bool wantFirst ) 1168return NativeMethods.HWND.NULL; 1171NativeMethods.HWND desktop = SafeNativeMethods.GetDesktopWindow(); 1172NativeMethods.HWND scan = Misc.GetWindow(desktop, SafeNativeMethods.GW_CHILD); 1195NativeMethods.HWND parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT); 1200NativeMethods.HWND hwndOwner = GetRealOwner(_hwnd); 1201if (hwndOwner != NativeMethods.HWND.NULL) 1222NativeMethods.HWND hwndOwner = GetRealOwner(_hwnd); 1223if (hwndOwner != NativeMethods.HWND.NULL) 1226NativeMethods.HWND hwnd = ScanVisible(_hwnd, ScanNext, ExcludeSelf, hwndOwner); 1227if (hwnd == NativeMethods.HWND.NULL) 1231hwnd = ScanVisible(hwnd, ScanNext, IncludeSelf, NativeMethods.HWND.NULL); 1240NativeMethods.HWND next = ScanVisible(_hwnd, ScanNext, ExcludeSelf, NativeMethods.HWND.NULL); 1255NativeMethods.HWND hwndOwner = GetRealOwner(_hwnd); 1256if (hwndOwner != NativeMethods.HWND.NULL) 1260NativeMethods.HWND hwnd = ScanVisible(_hwnd, ScanPrev, ExcludeSelf, hwndOwner); 1267NativeMethods.HWND prev = ScanVisible(_hwnd, ScanPrev, ExcludeSelf, NativeMethods.HWND.NULL); 1268if (prev == NativeMethods.HWND.NULL) 1272NativeMethods.HWND parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT); 1293NativeMethods.HWND hwnd = GetFirstOrLastOwnedWindow(_hwnd, true); 1294if (hwnd == NativeMethods.HWND.NULL) 1298hwnd = ScanVisible(hwnd, ScanNext, IncludeSelf, NativeMethods.HWND.NULL); 1319NativeMethods.HWND hwnd = Misc.GetWindow(_hwnd, SafeNativeMethods.GW_CHILD); 1320if (hwnd != NativeMethods.HWND.NULL) 1323hwnd = ScanVisible(hwnd, ScanPrev, IncludeSelf, NativeMethods.HWND.NULL); 1326if (hwnd == NativeMethods.HWND.NULL) 1338private static void GetAllUIFragmentRoots(NativeMethods.HWND hwnd, bool includeThis, ArrayList uiFragmentRoots) 1400for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD); 1401hChild != NativeMethods.HWND.NULL && --SanityLoopCount > 0; 1424private static bool IsWindowReallyEnabled( NativeMethods.HWND hwnd ) 1436if( hwnd == NativeMethods.HWND.NULL ) 1442private static bool IsWindowReallyVisible( NativeMethods.HWND hwnd ) 1487private static bool IsWindowCloaked(NativeMethods.HWND hwnd) 1502private static bool IsTopLevelWindow( NativeMethods.HWND hwnd ) 1507private static NativeMethods.HWND GetRealOwner( NativeMethods.HWND hwnd ) 1509NativeMethods.HWND hwndOwner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER); 1510if( hwndOwner == NativeMethods.HWND.NULL ) 1512return NativeMethods.HWND.NULL; 1519return NativeMethods.HWND.NULL; 1588private bool EnumWindows( NativeMethods.HWND hwnd, NativeMethods.HWND possibleOwner ) 1593NativeMethods.HWND owner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER); 1648private static HwndProxyElementProvider ElementProviderFromPoint(NativeMethods.HWND current, double x, double y) 1657NativeMethods.HWND child = NativeMethods.HWND.NULL; 1664if (child == NativeMethods.HWND.NULL) 1714private static NativeMethods.HWND ChildWindowFromPoint( NativeMethods.HWND hwnd, double x, double y, out bool isClientArea ) 1716NativeMethods.HWND hBestFitTransparent = NativeMethods.HWND.NULL; 1723return NativeMethods.HWND.NULL; 1729for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD); 1730hChild != NativeMethods.HWND.NULL && --SanityLoopCount > 0 ; 1750NativeMethods.HWND hwndTopLevel = SafeNativeMethods.GetAncestor(hChild, SafeNativeMethods.GA_ROOT); 1830if( hBestFitTransparent == NativeMethods.HWND.NULL ) 1863!MapWindowPoints(hChild, NativeMethods.HWND.NULL, ref rcClient, 2) || 1878return NativeMethods.HWND.NULL; 1883if( hBestFitTransparent != NativeMethods.HWND.NULL ) 1892private static bool IsProgmanWindow(NativeMethods.HWND hwnd) 1894while (hwnd != NativeMethods.HWND.NULL) 1906private static bool MapWindowPoints(NativeMethods.HWND hWndFrom, NativeMethods.HWND hWndTo, ref NativeMethods.RECT rect, int cPoints) 1914if ((IsProgmanWindow(hWndFrom) && hWndTo == NativeMethods.HWND.NULL) || 1915(hWndFrom == NativeMethods.HWND.NULL && IsProgmanWindow(hWndTo))) 1931private static bool MapWindowPoints(NativeMethods.HWND hWndFrom, NativeMethods.HWND hWndTo, ref NativeMethods.POINT pt, int cPoints) 1939if ((IsProgmanWindow(hWndFrom) && hWndTo == NativeMethods.HWND.NULL) || 1940(hWndFrom == NativeMethods.HWND.NULL && IsProgmanWindow(hWndTo))) 1960private static int GetWindowStyle(NativeMethods.HWND hwnd) 1971private static int GetWindowExStyle(NativeMethods.HWND hwnd) 1980private static bool SetFocus( NativeMethods.HWND hwnd ) 1993NativeMethods.HWND parent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT); 2015if( Misc.RegisterHotKey( NativeMethods.HWND.NULL, atom, 0, vk ) ) 2058if (Misc.GetMessage(ref msg, NativeMethods.HWND.NULL, 0, 0) == 0) 2077Misc.UnregisterHotKey(NativeMethods.HWND.NULL, atom); 2087private static NativeMethods.HWND GetFocusedWindow() 2093return NativeMethods.HWND.NULL; 2142private NativeMethods.HWND _hwnd;
MS\Internal\Automation\MenuTracker.cs (2)
60NativeMethods.HWND nativeHwnd = NativeMethods.HWND.Cast( hwnd );
MS\Internal\Automation\Misc.cs (20)
309internal static bool GetClientRect(NativeMethods.HWND hwnd, out NativeMethods.RECT rc) 344internal static bool GetMenuBarInfo(NativeMethods.HWND hwnd, int idObject, uint item, ref UnsafeNativeMethods.MENUBARINFO mbi) 370internal static int GetMessage(ref UnsafeNativeMethods.MSG msg, NativeMethods.HWND hwnd, int nMsgFilterMin, int nMsgFilterMax) 383internal static NativeMethods.HWND GetWindow(NativeMethods.HWND hwnd, int uCmd) 385NativeMethods.HWND result = NativeMethodsSetLastError.GetWindow(hwnd, uCmd); 388if (result == NativeMethods.HWND.NULL) 396internal static int GetWindowLong(NativeMethods.HWND hWnd, int nIndex) 425internal static bool GetWindowPlacement(NativeMethods.HWND hwnd, ref UnsafeNativeMethods.WINDOWPLACEMENT wp) 438internal static bool GetWindowRect(NativeMethods.HWND hwnd, out NativeMethods.RECT rc) 511internal static IntPtr OpenProcess(int dwDesiredAccess, bool fInherit, int dwProcessId, NativeMethods.HWND hwnd) 541internal static bool PostMessage(NativeMethods.HWND hWnd, int nMsg, IntPtr wParam, IntPtr lParam) 554internal static bool RegisterHotKey(NativeMethods.HWND hWnd, int id, int fsModifiers, int vk) 580internal static IntPtr SendMessageTimeout(NativeMethods.HWND hwnd, int Msg, IntPtr wParam, IntPtr lParam) 597internal static IntPtr SendMessageTimeout(NativeMethods.HWND hwnd, int Msg, IntPtr wParam, ref UnsafeNativeMethods.MINMAXINFO lParam) 614internal static IntPtr SendMessageTimeout(NativeMethods.HWND hwnd, int Msg, IntPtr wParam, StringBuilder lParam) 632internal static bool SetWindowPlacement(NativeMethods.HWND hwnd, ref UnsafeNativeMethods.WINDOWPLACEMENT wp) 645internal static bool SetWindowPos(NativeMethods.HWND hWnd, NativeMethods.HWND hWndInsertAfter, int x, int y, int cx, int cy, int flags) 658internal static bool UnregisterHotKey(NativeMethods.HWND hWnd, int id)
MS\Internal\Automation\ProxyManager.cs (12)
220internal static string GetClassName( NativeMethods.HWND hwnd ) 234internal static string RealGetWindowClass( NativeMethods.HWND hwnd ) 260internal static bool IsKnownBadWindow( NativeMethods.HWND hwnd ) 280NativeMethods.HWND hwndParent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT); 281if (hwndParent != NativeMethods.HWND.NULL) 296internal static string GetImageName( NativeMethods.HWND hwnd ) 461internal static IRawElementProviderSimple ProxyProviderFromHwnd(NativeMethods.HWND hwnd, int idChild, int idObject) 484if (hwnd == NativeMethods.HWND.NULL) 548static private IRawElementProviderSimple FindProxyFromImageFallback(ref string imageName, NativeMethods.HWND hwnd, int idChild, int idObject) 581static private IRawElementProviderSimple FindProxyInEntryOrArrayList(ProxyScoping findType, object entryOrArrayList, ref string imageName, NativeMethods.HWND hwnd, int idChild, int idObject, string classNameForPartialMatch) 626static private IRawElementProviderSimple GetProxyFromEntry(ProxyScoping findType, object entry, ref string imageName, NativeMethods.HWND hwnd, int idChild, int idObject, string classNameForPartialMatch) 782private static string GetBaseClassName( NativeMethods.HWND hwnd )
MS\Internal\Automation\QueueProcessor.cs (1)
120while (UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.HWND.NULL, 0, 0, UnsafeNativeMethods.PM_REMOVE))
MS\Internal\Automation\SafeProcessHandle.cs (1)
18internal SafeProcessHandle(NativeMethods.HWND hwnd) : base(true)
MS\Internal\Automation\UiaCoreApi.cs (2)
1574provider = new HwndProxyElementProvider(NativeMethods.HWND.Cast(hwnd)); 1578provider = ProxyManager.ProxyProviderFromHwnd(NativeMethods.HWND.Cast(hwnd), 0, UnsafeNativeMethods.OBJID_CLIENT);
MS\Internal\Automation\WindowHideOrCloseTracker.cs (2)
59NativeMethods.HWND nativeHwnd = NativeMethods.HWND.Cast( hwnd );
MS\Internal\Automation\WindowInteractionStateTracker.cs (2)
74NativeMethods.HWND nativeHwnd = NativeMethods.HWND.Cast(hwnd);
MS\Internal\Automation\WindowShowOrOpenTracker.cs (2)
59NativeMethods.HWND nativeHwnd = NativeMethods.HWND.Cast( hwnd );
MS\Internal\Automation\WindowVisualStateTracker.cs (2)
74NativeMethods.HWND nativeHwnd = NativeMethods.HWND.Cast(hwnd);
MS\Win32\NativeMethods.cs (11)
36public static HWND Cast(IntPtr h) 38HWND hTemp = new HWND 45public static implicit operator IntPtr(HWND h) 50public static HWND NULL 54HWND hTemp = new HWND 62public static bool operator==(HWND hl, HWND hr) 67public static bool operator!=(HWND hl, HWND hr) 74HWND hr = Cast((HWND)oCompare);
MS\Win32\SafeNativeMethods.cs (24)
23public static extern int GetWindowThreadProcessId( NativeMethods.HWND hWnd, out int lpdwProcessId); 61public NativeMethods.HWND hwndActive; 62public NativeMethods.HWND hwndFocus; 63public NativeMethods.HWND hwndCapture; 64public NativeMethods.HWND hwndMenuOwner; 65public NativeMethods.HWND hwndMoveSize; 66public NativeMethods.HWND hwndCaret; 114public static extern NativeMethods.HWND GetAncestor( NativeMethods.HWND hwnd, int gaFlags ); 124public static extern NativeMethods.HWND GetDesktopWindow(); 130public delegate bool EnumThreadWndProc( NativeMethods.HWND hwnd, NativeMethods.HWND lParam); 138public static extern bool GetClientRect( NativeMethods.HWND hwnd, out NativeMethods.RECT rc ); 141public static extern bool GetWindowRect( NativeMethods.HWND hwnd, out NativeMethods.RECT rc ); 144public static extern bool IsWindow( NativeMethods.HWND hwnd ); 147public static extern bool IsWindowEnabled( NativeMethods.HWND hwnd ); 150public static extern bool IsWindowVisible( NativeMethods.HWND hwnd ); 153public static extern bool IsIconic(NativeMethods.HWND hwnd); 156public static extern int GetClassName( NativeMethods.HWND hWnd, StringBuilder classname, int nMax ); 159public static extern int RealGetWindowClass( NativeMethods.HWND hWnd, StringBuilder classname, int nMax ); 162internal extern static bool IsChild( NativeMethods.HWND parent, NativeMethods.HWND child ); 168NativeMethods.HWND hwnd, 214public static extern bool PhysicalToLogicalPoint(NativeMethods.HWND hwnd, ref NativeMethods.POINT pt);
MS\Win32\UnsafeNativeMethods.cs (15)
108public static extern bool RegisterHotKey( NativeMethods.HWND hWnd, int id, int fsModifiers, int vk ); 111public static extern bool UnregisterHotKey( NativeMethods.HWND hWnd, int id ); 119public static extern void SwitchToThisWindow(NativeMethods.HWND hwnd, bool fAltTab); 190NativeMethods.HWND hwnd, int Msg, IntPtr wParam, IntPtr lParam, int flags, int uTimeout, out IntPtr pResult ); 194NativeMethods.HWND hwnd, int Msg, IntPtr wParam, ref MINMAXINFO lParam, int flags, int uTimeout, out IntPtr pResult ); 200NativeMethods.HWND hwnd, int Msg, IntPtr wParam, StringBuilder lParam, int flags, int uTimeout, out IntPtr pResult); 208public NativeMethods.HWND hwnd; 220ref MSG msg, NativeMethods.HWND hwnd, int nMsgFilterMin, int nMsgFilterMax); 224ref MSG msg, NativeMethods.HWND hwnd, int nMsgFilterMin, int nMsgFilterMax, int wRemoveMsg); 236NativeMethods.HWND hWnd, int nMsg, IntPtr wParam, IntPtr lParam); 327public static extern bool SetWindowPlacement( NativeMethods.HWND hwnd, ref WINDOWPLACEMENT wp ); 330public static extern bool GetWindowPlacement( NativeMethods.HWND hwnd, ref WINDOWPLACEMENT wp ); 337internal static extern bool SetWindowPos(NativeMethods.HWND hWnd, NativeMethods.HWND hWndInsertAfter, int x, int y, int cx, int cy, int flags); 354internal NativeMethods.HWND hwndMenu;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (6)
56public static extern NativeMethods.HWND GetWindow(NativeMethods.HWND hWnd, int uCmd); 59public static extern int MapWindowPoints(NativeMethods.HWND hWndFrom, NativeMethods.HWND hWndTo, [In, Out] ref NativeMethods.RECT rect, int cPoints); 62public static extern int MapWindowPoints(NativeMethods.HWND hWndFrom, NativeMethods.HWND hWndTo, ref NativeMethods.POINT pt, int cPoints);
System\Windows\Automation\Automation.cs (1)
162if ( HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.HWND.Cast( new IntPtr( (int)val ) ) ) )