2 instantiations of HWND
UIAutomationClient (2)
MS\Win32\NativeMethods.cs (2)
37
HWND hTemp = new
HWND
();
51
HWND hTemp = new
HWND
();
217 references to HWND
UIAutomationClient (217)
MS\Internal\Automation\Accessible.cs (1)
102
return ProxyManager.GetClassName(NativeMethods.
HWND
.Cast(hwnd)) == szClass;
MS\Internal\Automation\BoundingRectTracker.cs (3)
87
if (!SafeNativeMethods.IsWindowVisible(NativeMethods.
HWND
.Cast( hwnd )))
95
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast( hwnd );
MS\Internal\Automation\ClientEventManager.cs (2)
610
if ( rawEl != null && !HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.
HWND
.Cast( hwnd ) ) )
665
if ( HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.
HWND
.Cast( hwnd ) ) )
MS\Internal\Automation\FocusTracker.cs (4)
141
provider = ProxyManager.ProxyProviderFromHwnd(NativeMethods.
HWND
.Cast(hwnd), idChild, UnsafeNativeMethods.OBJID_CLIENT);
170
provider = ProxyManager.ProxyProviderFromHwnd(NativeMethods.
HWND
.Cast(hwnd), idChild, idObject);
262
if (hwndCur == IntPtr.Zero || !SafeNativeMethods.IsWindow(NativeMethods.
HWND
.Cast(hwndCur)))
302
IntPtr i = Misc.SendMessageTimeout(NativeMethods.
HWND
.Cast(hwnd), UnsafeNativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
MS\Internal\Automation\HwndProxyElementProvider.cs (104)
54
internal HwndProxyElementProvider( NativeMethods.
HWND
hwnd )
56
Debug.Assert( hwnd != NativeMethods.
HWND
.NULL );
58
if( hwnd == NativeMethods.
HWND
.NULL )
552
NativeMethods.
HWND
hwndOwner = GetRealOwner( _hwnd );
553
if ( hwndOwner != NativeMethods.
HWND
.NULL )
657
NativeMethods.
HWND
hwndParent = SafeNativeMethods.GetAncestor(NativeMethods.
HWND
.Cast(_hwnd), SafeNativeMethods.GA_PARENT);
658
if (!MapWindowPoints(NativeMethods.
HWND
.NULL, hwndParent, ref point, 1))
713
if (!Misc.SetWindowPos(_hwnd, NativeMethods.
HWND
.NULL, (int)x, (int)y, 0, 0, UnsafeNativeMethods.SWP_NOSIZE | UnsafeNativeMethods.SWP_NOZORDER | UnsafeNativeMethods.SWP_NOACTIVATE))
973
NativeMethods.
HWND
desktop = SafeNativeMethods.GetDesktopWindow();
989
unsafe private static bool GetMenuBarInfo(NativeMethods.
HWND
hwnd, int idObject, uint idItem, out UnsafeNativeMethods.MENUBARINFO mbi)
1023
private static HwndProxyElementProvider Wrap(NativeMethods.
HWND
hwnd)
1025
if( hwnd == NativeMethods.
HWND
.NULL )
1035
internal static bool IsWindowPatternWindow( NativeMethods.
HWND
hwnd )
1080
private static bool IsTransformPatternWindow( NativeMethods.
HWND
hwnd )
1101
internal static int[] MakeRuntimeId( NativeMethods.
HWND
hwnd )
1154
private static NativeMethods.
HWND
ScanVisible( NativeMethods.
HWND
hwnd, int dir, bool includeSelf, NativeMethods.
HWND
hwndOwnedBy )
1156
if( hwnd == NativeMethods.
HWND
.NULL )
1164
for( ; hwnd != NativeMethods.
HWND
.NULL ; hwnd = Misc.GetWindow( hwnd, dir ) )
1171
NativeMethods.
HWND
hwndOwner = GetRealOwner( hwnd );
1184
private NativeMethods.
HWND
GetFirstOrLastOwnedWindow( NativeMethods.
HWND
parent, bool wantFirst )
1188
return NativeMethods.
HWND
.NULL;
1191
NativeMethods.
HWND
desktop = SafeNativeMethods.GetDesktopWindow();
1192
NativeMethods.
HWND
scan = Misc.GetWindow(desktop, SafeNativeMethods.GW_CHILD);
1215
NativeMethods.
HWND
parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT);
1220
NativeMethods.
HWND
hwndOwner = GetRealOwner(_hwnd);
1221
if (hwndOwner != NativeMethods.
HWND
.NULL)
1242
NativeMethods.
HWND
hwndOwner = GetRealOwner(_hwnd);
1243
if (hwndOwner != NativeMethods.
HWND
.NULL)
1246
NativeMethods.
HWND
hwnd = ScanVisible(_hwnd, ScanNext, ExcludeSelf, hwndOwner);
1247
if (hwnd == NativeMethods.
HWND
.NULL)
1251
hwnd = ScanVisible(hwnd, ScanNext, IncludeSelf, NativeMethods.
HWND
.NULL);
1260
NativeMethods.
HWND
next = ScanVisible(_hwnd, ScanNext, ExcludeSelf, NativeMethods.
HWND
.NULL);
1275
NativeMethods.
HWND
hwndOwner = GetRealOwner(_hwnd);
1276
if (hwndOwner != NativeMethods.
HWND
.NULL)
1280
NativeMethods.
HWND
hwnd = ScanVisible(_hwnd, ScanPrev, ExcludeSelf, hwndOwner);
1287
NativeMethods.
HWND
prev = ScanVisible(_hwnd, ScanPrev, ExcludeSelf, NativeMethods.
HWND
.NULL);
1288
if (prev == NativeMethods.
HWND
.NULL)
1292
NativeMethods.
HWND
parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT);
1313
NativeMethods.
HWND
hwnd = GetFirstOrLastOwnedWindow(_hwnd, true);
1314
if (hwnd == NativeMethods.
HWND
.NULL)
1318
hwnd = ScanVisible(hwnd, ScanNext, IncludeSelf, NativeMethods.
HWND
.NULL);
1339
NativeMethods.
HWND
hwnd = Misc.GetWindow(_hwnd, SafeNativeMethods.GW_CHILD);
1340
if (hwnd != NativeMethods.
HWND
.NULL)
1343
hwnd = ScanVisible(hwnd, ScanPrev, IncludeSelf, NativeMethods.
HWND
.NULL);
1346
if (hwnd == NativeMethods.
HWND
.NULL)
1358
private static void GetAllUIFragmentRoots(NativeMethods.
HWND
hwnd, bool includeThis, ArrayList uiFragmentRoots)
1420
for (NativeMethods.
HWND
hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD);
1421
hChild != NativeMethods.
HWND
.NULL && --SanityLoopCount > 0;
1447
private static bool IsWindowReallyEnabled( NativeMethods.
HWND
hwnd )
1459
if( hwnd == NativeMethods.
HWND
.NULL )
1465
private static bool IsWindowReallyVisible( NativeMethods.
HWND
hwnd )
1496
private static bool IsWindowCloaked(NativeMethods.
HWND
hwnd)
1511
private static bool IsTopLevelWindow( NativeMethods.
HWND
hwnd )
1516
private static NativeMethods.
HWND
GetRealOwner( NativeMethods.
HWND
hwnd )
1518
NativeMethods.
HWND
hwndOwner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER);
1519
if( hwndOwner == NativeMethods.
HWND
.NULL )
1521
return NativeMethods.
HWND
.NULL;
1528
return NativeMethods.
HWND
.NULL;
1599
private bool EnumWindows( NativeMethods.
HWND
hwnd, NativeMethods.
HWND
possibleOwner )
1604
NativeMethods.
HWND
owner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER);
1659
private static HwndProxyElementProvider ElementProviderFromPoint(NativeMethods.
HWND
current, double x, double y)
1668
NativeMethods.
HWND
child = NativeMethods.
HWND
.NULL;
1675
if (child == NativeMethods.
HWND
.NULL)
1725
private static NativeMethods.
HWND
ChildWindowFromPoint( NativeMethods.
HWND
hwnd, double x, double y, out bool isClientArea )
1727
NativeMethods.
HWND
hBestFitTransparent = NativeMethods.
HWND
.NULL;
1734
return NativeMethods.
HWND
.NULL;
1740
for (NativeMethods.
HWND
hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD);
1741
hChild != NativeMethods.
HWND
.NULL && --SanityLoopCount > 0 ;
1761
NativeMethods.
HWND
hwndTopLevel = SafeNativeMethods.GetAncestor(hChild, SafeNativeMethods.GA_ROOT);
1841
if( hBestFitTransparent == NativeMethods.
HWND
.NULL )
1874
!MapWindowPoints(hChild, NativeMethods.
HWND
.NULL, ref rcClient, 2) ||
1889
return NativeMethods.
HWND
.NULL;
1894
if( hBestFitTransparent != NativeMethods.
HWND
.NULL )
1903
private static bool IsProgmanWindow(NativeMethods.
HWND
hwnd)
1905
while (hwnd != NativeMethods.
HWND
.NULL)
1917
private static bool MapWindowPoints(NativeMethods.
HWND
hWndFrom, NativeMethods.
HWND
hWndTo, ref NativeMethods.RECT rect, int cPoints)
1925
if ((IsProgmanWindow(hWndFrom) && hWndTo == NativeMethods.
HWND
.NULL) ||
1926
(hWndFrom == NativeMethods.
HWND
.NULL && IsProgmanWindow(hWndTo)))
1942
private static bool MapWindowPoints(NativeMethods.
HWND
hWndFrom, NativeMethods.
HWND
hWndTo, ref NativeMethods.POINT pt, int cPoints)
1950
if ((IsProgmanWindow(hWndFrom) && hWndTo == NativeMethods.
HWND
.NULL) ||
1951
(hWndFrom == NativeMethods.
HWND
.NULL && IsProgmanWindow(hWndTo)))
1971
private static int GetWindowStyle(NativeMethods.
HWND
hwnd)
1982
private static int GetWindowExStyle(NativeMethods.
HWND
hwnd)
1991
private static bool SetFocus( NativeMethods.
HWND
hwnd )
2004
NativeMethods.
HWND
parent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT);
2026
if( Misc.RegisterHotKey( NativeMethods.
HWND
.NULL, atom, 0, vk ) )
2069
if (Misc.GetMessage(ref msg, NativeMethods.
HWND
.NULL, 0, 0) == 0)
2091
Misc.UnregisterHotKey(NativeMethods.
HWND
.NULL, atom);
2101
private static NativeMethods.
HWND
GetFocusedWindow()
2107
return NativeMethods.
HWND
.NULL;
2156
private NativeMethods.
HWND
_hwnd;
MS\Internal\Automation\MenuTracker.cs (2)
70
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast( hwnd );
MS\Internal\Automation\Misc.cs (20)
345
internal static bool GetClientRect(NativeMethods.
HWND
hwnd, out NativeMethods.RECT rc)
380
internal static bool GetMenuBarInfo(NativeMethods.
HWND
hwnd, int idObject, uint item, ref UnsafeNativeMethods.MENUBARINFO mbi)
406
internal static int GetMessage(ref UnsafeNativeMethods.MSG msg, NativeMethods.
HWND
hwnd, int nMsgFilterMin, int nMsgFilterMax)
419
internal static NativeMethods.
HWND
GetWindow(NativeMethods.
HWND
hwnd, int uCmd)
421
NativeMethods.
HWND
result = NativeMethodsSetLastError.GetWindow(hwnd, uCmd);
424
if (result == NativeMethods.
HWND
.NULL)
433
internal static int GetWindowLong(NativeMethods.
HWND
hWnd, int nIndex)
462
internal static bool GetWindowPlacement(NativeMethods.
HWND
hwnd, ref UnsafeNativeMethods.WINDOWPLACEMENT wp)
475
internal static bool GetWindowRect(NativeMethods.
HWND
hwnd, out NativeMethods.RECT rc)
550
internal static IntPtr OpenProcess(int dwDesiredAccess, bool fInherit, int dwProcessId, NativeMethods.
HWND
hwnd)
580
internal static bool PostMessage(NativeMethods.
HWND
hWnd, int nMsg, IntPtr wParam, IntPtr lParam)
593
internal static bool RegisterHotKey(NativeMethods.
HWND
hWnd, int id, int fsModifiers, int vk)
619
internal static IntPtr SendMessageTimeout(NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, IntPtr lParam)
636
internal static IntPtr SendMessageTimeout(NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, ref UnsafeNativeMethods.MINMAXINFO lParam)
653
internal static IntPtr SendMessageTimeout(NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, StringBuilder lParam)
671
internal static bool SetWindowPlacement(NativeMethods.
HWND
hwnd, ref UnsafeNativeMethods.WINDOWPLACEMENT wp)
684
internal static bool SetWindowPos(NativeMethods.
HWND
hWnd, NativeMethods.
HWND
hWndInsertAfter, int x, int y, int cx, int cy, int flags)
697
internal static bool UnregisterHotKey(NativeMethods.
HWND
hWnd, int id)
MS\Internal\Automation\ProxyManager.cs (12)
236
internal static string GetClassName( NativeMethods.
HWND
hwnd )
250
internal static string RealGetWindowClass( NativeMethods.
HWND
hwnd )
276
internal static bool IsKnownBadWindow( NativeMethods.
HWND
hwnd )
296
NativeMethods.
HWND
hwndParent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT);
297
if (hwndParent != NativeMethods.
HWND
.NULL)
312
internal static string GetImageName( NativeMethods.
HWND
hwnd )
475
internal static IRawElementProviderSimple ProxyProviderFromHwnd(NativeMethods.
HWND
hwnd, int idChild, int idObject)
498
if (hwnd == NativeMethods.
HWND
.NULL)
562
static private IRawElementProviderSimple FindProxyFromImageFallback(ref string imageName, NativeMethods.
HWND
hwnd, int idChild, int idObject)
597
static private IRawElementProviderSimple FindProxyInEntryOrArrayList(ProxyScoping findType, object entryOrArrayList, ref string imageName, NativeMethods.
HWND
hwnd, int idChild, int idObject, string classNameForPartialMatch)
642
static private IRawElementProviderSimple GetProxyFromEntry(ProxyScoping findType, object entry, ref string imageName, NativeMethods.
HWND
hwnd, int idChild, int idObject, string classNameForPartialMatch)
799
private static string GetBaseClassName( NativeMethods.
HWND
hwnd )
MS\Internal\Automation\QueueProcessor.cs (1)
134
while (UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.
HWND
.NULL, 0, 0, UnsafeNativeMethods.PM_REMOVE))
MS\Internal\Automation\SafeProcessHandle.cs (1)
34
internal SafeProcessHandle(NativeMethods.
HWND
hwnd) : base(true)
MS\Internal\Automation\UiaCoreAPI.cs (2)
1569
provider = new HwndProxyElementProvider(NativeMethods.
HWND
.Cast(hwnd));
1573
provider = ProxyManager.ProxyProviderFromHwnd(NativeMethods.
HWND
.Cast(hwnd), 0, UnsafeNativeMethods.OBJID_CLIENT);
MS\Internal\Automation\WindowHideOrCloseTracker.cs (2)
68
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast( hwnd );
MS\Internal\Automation\WindowInteractionStateTracker.cs (2)
85
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast(hwnd);
MS\Internal\Automation\WindowShowOrOpenTracker.cs (2)
70
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast( hwnd );
MS\Internal\Automation\WindowVisualStateTracker.cs (2)
82
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast(hwnd);
MS\Win32\NativeMethods.cs (11)
35
public static
HWND
Cast(IntPtr h)
37
HWND
hTemp = new HWND();
42
public static implicit operator IntPtr(
HWND
h)
47
public static
HWND
NULL
51
HWND
hTemp = new HWND();
57
public static bool operator==(
HWND
hl,
HWND
hr)
62
public static bool operator!=(
HWND
hl,
HWND
hr)
69
HWND
hr = Cast((
HWND
)oCompare);
MS\Win32\SafeNativeMethods.cs (24)
36
public static extern int GetWindowThreadProcessId( NativeMethods.
HWND
hWnd, out int lpdwProcessId);
74
public NativeMethods.
HWND
hwndActive;
75
public NativeMethods.
HWND
hwndFocus;
76
public NativeMethods.
HWND
hwndCapture;
77
public NativeMethods.
HWND
hwndMenuOwner;
78
public NativeMethods.
HWND
hwndMoveSize;
79
public NativeMethods.
HWND
hwndCaret;
127
public static extern NativeMethods.
HWND
GetAncestor( NativeMethods.
HWND
hwnd, int gaFlags );
137
public static extern NativeMethods.
HWND
GetDesktopWindow();
143
public delegate bool EnumThreadWndProc( NativeMethods.
HWND
hwnd, NativeMethods.
HWND
lParam);
151
public static extern bool GetClientRect( NativeMethods.
HWND
hwnd, out NativeMethods.RECT rc );
154
public static extern bool GetWindowRect( NativeMethods.
HWND
hwnd, out NativeMethods.RECT rc );
157
public static extern bool IsWindow( NativeMethods.
HWND
hwnd );
160
public static extern bool IsWindowEnabled( NativeMethods.
HWND
hwnd );
163
public static extern bool IsWindowVisible( NativeMethods.
HWND
hwnd );
166
public static extern bool IsIconic(NativeMethods.
HWND
hwnd);
169
public static extern int GetClassName( NativeMethods.
HWND
hWnd, StringBuilder classname, int nMax );
172
public static extern int RealGetWindowClass( NativeMethods.
HWND
hWnd, StringBuilder classname, int nMax );
175
internal extern static bool IsChild( NativeMethods.
HWND
parent, NativeMethods.
HWND
child );
181
NativeMethods.
HWND
hwnd,
227
public static extern bool PhysicalToLogicalPoint(NativeMethods.
HWND
hwnd, ref NativeMethods.POINT pt);
MS\Win32\UnsafeNativeMethods.cs (15)
122
public static extern bool RegisterHotKey( NativeMethods.
HWND
hWnd, int id, int fsModifiers, int vk );
125
public static extern bool UnregisterHotKey( NativeMethods.
HWND
hWnd, int id );
133
public static extern void SwitchToThisWindow(NativeMethods.
HWND
hwnd, bool fAltTab);
204
NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, IntPtr lParam, int flags, int uTimeout, out IntPtr pResult );
208
NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, ref MINMAXINFO lParam, int flags, int uTimeout, out IntPtr pResult );
214
NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, StringBuilder lParam, int flags, int uTimeout, out IntPtr pResult);
222
public NativeMethods.
HWND
hwnd;
234
ref MSG msg, NativeMethods.
HWND
hwnd, int nMsgFilterMin, int nMsgFilterMax);
238
ref MSG msg, NativeMethods.
HWND
hwnd, int nMsgFilterMin, int nMsgFilterMax, int wRemoveMsg);
250
NativeMethods.
HWND
hWnd, int nMsg, IntPtr wParam, IntPtr lParam);
341
public static extern bool SetWindowPlacement( NativeMethods.
HWND
hwnd, ref WINDOWPLACEMENT wp );
344
public static extern bool GetWindowPlacement( NativeMethods.
HWND
hwnd, ref WINDOWPLACEMENT wp );
351
internal static extern bool SetWindowPos(NativeMethods.
HWND
hWnd, NativeMethods.
HWND
hWndInsertAfter, int x, int y, int cx, int cy, int flags);
368
internal NativeMethods.
HWND
hwndMenu;
parent\parent\Shared\MS\Win32\NativeMethodsSetLastError.cs (6)
76
public static extern NativeMethods.
HWND
GetWindow(NativeMethods.
HWND
hWnd, int uCmd);
79
public static extern int MapWindowPoints(NativeMethods.
HWND
hWndFrom, NativeMethods.
HWND
hWndTo, [In, Out] ref NativeMethods.RECT rect, int cPoints);
82
public static extern int MapWindowPoints(NativeMethods.
HWND
hWndFrom, NativeMethods.
HWND
hWndTo, [In, Out] ref NativeMethods.POINT pt, int cPoints);
System\Windows\Automation\Automation.cs (1)
201
if ( HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.
HWND
.Cast( new IntPtr( (int)val ) ) ) )