2 instantiations of HWND
UIAutomationClient (2)
MS\Win32\NativeMethods.cs (2)
38
HWND hTemp = new
HWND
();
52
HWND hTemp = new
HWND
();
217 references to HWND
UIAutomationClient (217)
MS\Internal\Automation\Accessible.cs (1)
94
return ProxyManager.GetClassName(NativeMethods.
HWND
.Cast(hwnd)) == szClass;
MS\Internal\Automation\BoundingRectTracker.cs (3)
79
if (!SafeNativeMethods.IsWindowVisible(NativeMethods.
HWND
.Cast( hwnd )))
87
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast( hwnd );
MS\Internal\Automation\ClientEventManager.cs (2)
601
if ( rawEl != null && !HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.
HWND
.Cast( hwnd ) ) )
655
if ( HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.
HWND
.Cast( hwnd ) ) )
MS\Internal\Automation\FocusTracker.cs (4)
133
provider = ProxyManager.ProxyProviderFromHwnd(NativeMethods.
HWND
.Cast(hwnd), idChild, UnsafeNativeMethods.OBJID_CLIENT);
162
provider = ProxyManager.ProxyProviderFromHwnd(NativeMethods.
HWND
.Cast(hwnd), idChild, idObject);
254
if (hwndCur == IntPtr.Zero || !SafeNativeMethods.IsWindow(NativeMethods.
HWND
.Cast(hwndCur)))
294
IntPtr i = Misc.SendMessageTimeout(NativeMethods.
HWND
.Cast(hwnd), UnsafeNativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
MS\Internal\Automation\HwndProxyElementProvider.cs (104)
46
internal HwndProxyElementProvider( NativeMethods.
HWND
hwnd )
48
Debug.Assert( hwnd != NativeMethods.
HWND
.NULL );
50
if( hwnd == NativeMethods.
HWND
.NULL )
544
NativeMethods.
HWND
hwndOwner = GetRealOwner( _hwnd );
545
if ( hwndOwner != NativeMethods.
HWND
.NULL )
650
NativeMethods.
HWND
hwndParent = SafeNativeMethods.GetAncestor(NativeMethods.
HWND
.Cast(_hwnd), SafeNativeMethods.GA_PARENT);
651
if (!MapWindowPoints(NativeMethods.
HWND
.NULL, hwndParent, ref point, 1))
706
if (!Misc.SetWindowPos(_hwnd, NativeMethods.
HWND
.NULL, (int)x, (int)y, 0, 0, UnsafeNativeMethods.SWP_NOSIZE | UnsafeNativeMethods.SWP_NOZORDER | UnsafeNativeMethods.SWP_NOACTIVATE))
965
NativeMethods.
HWND
desktop = SafeNativeMethods.GetDesktopWindow();
981
unsafe private static bool GetMenuBarInfo(NativeMethods.
HWND
hwnd, int idObject, uint idItem, out UnsafeNativeMethods.MENUBARINFO mbi)
1015
private static HwndProxyElementProvider Wrap(NativeMethods.
HWND
hwnd)
1017
if( hwnd == NativeMethods.
HWND
.NULL )
1027
internal static bool IsWindowPatternWindow( NativeMethods.
HWND
hwnd )
1072
private static bool IsTransformPatternWindow( NativeMethods.
HWND
hwnd )
1093
internal static int[] MakeRuntimeId( NativeMethods.
HWND
hwnd )
1146
private static NativeMethods.
HWND
ScanVisible( NativeMethods.
HWND
hwnd, int dir, bool includeSelf, NativeMethods.
HWND
hwndOwnedBy )
1148
if( hwnd == NativeMethods.
HWND
.NULL )
1156
for( ; hwnd != NativeMethods.
HWND
.NULL ; hwnd = Misc.GetWindow( hwnd, dir ) )
1163
NativeMethods.
HWND
hwndOwner = GetRealOwner( hwnd );
1176
private NativeMethods.
HWND
GetFirstOrLastOwnedWindow( NativeMethods.
HWND
parent, bool wantFirst )
1180
return NativeMethods.
HWND
.NULL;
1183
NativeMethods.
HWND
desktop = SafeNativeMethods.GetDesktopWindow();
1184
NativeMethods.
HWND
scan = Misc.GetWindow(desktop, SafeNativeMethods.GW_CHILD);
1207
NativeMethods.
HWND
parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT);
1212
NativeMethods.
HWND
hwndOwner = GetRealOwner(_hwnd);
1213
if (hwndOwner != NativeMethods.
HWND
.NULL)
1234
NativeMethods.
HWND
hwndOwner = GetRealOwner(_hwnd);
1235
if (hwndOwner != NativeMethods.
HWND
.NULL)
1238
NativeMethods.
HWND
hwnd = ScanVisible(_hwnd, ScanNext, ExcludeSelf, hwndOwner);
1239
if (hwnd == NativeMethods.
HWND
.NULL)
1243
hwnd = ScanVisible(hwnd, ScanNext, IncludeSelf, NativeMethods.
HWND
.NULL);
1252
NativeMethods.
HWND
next = ScanVisible(_hwnd, ScanNext, ExcludeSelf, NativeMethods.
HWND
.NULL);
1267
NativeMethods.
HWND
hwndOwner = GetRealOwner(_hwnd);
1268
if (hwndOwner != NativeMethods.
HWND
.NULL)
1272
NativeMethods.
HWND
hwnd = ScanVisible(_hwnd, ScanPrev, ExcludeSelf, hwndOwner);
1279
NativeMethods.
HWND
prev = ScanVisible(_hwnd, ScanPrev, ExcludeSelf, NativeMethods.
HWND
.NULL);
1280
if (prev == NativeMethods.
HWND
.NULL)
1284
NativeMethods.
HWND
parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT);
1305
NativeMethods.
HWND
hwnd = GetFirstOrLastOwnedWindow(_hwnd, true);
1306
if (hwnd == NativeMethods.
HWND
.NULL)
1310
hwnd = ScanVisible(hwnd, ScanNext, IncludeSelf, NativeMethods.
HWND
.NULL);
1331
NativeMethods.
HWND
hwnd = Misc.GetWindow(_hwnd, SafeNativeMethods.GW_CHILD);
1332
if (hwnd != NativeMethods.
HWND
.NULL)
1335
hwnd = ScanVisible(hwnd, ScanPrev, IncludeSelf, NativeMethods.
HWND
.NULL);
1338
if (hwnd == NativeMethods.
HWND
.NULL)
1350
private static void GetAllUIFragmentRoots(NativeMethods.
HWND
hwnd, bool includeThis, ArrayList uiFragmentRoots)
1412
for (NativeMethods.
HWND
hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD);
1413
hChild != NativeMethods.
HWND
.NULL && --SanityLoopCount > 0;
1439
private static bool IsWindowReallyEnabled( NativeMethods.
HWND
hwnd )
1451
if( hwnd == NativeMethods.
HWND
.NULL )
1457
private static bool IsWindowReallyVisible( NativeMethods.
HWND
hwnd )
1502
private static bool IsWindowCloaked(NativeMethods.
HWND
hwnd)
1517
private static bool IsTopLevelWindow( NativeMethods.
HWND
hwnd )
1522
private static NativeMethods.
HWND
GetRealOwner( NativeMethods.
HWND
hwnd )
1524
NativeMethods.
HWND
hwndOwner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER);
1525
if( hwndOwner == NativeMethods.
HWND
.NULL )
1527
return NativeMethods.
HWND
.NULL;
1534
return NativeMethods.
HWND
.NULL;
1605
private bool EnumWindows( NativeMethods.
HWND
hwnd, NativeMethods.
HWND
possibleOwner )
1610
NativeMethods.
HWND
owner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER);
1665
private static HwndProxyElementProvider ElementProviderFromPoint(NativeMethods.
HWND
current, double x, double y)
1674
NativeMethods.
HWND
child = NativeMethods.
HWND
.NULL;
1681
if (child == NativeMethods.
HWND
.NULL)
1731
private static NativeMethods.
HWND
ChildWindowFromPoint( NativeMethods.
HWND
hwnd, double x, double y, out bool isClientArea )
1733
NativeMethods.
HWND
hBestFitTransparent = NativeMethods.
HWND
.NULL;
1740
return NativeMethods.
HWND
.NULL;
1746
for (NativeMethods.
HWND
hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD);
1747
hChild != NativeMethods.
HWND
.NULL && --SanityLoopCount > 0 ;
1767
NativeMethods.
HWND
hwndTopLevel = SafeNativeMethods.GetAncestor(hChild, SafeNativeMethods.GA_ROOT);
1847
if( hBestFitTransparent == NativeMethods.
HWND
.NULL )
1880
!MapWindowPoints(hChild, NativeMethods.
HWND
.NULL, ref rcClient, 2) ||
1895
return NativeMethods.
HWND
.NULL;
1900
if( hBestFitTransparent != NativeMethods.
HWND
.NULL )
1909
private static bool IsProgmanWindow(NativeMethods.
HWND
hwnd)
1911
while (hwnd != NativeMethods.
HWND
.NULL)
1923
private static bool MapWindowPoints(NativeMethods.
HWND
hWndFrom, NativeMethods.
HWND
hWndTo, ref NativeMethods.RECT rect, int cPoints)
1931
if ((IsProgmanWindow(hWndFrom) && hWndTo == NativeMethods.
HWND
.NULL) ||
1932
(hWndFrom == NativeMethods.
HWND
.NULL && IsProgmanWindow(hWndTo)))
1948
private static bool MapWindowPoints(NativeMethods.
HWND
hWndFrom, NativeMethods.
HWND
hWndTo, ref NativeMethods.POINT pt, int cPoints)
1956
if ((IsProgmanWindow(hWndFrom) && hWndTo == NativeMethods.
HWND
.NULL) ||
1957
(hWndFrom == NativeMethods.
HWND
.NULL && IsProgmanWindow(hWndTo)))
1977
private static int GetWindowStyle(NativeMethods.
HWND
hwnd)
1988
private static int GetWindowExStyle(NativeMethods.
HWND
hwnd)
1997
private static bool SetFocus( NativeMethods.
HWND
hwnd )
2010
NativeMethods.
HWND
parent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT);
2032
if( Misc.RegisterHotKey( NativeMethods.
HWND
.NULL, atom, 0, vk ) )
2075
if (Misc.GetMessage(ref msg, NativeMethods.
HWND
.NULL, 0, 0) == 0)
2097
Misc.UnregisterHotKey(NativeMethods.
HWND
.NULL, atom);
2107
private static NativeMethods.
HWND
GetFocusedWindow()
2113
return NativeMethods.
HWND
.NULL;
2162
private NativeMethods.
HWND
_hwnd;
MS\Internal\Automation\MenuTracker.cs (2)
61
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast( hwnd );
MS\Internal\Automation\Misc.cs (20)
318
internal static bool GetClientRect(NativeMethods.
HWND
hwnd, out NativeMethods.RECT rc)
353
internal static bool GetMenuBarInfo(NativeMethods.
HWND
hwnd, int idObject, uint item, ref UnsafeNativeMethods.MENUBARINFO mbi)
379
internal static int GetMessage(ref UnsafeNativeMethods.MSG msg, NativeMethods.
HWND
hwnd, int nMsgFilterMin, int nMsgFilterMax)
392
internal static NativeMethods.
HWND
GetWindow(NativeMethods.
HWND
hwnd, int uCmd)
394
NativeMethods.
HWND
result = NativeMethodsSetLastError.GetWindow(hwnd, uCmd);
397
if (result == NativeMethods.
HWND
.NULL)
405
internal static int GetWindowLong(NativeMethods.
HWND
hWnd, int nIndex)
434
internal static bool GetWindowPlacement(NativeMethods.
HWND
hwnd, ref UnsafeNativeMethods.WINDOWPLACEMENT wp)
447
internal static bool GetWindowRect(NativeMethods.
HWND
hwnd, out NativeMethods.RECT rc)
520
internal static IntPtr OpenProcess(int dwDesiredAccess, bool fInherit, int dwProcessId, NativeMethods.
HWND
hwnd)
550
internal static bool PostMessage(NativeMethods.
HWND
hWnd, int nMsg, IntPtr wParam, IntPtr lParam)
563
internal static bool RegisterHotKey(NativeMethods.
HWND
hWnd, int id, int fsModifiers, int vk)
589
internal static IntPtr SendMessageTimeout(NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, IntPtr lParam)
606
internal static IntPtr SendMessageTimeout(NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, ref UnsafeNativeMethods.MINMAXINFO lParam)
623
internal static IntPtr SendMessageTimeout(NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, StringBuilder lParam)
641
internal static bool SetWindowPlacement(NativeMethods.
HWND
hwnd, ref UnsafeNativeMethods.WINDOWPLACEMENT wp)
654
internal static bool SetWindowPos(NativeMethods.
HWND
hWnd, NativeMethods.
HWND
hWndInsertAfter, int x, int y, int cx, int cy, int flags)
667
internal static bool UnregisterHotKey(NativeMethods.
HWND
hWnd, int id)
MS\Internal\Automation\ProxyManager.cs (12)
227
internal static string GetClassName( NativeMethods.
HWND
hwnd )
241
internal static string RealGetWindowClass( NativeMethods.
HWND
hwnd )
267
internal static bool IsKnownBadWindow( NativeMethods.
HWND
hwnd )
287
NativeMethods.
HWND
hwndParent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT);
288
if (hwndParent != NativeMethods.
HWND
.NULL)
303
internal static string GetImageName( NativeMethods.
HWND
hwnd )
466
internal static IRawElementProviderSimple ProxyProviderFromHwnd(NativeMethods.
HWND
hwnd, int idChild, int idObject)
489
if (hwnd == NativeMethods.
HWND
.NULL)
553
static private IRawElementProviderSimple FindProxyFromImageFallback(ref string imageName, NativeMethods.
HWND
hwnd, int idChild, int idObject)
588
static private IRawElementProviderSimple FindProxyInEntryOrArrayList(ProxyScoping findType, object entryOrArrayList, ref string imageName, NativeMethods.
HWND
hwnd, int idChild, int idObject, string classNameForPartialMatch)
633
static private IRawElementProviderSimple GetProxyFromEntry(ProxyScoping findType, object entry, ref string imageName, NativeMethods.
HWND
hwnd, int idChild, int idObject, string classNameForPartialMatch)
789
private static string GetBaseClassName( NativeMethods.
HWND
hwnd )
MS\Internal\Automation\QueueProcessor.cs (1)
125
while (UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.
HWND
.NULL, 0, 0, UnsafeNativeMethods.PM_REMOVE))
MS\Internal\Automation\SafeProcessHandle.cs (1)
25
internal SafeProcessHandle(NativeMethods.
HWND
hwnd) : base(true)
MS\Internal\Automation\UiaCoreApi.cs (2)
1578
provider = new HwndProxyElementProvider(NativeMethods.
HWND
.Cast(hwnd));
1582
provider = ProxyManager.ProxyProviderFromHwnd(NativeMethods.
HWND
.Cast(hwnd), 0, UnsafeNativeMethods.OBJID_CLIENT);
MS\Internal\Automation\WindowHideOrCloseTracker.cs (2)
60
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast( hwnd );
MS\Internal\Automation\WindowInteractionStateTracker.cs (2)
77
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast(hwnd);
MS\Internal\Automation\WindowShowOrOpenTracker.cs (2)
61
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast( hwnd );
MS\Internal\Automation\WindowVisualStateTracker.cs (2)
74
NativeMethods.
HWND
nativeHwnd = NativeMethods.
HWND
.Cast(hwnd);
MS\Win32\NativeMethods.cs (11)
36
public static
HWND
Cast(IntPtr h)
38
HWND
hTemp = new HWND();
43
public static implicit operator IntPtr(
HWND
h)
48
public static
HWND
NULL
52
HWND
hTemp = new HWND();
58
public static bool operator==(
HWND
hl,
HWND
hr)
63
public static bool operator!=(
HWND
hl,
HWND
hr)
70
HWND
hr = Cast((
HWND
)oCompare);
MS\Win32\SafeNativeMethods.cs (24)
26
public static extern int GetWindowThreadProcessId( NativeMethods.
HWND
hWnd, out int lpdwProcessId);
64
public NativeMethods.
HWND
hwndActive;
65
public NativeMethods.
HWND
hwndFocus;
66
public NativeMethods.
HWND
hwndCapture;
67
public NativeMethods.
HWND
hwndMenuOwner;
68
public NativeMethods.
HWND
hwndMoveSize;
69
public NativeMethods.
HWND
hwndCaret;
117
public static extern NativeMethods.
HWND
GetAncestor( NativeMethods.
HWND
hwnd, int gaFlags );
127
public static extern NativeMethods.
HWND
GetDesktopWindow();
133
public delegate bool EnumThreadWndProc( NativeMethods.
HWND
hwnd, NativeMethods.
HWND
lParam);
141
public static extern bool GetClientRect( NativeMethods.
HWND
hwnd, out NativeMethods.RECT rc );
144
public static extern bool GetWindowRect( NativeMethods.
HWND
hwnd, out NativeMethods.RECT rc );
147
public static extern bool IsWindow( NativeMethods.
HWND
hwnd );
150
public static extern bool IsWindowEnabled( NativeMethods.
HWND
hwnd );
153
public static extern bool IsWindowVisible( NativeMethods.
HWND
hwnd );
156
public static extern bool IsIconic(NativeMethods.
HWND
hwnd);
159
public static extern int GetClassName( NativeMethods.
HWND
hWnd, StringBuilder classname, int nMax );
162
public static extern int RealGetWindowClass( NativeMethods.
HWND
hWnd, StringBuilder classname, int nMax );
165
internal extern static bool IsChild( NativeMethods.
HWND
parent, NativeMethods.
HWND
child );
171
NativeMethods.
HWND
hwnd,
217
public static extern bool PhysicalToLogicalPoint(NativeMethods.
HWND
hwnd, ref NativeMethods.POINT pt);
MS\Win32\UnsafeNativeMethods.cs (15)
112
public static extern bool RegisterHotKey( NativeMethods.
HWND
hWnd, int id, int fsModifiers, int vk );
115
public static extern bool UnregisterHotKey( NativeMethods.
HWND
hWnd, int id );
123
public static extern void SwitchToThisWindow(NativeMethods.
HWND
hwnd, bool fAltTab);
194
NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, IntPtr lParam, int flags, int uTimeout, out IntPtr pResult );
198
NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, ref MINMAXINFO lParam, int flags, int uTimeout, out IntPtr pResult );
204
NativeMethods.
HWND
hwnd, int Msg, IntPtr wParam, StringBuilder lParam, int flags, int uTimeout, out IntPtr pResult);
212
public NativeMethods.
HWND
hwnd;
224
ref MSG msg, NativeMethods.
HWND
hwnd, int nMsgFilterMin, int nMsgFilterMax);
228
ref MSG msg, NativeMethods.
HWND
hwnd, int nMsgFilterMin, int nMsgFilterMax, int wRemoveMsg);
240
NativeMethods.
HWND
hWnd, int nMsg, IntPtr wParam, IntPtr lParam);
331
public static extern bool SetWindowPlacement( NativeMethods.
HWND
hwnd, ref WINDOWPLACEMENT wp );
334
public static extern bool GetWindowPlacement( NativeMethods.
HWND
hwnd, ref WINDOWPLACEMENT wp );
341
internal static extern bool SetWindowPos(NativeMethods.
HWND
hWnd, NativeMethods.
HWND
hWndInsertAfter, int x, int y, int cx, int cy, int flags);
358
internal NativeMethods.
HWND
hwndMenu;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (6)
60
public static extern NativeMethods.
HWND
GetWindow(NativeMethods.
HWND
hWnd, int uCmd);
63
public static extern int MapWindowPoints(NativeMethods.
HWND
hWndFrom, NativeMethods.
HWND
hWndTo, [In, Out] ref NativeMethods.RECT rect, int cPoints);
66
public static extern int MapWindowPoints(NativeMethods.
HWND
hWndFrom, NativeMethods.
HWND
hWndTo, ref NativeMethods.POINT pt, int cPoints);
System\Windows\Automation\Automation.cs (1)
177
if ( HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.
HWND
.Cast( new IntPtr( (int)val ) ) ) )