146 references to SafeNativeMethods
UIAutomationClient (146)
MS\Internal\Automation\BoundingRectTracker.cs (1)
87
if (!
SafeNativeMethods
.IsWindowVisible(NativeMethods.HWND.Cast( hwnd )))
MS\Internal\Automation\ClickablePoint.cs (2)
45
if (
SafeNativeMethods
.MonitorFromRect( ref winRect,
SafeNativeMethods
.MONITOR_DEFAULTTONULL ) == IntPtr.Zero)
MS\Internal\Automation\EventListenerClientSide.cs (1)
75
uint eventTime =
SafeNativeMethods
.GetTickCount();
MS\Internal\Automation\FocusTracker.cs (3)
262
if (hwndCur == IntPtr.Zero || !
SafeNativeMethods
.IsWindow(NativeMethods.HWND.Cast(hwndCur)))
322
SafeNativeMethods
.GUITHREADINFO guiThreadInfo = new
SafeNativeMethods
.GUITHREADINFO();
MS\Internal\Automation\HwndProxyElementProvider.cs (119)
114
int id = Misc.GetWindowLong(_hwnd,
SafeNativeMethods
.GWL_ID);
163
if (
SafeNativeMethods
.GetWindowThreadProcessId(_hwnd, out pid) == 0)
177
SafeNativeMethods
.GUITHREADINFO gti = new
SafeNativeMethods
.GUITHREADINFO ();
184
return (gti.hwndFocus == _hwnd) || (
SafeNativeMethods
.IsChild(_hwnd, gti.hwndFocus));
248
if (IsTopLevelWindow(_hwnd) &&
SafeNativeMethods
.IsIconic(_hwnd))
308
if ( !
SafeNativeMethods
.IsWindow( _hwnd ) )
316
if ( IsBitSet(GetWindowStyle(),
SafeNativeMethods
.WS_DISABLED) )
433
int guiThreadId =
SafeNativeMethods
.GetWindowThreadProcessId(_hwnd, out pid);
511
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
516
return IsBitSet(style,
SafeNativeMethods
.WS_MAXIMIZEBOX);
530
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
535
return IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZEBOX);
543
if (!
SafeNativeMethods
.IsWindow(_hwnd))
555
return IsBitSet(GetWindowStyle(hwndOwner),
SafeNativeMethods
.WS_DISABLED);
567
if ( IsBitSet(style,
SafeNativeMethods
.WS_MAXIMIZE) )
571
else if ( IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZE) )
602
if (
SafeNativeMethods
.IsWindow( _hwnd ) )
616
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
632
return IsBitSet(GetWindowExStyle(),
SafeNativeMethods
.WS_EX_TOPMOST);
652
if ( IsBitSet(extendedStyle,
SafeNativeMethods
.WS_EX_MDICHILD) )
657
NativeMethods.HWND hwndParent =
SafeNativeMethods
.GetAncestor(NativeMethods.HWND.Cast(_hwnd),
SafeNativeMethods
.GA_PARENT);
674
int dx =
SafeNativeMethods
.GetSystemMetrics(
SafeNativeMethods
.SM_CXHSCROLL);
675
int dy =
SafeNativeMethods
.GetSystemMetrics(
SafeNativeMethods
.SM_CYHSCROLL);
733
if ( IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZE) )
793
if ( !
SafeNativeMethods
.IsWindow( _hwnd ) )
805
int x =
SafeNativeMethods
.GetSystemMetrics(
SafeNativeMethods
.SM_CXMAXTRACK);
806
int y =
SafeNativeMethods
.GetSystemMetrics(
SafeNativeMethods
.SM_CYMAXTRACK);
855
if (!
SafeNativeMethods
.IsWindow(_hwnd))
873
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
879
if (IsBitSet(style,
SafeNativeMethods
.WS_SYSMENU))
889
if (IsBitSet(style,
SafeNativeMethods
.WS_MAXIMIZE))
897
if ( IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZE) && !IsBitSet(extendedStyle,
SafeNativeMethods
.WS_EX_MDICHILD) )
902
return IsBitSet(style,
SafeNativeMethods
.WS_BORDER) && IsBitSet(style,
SafeNativeMethods
.WS_DLGFRAME);
918
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
924
if (IsBitSet(style,
SafeNativeMethods
.WS_SYSMENU))
934
if ( IsBitSet(style,
SafeNativeMethods
.WS_MAXIMIZE) || IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZE) )
939
return IsBitSet(style,
SafeNativeMethods
.WS_THICKFRAME);
948
if (!
SafeNativeMethods
.IsWindow(_hwnd))
973
NativeMethods.HWND desktop =
SafeNativeMethods
.GetDesktopWindow();
1043
if (IsBitSet(extendedStyle,
SafeNativeMethods
.WS_EX_APPWINDOW))
1055
bool hasTitleBar = IsBitSet( style,
SafeNativeMethods
.WS_BORDER ) && IsBitSet( style,
SafeNativeMethods
.WS_DLGFRAME );
1061
if (IsBitSet( extendedStyle,
SafeNativeMethods
.WS_EX_TOOLWINDOW ) && !hasTitleBar )
1064
if (IsBitSet(style,
SafeNativeMethods
.WS_POPUP) && !hasTitleBar)
1068
if (!IsTopLevelWindow(hwnd) && !IsBitSet( extendedStyle,
SafeNativeMethods
.WS_EX_MDICHILD ) )
1090
if ( IsBitSet(style,
SafeNativeMethods
.WS_THICKFRAME) )
1094
if ( IsBitSet(style,
SafeNativeMethods
.WS_BORDER) && IsBitSet(style,
SafeNativeMethods
.WS_DLGFRAME) )
1146
private const int ScanPrev =
SafeNativeMethods
.GW_HWNDPREV;
1147
private const int ScanNext =
SafeNativeMethods
.GW_HWNDNEXT;
1191
NativeMethods.HWND desktop =
SafeNativeMethods
.GetDesktopWindow();
1192
NativeMethods.HWND scan = Misc.GetWindow(desktop,
SafeNativeMethods
.GW_CHILD);
1196
scan = Misc.GetWindow(scan,
SafeNativeMethods
.GW_HWNDLAST);
1215
NativeMethods.HWND parent =
SafeNativeMethods
.GetAncestor(_hwnd,
SafeNativeMethods
.GA_PARENT);
1218
if (parent ==
SafeNativeMethods
.GetDesktopWindow())
1250
hwnd = Misc.GetWindow(hwndOwner,
SafeNativeMethods
.GW_CHILD);
1292
NativeMethods.HWND parent =
SafeNativeMethods
.GetAncestor(_hwnd,
SafeNativeMethods
.GA_PARENT);
1317
hwnd = Misc.GetWindow(_hwnd,
SafeNativeMethods
.GW_CHILD);
1339
NativeMethods.HWND hwnd = Misc.GetWindow(_hwnd,
SafeNativeMethods
.GW_CHILD);
1342
hwnd = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_HWNDLAST);
1420
for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_CHILD);
1422
hChild = Misc.GetWindow(hChild,
SafeNativeMethods
.GW_HWNDNEXT))
1455
if( !
SafeNativeMethods
.IsWindowEnabled( hwnd ) )
1458
hwnd =
SafeNativeMethods
.GetAncestor( hwnd,
SafeNativeMethods
.GA_PARENT );
1468
if(!
SafeNativeMethods
.IsWindowVisible(hwnd))
1500
if (
SafeNativeMethods
.DwmGetWindowAttribute(hwnd,
SafeNativeMethods
.DWMWA_CLOAKED, ref dwCloaked, sizeof(int)) == 0)
1513
return
SafeNativeMethods
.GetAncestor( hwnd,
SafeNativeMethods
.GA_PARENT ) ==
SafeNativeMethods
.GetDesktopWindow();
1518
NativeMethods.HWND hwndOwner = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_OWNER);
1581
int thread =
SafeNativeMethods
.GetWindowThreadProcessId(_hwnd, out process);
1587
SafeNativeMethods
.EnumThreadWndProc enumWindows = new
SafeNativeMethods
.EnumThreadWndProc(EnumWindows);
1592
bool noModalWindow =
SafeNativeMethods
.EnumThreadWindows(thread, enumWindows, _hwnd);
1602
if ( IsBitSet(extendedStyle,
SafeNativeMethods
.WS_EX_DLGMODALFRAME) )
1604
NativeMethods.HWND owner = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_OWNER);
1640
SafeNativeMethods
.GUITHREADINFO gui = new
SafeNativeMethods
.GUITHREADINFO();
1646
return (
SafeNativeMethods
.GUI_INMENUMODE == (gui.dwFlags &
SafeNativeMethods
.GUI_INMENUMODE));
1740
for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_CHILD);
1742
hChild = Misc.GetWindow(hChild,
SafeNativeMethods
.GW_HWNDNEXT))
1761
NativeMethods.HWND hwndTopLevel =
SafeNativeMethods
.GetAncestor(hChild,
SafeNativeMethods
.GA_ROOT);
1765
SafeNativeMethods
.PhysicalToLogicalPoint(hwndTopLevel, ref pt);
1785
if ((style &
SafeNativeMethods
.WS_CHILD) != 0
1786
&& (style &
SafeNativeMethods
.WS_DISABLED) != 0)
1810
if( ( exStyle &
SafeNativeMethods
.WS_EX_LAYERED ) != 0
1811
&& ( exStyle &
SafeNativeMethods
.WS_EX_TRANSPARENT ) != 0 )
1818
if (
SafeNativeMethods
.GetWindowRgn(hChild.h, hrgn) ==
SafeNativeMethods
.COMPLEXREGION)
1821
if (!
SafeNativeMethods
.PtInRegion(hrgn, (int)xLogical - rc.left, (int)yLogical - rc.top))
1911
hwnd =
SafeNativeMethods
.GetAncestor(hwnd,
SafeNativeMethods
.GA_PARENT);
1973
int style = Misc.GetWindowLong(hwnd,
SafeNativeMethods
.GWL_STYLE);
1984
int exstyle = Misc.GetWindowLong(hwnd,
SafeNativeMethods
.GWL_EXSTYLE);
2002
if (IsBitSet(exStyle,
SafeNativeMethods
.WS_EX_MDICHILD))
2004
NativeMethods.HWND parent =
SafeNativeMethods
.GetAncestor(hwnd,
SafeNativeMethods
.GA_PARENT);
2103
SafeNativeMethods
.GUITHREADINFO gti = new
SafeNativeMethods
.GUITHREADINFO();
2119
SafeNativeMethods
.GUITHREADINFO gti = new
SafeNativeMethods
.GUITHREADINFO();
2122
if ((gti.dwFlags &
SafeNativeMethods
.GUI_INMENUMODE) != 0
2123
|| (gti.dwFlags &
SafeNativeMethods
.GUI_SYSTEMMENUMODE) != 0
2124
|| (gti.dwFlags &
SafeNativeMethods
.GUI_POPUPMENUMODE) != 0)
MS\Internal\Automation\MenuTracker.cs (2)
71
if( !
SafeNativeMethods
.IsWindow( nativeHwnd ) )
75
if( !
SafeNativeMethods
.IsWindowVisible( nativeHwnd ) )
MS\Internal\Automation\Misc.cs (7)
308
IntPtr result =
SafeNativeMethods
.CreateRectRgn(left, top, right, bottom);
347
bool result =
SafeNativeMethods
.GetClientRect(hwnd, out rc);
358
internal static bool GetGUIThreadInfo(int idThread, ref
SafeNativeMethods
.GUITHREADINFO guiThreadInfo)
362
bool result =
SafeNativeMethods
.GetGUIThreadInfo(0, ref guiThreadInfo);
395
int result =
SafeNativeMethods
.GetModuleFileNameEx(hProcess, hModule, buffer, length);
477
bool result =
SafeNativeMethods
.GetWindowRect(hwnd, out rc);
490
short result =
SafeNativeMethods
.GlobalAddAtom(lpString);
MS\Internal\Automation\ProxyManager.cs (5)
240
int result =
SafeNativeMethods
.GetClassName(hwnd, str, NativeMethods.MAX_PATH);
254
int result =
SafeNativeMethods
.RealGetWindowClass(hwnd, str, NativeMethods.MAX_PATH);
296
NativeMethods.HWND hwndParent =
SafeNativeMethods
.GetAncestor(hwnd,
SafeNativeMethods
.GA_PARENT);
314
int instance = Misc.GetWindowLong(hwnd,
SafeNativeMethods
.GWL_HINSTANCE);
MS\Internal\Automation\SafeProcessHandle.cs (1)
42
if (
SafeNativeMethods
.GetWindowThreadProcessId(hwnd, out processId) == 0)
MS\Internal\Automation\WindowHideOrCloseTracker.cs (1)
72
if (eventId == NativeMethods.EVENT_OBJECT_HIDE && !
SafeNativeMethods
.IsWindow( nativeHwnd ))
MS\Internal\Automation\WindowInteractionStateTracker.cs (1)
88
if (!
SafeNativeMethods
.IsWindow(nativeHwnd))
MS\Internal\Automation\WindowShowOrOpenTracker.cs (2)
73
if (!
SafeNativeMethods
.IsWindow( nativeHwnd ))
78
if (!
SafeNativeMethods
.IsWindowVisible( nativeHwnd ))
MS\Internal\Automation\WindowVisualStateTracker.cs (1)
85
if (!
SafeNativeMethods
.IsWindow(nativeHwnd))