146 references to SafeNativeMethods
UIAutomationClient (146)
MS\Internal\Automation\BoundingRectTracker.cs (1)
76
if (!
SafeNativeMethods
.IsWindowVisible(NativeMethods.HWND.Cast( hwnd )))
MS\Internal\Automation\ClickablePoint.cs (2)
33
if (
SafeNativeMethods
.MonitorFromRect( ref winRect,
SafeNativeMethods
.MONITOR_DEFAULTTONULL ) == IntPtr.Zero)
MS\Internal\Automation\EventListenerClientSide.cs (1)
64
uint eventTime =
SafeNativeMethods
.GetTickCount();
MS\Internal\Automation\FocusTracker.cs (3)
253
if (hwndCur == IntPtr.Zero || !
SafeNativeMethods
.IsWindow(NativeMethods.HWND.Cast(hwndCur)))
313
SafeNativeMethods
.GUITHREADINFO guiThreadInfo = new
SafeNativeMethods
.GUITHREADINFO();
MS\Internal\Automation\HwndProxyElementProvider.cs (119)
97
int id = Misc.GetWindowLong(_hwnd,
SafeNativeMethods
.GWL_ID);
144
if (
SafeNativeMethods
.GetWindowThreadProcessId(_hwnd, out pid) == 0)
158
SafeNativeMethods
.GUITHREADINFO gti = new
SafeNativeMethods
.GUITHREADINFO ();
165
return (gti.hwndFocus == _hwnd) || (
SafeNativeMethods
.IsChild(_hwnd, gti.hwndFocus));
230
if (IsTopLevelWindow(_hwnd) &&
SafeNativeMethods
.IsIconic(_hwnd))
290
if ( !
SafeNativeMethods
.IsWindow( _hwnd ) )
298
if ( IsBitSet(GetWindowStyle(),
SafeNativeMethods
.WS_DISABLED) )
413
int guiThreadId =
SafeNativeMethods
.GetWindowThreadProcessId(_hwnd, out pid);
491
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
496
return IsBitSet(style,
SafeNativeMethods
.WS_MAXIMIZEBOX);
510
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
515
return IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZEBOX);
523
if (!
SafeNativeMethods
.IsWindow(_hwnd))
533
return IsBitSet(GetWindowStyle(hwndOwner),
SafeNativeMethods
.WS_DISABLED);
545
if ( IsBitSet(style,
SafeNativeMethods
.WS_MAXIMIZE) )
549
else if ( IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZE) )
578
if (
SafeNativeMethods
.IsWindow( _hwnd ) )
592
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
608
return IsBitSet(GetWindowExStyle(),
SafeNativeMethods
.WS_EX_TOPMOST);
628
if ( IsBitSet(extendedStyle,
SafeNativeMethods
.WS_EX_MDICHILD) )
633
NativeMethods.HWND hwndParent =
SafeNativeMethods
.GetAncestor(NativeMethods.HWND.Cast(_hwnd),
SafeNativeMethods
.GA_PARENT);
650
int dx =
SafeNativeMethods
.GetSystemMetrics(
SafeNativeMethods
.SM_CXHSCROLL);
651
int dy =
SafeNativeMethods
.GetSystemMetrics(
SafeNativeMethods
.SM_CYHSCROLL);
711
if ( IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZE) )
770
if ( !
SafeNativeMethods
.IsWindow( _hwnd ) )
782
int x =
SafeNativeMethods
.GetSystemMetrics(
SafeNativeMethods
.SM_CXMAXTRACK);
783
int y =
SafeNativeMethods
.GetSystemMetrics(
SafeNativeMethods
.SM_CYMAXTRACK);
834
if (!
SafeNativeMethods
.IsWindow(_hwnd))
852
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
858
if (IsBitSet(style,
SafeNativeMethods
.WS_SYSMENU))
868
if (IsBitSet(style,
SafeNativeMethods
.WS_MAXIMIZE))
876
if ( IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZE) && !IsBitSet(extendedStyle,
SafeNativeMethods
.WS_EX_MDICHILD) )
881
return IsBitSet(style,
SafeNativeMethods
.WS_BORDER) && IsBitSet(style,
SafeNativeMethods
.WS_DLGFRAME);
897
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
903
if (IsBitSet(style,
SafeNativeMethods
.WS_SYSMENU))
913
if ( IsBitSet(style,
SafeNativeMethods
.WS_MAXIMIZE) || IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZE) )
918
return IsBitSet(style,
SafeNativeMethods
.WS_THICKFRAME);
927
if (!
SafeNativeMethods
.IsWindow(_hwnd))
950
NativeMethods.HWND desktop =
SafeNativeMethods
.GetDesktopWindow();
1022
if (IsBitSet(extendedStyle,
SafeNativeMethods
.WS_EX_APPWINDOW))
1034
bool hasTitleBar = IsBitSet( style,
SafeNativeMethods
.WS_BORDER ) && IsBitSet( style,
SafeNativeMethods
.WS_DLGFRAME );
1040
if (IsBitSet( extendedStyle,
SafeNativeMethods
.WS_EX_TOOLWINDOW ) && !hasTitleBar )
1043
if (IsBitSet(style,
SafeNativeMethods
.WS_POPUP) && !hasTitleBar)
1047
if (!IsTopLevelWindow(hwnd) && !IsBitSet( extendedStyle,
SafeNativeMethods
.WS_EX_MDICHILD ) )
1069
if ( IsBitSet(style,
SafeNativeMethods
.WS_THICKFRAME) )
1073
if ( IsBitSet(style,
SafeNativeMethods
.WS_BORDER) && IsBitSet(style,
SafeNativeMethods
.WS_DLGFRAME) )
1125
private const int ScanPrev =
SafeNativeMethods
.GW_HWNDPREV;
1126
private const int ScanNext =
SafeNativeMethods
.GW_HWNDNEXT;
1170
NativeMethods.HWND desktop =
SafeNativeMethods
.GetDesktopWindow();
1171
NativeMethods.HWND scan = Misc.GetWindow(desktop,
SafeNativeMethods
.GW_CHILD);
1175
scan = Misc.GetWindow(scan,
SafeNativeMethods
.GW_HWNDLAST);
1194
NativeMethods.HWND parent =
SafeNativeMethods
.GetAncestor(_hwnd,
SafeNativeMethods
.GA_PARENT);
1197
if (parent ==
SafeNativeMethods
.GetDesktopWindow())
1229
hwnd = Misc.GetWindow(hwndOwner,
SafeNativeMethods
.GW_CHILD);
1271
NativeMethods.HWND parent =
SafeNativeMethods
.GetAncestor(_hwnd,
SafeNativeMethods
.GA_PARENT);
1296
hwnd = Misc.GetWindow(_hwnd,
SafeNativeMethods
.GW_CHILD);
1318
NativeMethods.HWND hwnd = Misc.GetWindow(_hwnd,
SafeNativeMethods
.GW_CHILD);
1321
hwnd = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_HWNDLAST);
1399
for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_CHILD);
1401
hChild = Misc.GetWindow(hChild,
SafeNativeMethods
.GW_HWNDNEXT))
1431
if( !
SafeNativeMethods
.IsWindowEnabled( hwnd ) )
1434
hwnd =
SafeNativeMethods
.GetAncestor( hwnd,
SafeNativeMethods
.GA_PARENT );
1458
if(!
SafeNativeMethods
.IsWindowVisible(hwnd))
1490
if (
SafeNativeMethods
.DwmGetWindowAttribute(hwnd,
SafeNativeMethods
.DWMWA_CLOAKED, ref dwCloaked, sizeof(int)) == 0)
1503
return
SafeNativeMethods
.GetAncestor( hwnd,
SafeNativeMethods
.GA_PARENT ) ==
SafeNativeMethods
.GetDesktopWindow();
1508
NativeMethods.HWND hwndOwner = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_OWNER);
1569
int thread =
SafeNativeMethods
.GetWindowThreadProcessId(_hwnd, out process);
1575
SafeNativeMethods
.EnumThreadWndProc enumWindows = new
SafeNativeMethods
.EnumThreadWndProc(EnumWindows);
1580
bool noModalWindow =
SafeNativeMethods
.EnumThreadWindows(thread, enumWindows, _hwnd);
1590
if ( IsBitSet(extendedStyle,
SafeNativeMethods
.WS_EX_DLGMODALFRAME) )
1592
NativeMethods.HWND owner = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_OWNER);
1628
SafeNativeMethods
.GUITHREADINFO gui = new
SafeNativeMethods
.GUITHREADINFO();
1634
return (
SafeNativeMethods
.GUI_INMENUMODE == (gui.dwFlags &
SafeNativeMethods
.GUI_INMENUMODE));
1728
for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_CHILD);
1730
hChild = Misc.GetWindow(hChild,
SafeNativeMethods
.GW_HWNDNEXT))
1749
NativeMethods.HWND hwndTopLevel =
SafeNativeMethods
.GetAncestor(hChild,
SafeNativeMethods
.GA_ROOT);
1753
SafeNativeMethods
.PhysicalToLogicalPoint(hwndTopLevel, ref pt);
1773
if ((style &
SafeNativeMethods
.WS_CHILD) != 0
1774
&& (style &
SafeNativeMethods
.WS_DISABLED) != 0)
1798
if( ( exStyle &
SafeNativeMethods
.WS_EX_LAYERED ) != 0
1799
&& ( exStyle &
SafeNativeMethods
.WS_EX_TRANSPARENT ) != 0 )
1806
if (
SafeNativeMethods
.GetWindowRgn(hChild.h, hrgn) ==
SafeNativeMethods
.COMPLEXREGION)
1809
if (!
SafeNativeMethods
.PtInRegion(hrgn, (int)xLogical - rc.left, (int)yLogical - rc.top))
1899
hwnd =
SafeNativeMethods
.GetAncestor(hwnd,
SafeNativeMethods
.GA_PARENT);
1961
int style = Misc.GetWindowLong(hwnd,
SafeNativeMethods
.GWL_STYLE);
1972
int exstyle = Misc.GetWindowLong(hwnd,
SafeNativeMethods
.GWL_EXSTYLE);
1990
if (IsBitSet(exStyle,
SafeNativeMethods
.WS_EX_MDICHILD))
1992
NativeMethods.HWND parent =
SafeNativeMethods
.GetAncestor(hwnd,
SafeNativeMethods
.GA_PARENT);
2088
SafeNativeMethods
.GUITHREADINFO gti = new
SafeNativeMethods
.GUITHREADINFO();
2104
SafeNativeMethods
.GUITHREADINFO gti = new
SafeNativeMethods
.GUITHREADINFO();
2107
if ((gti.dwFlags &
SafeNativeMethods
.GUI_INMENUMODE) != 0
2108
|| (gti.dwFlags &
SafeNativeMethods
.GUI_SYSTEMMENUMODE) != 0
2109
|| (gti.dwFlags &
SafeNativeMethods
.GUI_POPUPMENUMODE) != 0)
MS\Internal\Automation\MenuTracker.cs (2)
60
if( !
SafeNativeMethods
.IsWindow( nativeHwnd ) )
64
if( !
SafeNativeMethods
.IsWindowVisible( nativeHwnd ) )
MS\Internal\Automation\Misc.cs (7)
271
IntPtr result =
SafeNativeMethods
.CreateRectRgn(left, top, right, bottom);
310
bool result =
SafeNativeMethods
.GetClientRect(hwnd, out rc);
321
internal static bool GetGUIThreadInfo(int idThread, ref
SafeNativeMethods
.GUITHREADINFO guiThreadInfo)
325
bool result =
SafeNativeMethods
.GetGUIThreadInfo(0, ref guiThreadInfo);
358
int result =
SafeNativeMethods
.GetModuleFileNameEx(hProcess, hModule, buffer, length);
439
bool result =
SafeNativeMethods
.GetWindowRect(hwnd, out rc);
452
short result =
SafeNativeMethods
.GlobalAddAtom(lpString);
MS\Internal\Automation\ProxyManager.cs (5)
223
int result =
SafeNativeMethods
.GetClassName(hwnd, str, NativeMethods.MAX_PATH);
237
int result =
SafeNativeMethods
.RealGetWindowClass(hwnd, str, NativeMethods.MAX_PATH);
279
NativeMethods.HWND hwndParent =
SafeNativeMethods
.GetAncestor(hwnd,
SafeNativeMethods
.GA_PARENT);
297
int instance = Misc.GetWindowLong(hwnd,
SafeNativeMethods
.GWL_HINSTANCE);
MS\Internal\Automation\SafeProcessHandle.cs (1)
23
if (
SafeNativeMethods
.GetWindowThreadProcessId(hwnd, out processId) == 0)
MS\Internal\Automation\WindowHideOrCloseTracker.cs (1)
62
if (eventId == NativeMethods.EVENT_OBJECT_HIDE && !
SafeNativeMethods
.IsWindow( nativeHwnd ))
MS\Internal\Automation\WindowInteractionStateTracker.cs (1)
76
if (!
SafeNativeMethods
.IsWindow(nativeHwnd))
MS\Internal\Automation\WindowShowOrOpenTracker.cs (2)
61
if (!
SafeNativeMethods
.IsWindow( nativeHwnd ))
66
if (!
SafeNativeMethods
.IsWindowVisible( nativeHwnd ))
MS\Internal\Automation\WindowVisualStateTracker.cs (1)
76
if (!
SafeNativeMethods
.IsWindow(nativeHwnd))