2 instantiations of HWND
UIAutomationClient (2)
MS\Win32\NativeMethods.cs (2)
37
HWND hTemp = new
HWND
53
HWND hTemp = new
HWND
217 references to HWND
UIAutomationClient (217)
MS\Internal\Automation\Accessible.cs (1)
82
return ProxyManager.GetClassName(NativeMethods.
HWND
.Cast(hwnd)) == szClass;
MS\Internal\Automation\BoundingRectTracker.cs (3)
76
if (!SafeNativeMethods.IsWindowVisible(NativeMethods.
HWND
.Cast( hwnd )))
84
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast( hwnd );
MS\Internal\Automation\ClientEventManager.cs (2)
592
if ( rawEl != null && !HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.
HWND
.Cast( hwnd ) ) )
646
if ( HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.
HWND
.Cast( hwnd ) ) )
MS\Internal\Automation\FocusTracker.cs (4)
132
provider = ProxyManager.ProxyProviderFromHwnd(NativeMethods.
HWND
.Cast(hwnd), idChild, UnsafeNativeMethods.OBJID_CLIENT);
161
provider = ProxyManager.ProxyProviderFromHwnd(NativeMethods.
HWND
.Cast(hwnd), idChild, idObject);
253
if (hwndCur == IntPtr.Zero || !SafeNativeMethods.IsWindow(NativeMethods.
HWND
.Cast(hwndCur)))
293
IntPtr i = Misc.SendMessageTimeout(NativeMethods.
HWND
.Cast(hwnd), UnsafeNativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
MS\Internal\Automation\HwndProxyElementProvider.cs (104)
37
internal HwndProxyElementProvider( NativeMethods.
HWND
hwnd )
39
Debug.Assert( hwnd != NativeMethods.
HWND
.NULL );
41
if( hwnd == NativeMethods.
HWND
.NULL )
530
NativeMethods.
HWND
hwndOwner = GetRealOwner( _hwnd );
531
if ( hwndOwner != NativeMethods.
HWND
.NULL )
633
NativeMethods.
HWND
hwndParent = SafeNativeMethods.GetAncestor(NativeMethods.
HWND
.Cast(_hwnd), SafeNativeMethods.GA_PARENT);
634
if (!MapWindowPoints(NativeMethods.
HWND
.NULL, hwndParent, ref point, 1))
689
if (!Misc.SetWindowPos(_hwnd, NativeMethods.
HWND
.NULL, (int)x, (int)y, 0, 0, UnsafeNativeMethods.SWP_NOSIZE | UnsafeNativeMethods.SWP_NOZORDER | UnsafeNativeMethods.SWP_NOACTIVATE))
950
NativeMethods.
HWND
desktop = SafeNativeMethods.GetDesktopWindow();
966
private static unsafe bool GetMenuBarInfo(NativeMethods.
HWND
hwnd, int idObject, uint idItem, out UnsafeNativeMethods.MENUBARINFO mbi)
1002
private static HwndProxyElementProvider Wrap(NativeMethods.
HWND
hwnd)
1004
if( hwnd == NativeMethods.
HWND
.NULL )
1014
internal static bool IsWindowPatternWindow( NativeMethods.
HWND
hwnd )
1059
private static bool IsTransformPatternWindow( NativeMethods.
HWND
hwnd )
1080
internal static int[] MakeRuntimeId( NativeMethods.
HWND
hwnd )
1133
private static NativeMethods.
HWND
ScanVisible( NativeMethods.
HWND
hwnd, int dir, bool includeSelf, NativeMethods.
HWND
hwndOwnedBy )
1135
if( hwnd == NativeMethods.
HWND
.NULL )
1143
for( ; hwnd != NativeMethods.
HWND
.NULL ; hwnd = Misc.GetWindow( hwnd, dir ) )
1150
NativeMethods.
HWND
hwndOwner = GetRealOwner( hwnd );
1163
private NativeMethods.
HWND
GetFirstOrLastOwnedWindow( NativeMethods.
HWND
parent, bool wantFirst )
1167
return NativeMethods.
HWND
.NULL;
1170
NativeMethods.
HWND
desktop = SafeNativeMethods.GetDesktopWindow();
1171
NativeMethods.
HWND
scan = Misc.GetWindow(desktop, SafeNativeMethods.GW_CHILD);
1194
NativeMethods.
HWND
parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT);
1199
NativeMethods.
HWND
hwndOwner = GetRealOwner(_hwnd);
1200
if (hwndOwner != NativeMethods.
HWND
.NULL)
1221
NativeMethods.
HWND
hwndOwner = GetRealOwner(_hwnd);
1222
if (hwndOwner != NativeMethods.
HWND
.NULL)
1225
NativeMethods.
HWND
hwnd = ScanVisible(_hwnd, ScanNext, ExcludeSelf, hwndOwner);
1226
if (hwnd == NativeMethods.
HWND
.NULL)
1230
hwnd = ScanVisible(hwnd, ScanNext, IncludeSelf, NativeMethods.
HWND
.NULL);
1239
NativeMethods.
HWND
next = ScanVisible(_hwnd, ScanNext, ExcludeSelf, NativeMethods.
HWND
.NULL);
1254
NativeMethods.
HWND
hwndOwner = GetRealOwner(_hwnd);
1255
if (hwndOwner != NativeMethods.
HWND
.NULL)
1259
NativeMethods.
HWND
hwnd = ScanVisible(_hwnd, ScanPrev, ExcludeSelf, hwndOwner);
1266
NativeMethods.
HWND
prev = ScanVisible(_hwnd, ScanPrev, ExcludeSelf, NativeMethods.
HWND
.NULL);
1267
if (prev == NativeMethods.
HWND
.NULL)
1271
NativeMethods.
HWND
parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT);
1292
NativeMethods.
HWND
hwnd = GetFirstOrLastOwnedWindow(_hwnd, true);
1293
if (hwnd == NativeMethods.
HWND
.NULL)
1297
hwnd = ScanVisible(hwnd, ScanNext, IncludeSelf, NativeMethods.
HWND
.NULL);
1318
NativeMethods.
HWND
hwnd = Misc.GetWindow(_hwnd, SafeNativeMethods.GW_CHILD);
1319
if (hwnd != NativeMethods.
HWND
.NULL)
1322
hwnd = ScanVisible(hwnd, ScanPrev, IncludeSelf, NativeMethods.
HWND
.NULL);
1325
if (hwnd == NativeMethods.
HWND
.NULL)
1337
private static void GetAllUIFragmentRoots(NativeMethods.
HWND
hwnd, bool includeThis, ArrayList uiFragmentRoots)
1399
for (NativeMethods.
HWND
hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD);
1400
hChild != NativeMethods.
HWND
.NULL && --SanityLoopCount > 0;
1423
private static bool IsWindowReallyEnabled( NativeMethods.
HWND
hwnd )
1435
if( hwnd == NativeMethods.
HWND
.NULL )
1441
private static bool IsWindowReallyVisible( NativeMethods.
HWND
hwnd )
1486
private static bool IsWindowCloaked(NativeMethods.
HWND
hwnd)
1501
private static bool IsTopLevelWindow( NativeMethods.
HWND
hwnd )
1506
private static NativeMethods.
HWND
GetRealOwner( NativeMethods.
HWND
hwnd )
1508
NativeMethods.
HWND
hwndOwner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER);
1509
if( hwndOwner == NativeMethods.
HWND
.NULL )
1511
return NativeMethods.
HWND
.NULL;
1518
return NativeMethods.
HWND
.NULL;
1587
private bool EnumWindows( NativeMethods.
HWND
hwnd, NativeMethods.
HWND
possibleOwner )
1592
NativeMethods.
HWND
owner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER);
1647
private static HwndProxyElementProvider ElementProviderFromPoint(NativeMethods.
HWND
current, double x, double y)
1656
NativeMethods.
HWND
child = NativeMethods.
HWND
.NULL;
1663
if (child == NativeMethods.
HWND
.NULL)
1713
private static NativeMethods.
HWND
ChildWindowFromPoint( NativeMethods.
HWND
hwnd, double x, double y, out bool isClientArea )
1715
NativeMethods.
HWND
hBestFitTransparent = NativeMethods.
HWND
.NULL;
1722
return NativeMethods.
HWND
.NULL;
1728
for (NativeMethods.
HWND
hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD);
1729
hChild != NativeMethods.
HWND
.NULL && --SanityLoopCount > 0 ;
1749
NativeMethods.
HWND
hwndTopLevel = SafeNativeMethods.GetAncestor(hChild, SafeNativeMethods.GA_ROOT);
1829
if( hBestFitTransparent == NativeMethods.
HWND
.NULL )
1862
!MapWindowPoints(hChild, NativeMethods.
HWND
.NULL, ref rcClient, 2) ||
1877
return NativeMethods.
HWND
.NULL;
1882
if( hBestFitTransparent != NativeMethods.
HWND
.NULL )
1891
private static bool IsProgmanWindow(NativeMethods.
HWND
hwnd)
1893
while (hwnd != NativeMethods.
HWND
.NULL)
1905
private static bool MapWindowPoints(NativeMethods.
HWND
hWndFrom, NativeMethods.
HWND
hWndTo, ref NativeMethods.RECT rect, int cPoints)
1913
if ((IsProgmanWindow(hWndFrom) && hWndTo == NativeMethods.
HWND
.NULL) ||
1914
(hWndFrom == NativeMethods.
HWND
.NULL && IsProgmanWindow(hWndTo)))
1930
private static bool MapWindowPoints(NativeMethods.
HWND
hWndFrom, NativeMethods.
HWND
hWndTo, ref NativeMethods.POINT pt, int cPoints)
1938
if ((IsProgmanWindow(hWndFrom) && hWndTo == NativeMethods.
HWND
.NULL) ||
1939
(hWndFrom == NativeMethods.
HWND
.NULL && IsProgmanWindow(hWndTo)))
1959
private static int GetWindowStyle(NativeMethods.
HWND
hwnd)
1970
private static int GetWindowExStyle(NativeMethods.
HWND
hwnd)
1979
private static bool SetFocus( NativeMethods.
HWND
hwnd )
1992
NativeMethods.
HWND
parent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT);
2014
if( Misc.RegisterHotKey( NativeMethods.
HWND
.NULL, atom, 0, vk ) )
2057
if (Misc.GetMessage(ref msg, NativeMethods.
HWND
.NULL, 0, 0) == 0)
2076
Misc.UnregisterHotKey(NativeMethods.
HWND
.NULL, atom);
2086
private static NativeMethods.
HWND
GetFocusedWindow()
2092
return NativeMethods.
HWND
.NULL;
2141
private NativeMethods.
HWND
_hwnd;
MS\Internal\Automation\MenuTracker.cs (2)
59
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast( hwnd );
MS\Internal\Automation\Misc.cs (20)
308
internal static bool GetClientRect(NativeMethods.
HWND
hwnd, out NativeMethods.RECT rc)
343
internal static bool GetMenuBarInfo(NativeMethods.
HWND
hwnd, int idObject, uint item, ref UnsafeNativeMethods.MENUBARINFO mbi)
369
internal static int GetMessage(ref UnsafeNativeMethods.MSG msg, NativeMethods.
HWND
hwnd, int nMsgFilterMin, int nMsgFilterMax)
382
internal static NativeMethods.
HWND
GetWindow(NativeMethods.
HWND
hwnd, int uCmd)
384
NativeMethods.
HWND
result = NativeMethodsSetLastError.GetWindow(hwnd, uCmd);
387
if (result == NativeMethods.
HWND
.NULL)
395
internal static int GetWindowLong(NativeMethods.
HWND
hWnd, int nIndex)
424
internal static bool GetWindowPlacement(NativeMethods.
HWND
hwnd, ref UnsafeNativeMethods.WINDOWPLACEMENT wp)
437
internal static bool GetWindowRect(NativeMethods.
HWND
hwnd, out NativeMethods.RECT rc)
510
internal static IntPtr OpenProcess(int dwDesiredAccess, bool fInherit, int dwProcessId, NativeMethods.
HWND
hwnd)
540
internal static bool PostMessage(NativeMethods.
HWND
hWnd, int nMsg, IntPtr wParam, IntPtr lParam)
553
internal static bool RegisterHotKey(NativeMethods.
HWND
hWnd, int id, int fsModifiers, int vk)
579
internal static IntPtr SendMessageTimeout(NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, IntPtr lParam)
596
internal static IntPtr SendMessageTimeout(NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, ref UnsafeNativeMethods.MINMAXINFO lParam)
613
internal static IntPtr SendMessageTimeout(NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, StringBuilder lParam)
631
internal static bool SetWindowPlacement(NativeMethods.
HWND
hwnd, ref UnsafeNativeMethods.WINDOWPLACEMENT wp)
644
internal static bool SetWindowPos(NativeMethods.
HWND
hWnd, NativeMethods.
HWND
hWndInsertAfter, int x, int y, int cx, int cy, int flags)
657
internal static bool UnregisterHotKey(NativeMethods.
HWND
hWnd, int id)
MS\Internal\Automation\ProxyManager.cs (12)
219
internal static string GetClassName( NativeMethods.
HWND
hwnd )
233
internal static string RealGetWindowClass( NativeMethods.
HWND
hwnd )
259
internal static bool IsKnownBadWindow( NativeMethods.
HWND
hwnd )
279
NativeMethods.
HWND
hwndParent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT);
280
if (hwndParent != NativeMethods.
HWND
.NULL)
295
internal static string GetImageName( NativeMethods.
HWND
hwnd )
460
internal static IRawElementProviderSimple ProxyProviderFromHwnd(NativeMethods.
HWND
hwnd, int idChild, int idObject)
483
if (hwnd == NativeMethods.
HWND
.NULL)
547
private static IRawElementProviderSimple FindProxyFromImageFallback(ref string imageName, NativeMethods.
HWND
hwnd, int idChild, int idObject)
580
private static IRawElementProviderSimple FindProxyInEntryOrArrayList(ProxyScoping findType, object entryOrArrayList, ref string imageName, NativeMethods.
HWND
hwnd, int idChild, int idObject, string classNameForPartialMatch)
625
private static IRawElementProviderSimple GetProxyFromEntry(ProxyScoping findType, object entry, ref string imageName, NativeMethods.
HWND
hwnd, int idChild, int idObject, string classNameForPartialMatch)
781
private static string GetBaseClassName( NativeMethods.
HWND
hwnd )
MS\Internal\Automation\QueueProcessor.cs (1)
119
while (UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.
HWND
.NULL, 0, 0, UnsafeNativeMethods.PM_REMOVE))
MS\Internal\Automation\SafeProcessHandle.cs (1)
17
internal SafeProcessHandle(NativeMethods.
HWND
hwnd) : base(true)
MS\Internal\Automation\UiaCoreApi.cs (2)
1573
provider = new HwndProxyElementProvider(NativeMethods.
HWND
.Cast(hwnd));
1577
provider = ProxyManager.ProxyProviderFromHwnd(NativeMethods.
HWND
.Cast(hwnd), 0, UnsafeNativeMethods.OBJID_CLIENT);
MS\Internal\Automation\WindowHideOrCloseTracker.cs (2)
58
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast( hwnd );
MS\Internal\Automation\WindowInteractionStateTracker.cs (2)
73
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast(hwnd);
MS\Internal\Automation\WindowShowOrOpenTracker.cs (2)
58
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast( hwnd );
MS\Internal\Automation\WindowVisualStateTracker.cs (2)
73
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast(hwnd);
MS\Win32\NativeMethods.cs (11)
35
public static
HWND
Cast(IntPtr h)
37
HWND
hTemp = new HWND
44
public static implicit operator IntPtr(
HWND
h)
49
public static
HWND
NULL
53
HWND
hTemp = new HWND
61
public static bool operator==(
HWND
hl,
HWND
hr)
66
public static bool operator!=(
HWND
hl,
HWND
hr)
73
HWND
hr = Cast((
HWND
)oCompare);
MS\Win32\SafeNativeMethods.cs (24)
22
public static extern int GetWindowThreadProcessId( NativeMethods.
HWND
hWnd, out int lpdwProcessId);
60
public NativeMethods.
HWND
hwndActive;
61
public NativeMethods.
HWND
hwndFocus;
62
public NativeMethods.
HWND
hwndCapture;
63
public NativeMethods.
HWND
hwndMenuOwner;
64
public NativeMethods.
HWND
hwndMoveSize;
65
public NativeMethods.
HWND
hwndCaret;
113
public static extern NativeMethods.
HWND
GetAncestor( NativeMethods.
HWND
hwnd, int gaFlags );
123
public static extern NativeMethods.
HWND
GetDesktopWindow();
129
public delegate bool EnumThreadWndProc( NativeMethods.
HWND
hwnd, NativeMethods.
HWND
lParam);
137
public static extern bool GetClientRect( NativeMethods.
HWND
hwnd, out NativeMethods.RECT rc );
140
public static extern bool GetWindowRect( NativeMethods.
HWND
hwnd, out NativeMethods.RECT rc );
143
public static extern bool IsWindow( NativeMethods.
HWND
hwnd );
146
public static extern bool IsWindowEnabled( NativeMethods.
HWND
hwnd );
149
public static extern bool IsWindowVisible( NativeMethods.
HWND
hwnd );
152
public static extern bool IsIconic(NativeMethods.
HWND
hwnd);
155
public static extern int GetClassName( NativeMethods.
HWND
hWnd, StringBuilder classname, int nMax );
158
public static extern int RealGetWindowClass( NativeMethods.
HWND
hWnd, StringBuilder classname, int nMax );
161
internal static extern bool IsChild( NativeMethods.
HWND
parent, NativeMethods.
HWND
child );
167
NativeMethods.
HWND
hwnd,
213
public static extern bool PhysicalToLogicalPoint(NativeMethods.
HWND
hwnd, ref NativeMethods.POINT pt);
MS\Win32\UnsafeNativeMethods.cs (15)
107
public static extern bool RegisterHotKey( NativeMethods.
HWND
hWnd, int id, int fsModifiers, int vk );
110
public static extern bool UnregisterHotKey( NativeMethods.
HWND
hWnd, int id );
118
public static extern void SwitchToThisWindow(NativeMethods.
HWND
hwnd, bool fAltTab);
189
NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, IntPtr lParam, int flags, int uTimeout, out IntPtr pResult );
193
NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, ref MINMAXINFO lParam, int flags, int uTimeout, out IntPtr pResult );
199
NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, StringBuilder lParam, int flags, int uTimeout, out IntPtr pResult);
207
public NativeMethods.
HWND
hwnd;
219
ref MSG msg, NativeMethods.
HWND
hwnd, int nMsgFilterMin, int nMsgFilterMax);
223
ref MSG msg, NativeMethods.
HWND
hwnd, int nMsgFilterMin, int nMsgFilterMax, int wRemoveMsg);
235
NativeMethods.
HWND
hWnd, int nMsg, IntPtr wParam, IntPtr lParam);
326
public static extern bool SetWindowPlacement( NativeMethods.
HWND
hwnd, ref WINDOWPLACEMENT wp );
329
public static extern bool GetWindowPlacement( NativeMethods.
HWND
hwnd, ref WINDOWPLACEMENT wp );
336
internal static extern bool SetWindowPos(NativeMethods.
HWND
hWnd, NativeMethods.
HWND
hWndInsertAfter, int x, int y, int cx, int cy, int flags);
353
internal NativeMethods.
HWND
hwndMenu;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (6)
55
public static extern NativeMethods.
HWND
GetWindow(NativeMethods.
HWND
hWnd, int uCmd);
58
public static extern int MapWindowPoints(NativeMethods.
HWND
hWndFrom, NativeMethods.
HWND
hWndTo, [In, Out] ref NativeMethods.RECT rect, int cPoints);
61
public static extern int MapWindowPoints(NativeMethods.
HWND
hWndFrom, NativeMethods.
HWND
hWndTo, ref NativeMethods.POINT pt, int cPoints);
System\Windows\Automation\Automation.cs (1)
161
if ( HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.
HWND
.Cast( new IntPtr( (int)val ) ) ) )