146 references to SafeNativeMethods
UIAutomationClient (146)
MS\Internal\Automation\BoundingRectTracker.cs (1)
77
if (!
SafeNativeMethods
.IsWindowVisible(NativeMethods.HWND.Cast( hwnd )))
MS\Internal\Automation\ClickablePoint.cs (2)
34
if (
SafeNativeMethods
.MonitorFromRect( ref winRect,
SafeNativeMethods
.MONITOR_DEFAULTTONULL ) == IntPtr.Zero)
MS\Internal\Automation\EventListenerClientSide.cs (1)
65
uint eventTime =
SafeNativeMethods
.GetTickCount();
MS\Internal\Automation\FocusTracker.cs (3)
254
if (hwndCur == IntPtr.Zero || !
SafeNativeMethods
.IsWindow(NativeMethods.HWND.Cast(hwndCur)))
314
SafeNativeMethods
.GUITHREADINFO guiThreadInfo = new
SafeNativeMethods
.GUITHREADINFO();
MS\Internal\Automation\HwndProxyElementProvider.cs (119)
98
int id = Misc.GetWindowLong(_hwnd,
SafeNativeMethods
.GWL_ID);
145
if (
SafeNativeMethods
.GetWindowThreadProcessId(_hwnd, out pid) == 0)
159
SafeNativeMethods
.GUITHREADINFO gti = new
SafeNativeMethods
.GUITHREADINFO ();
166
return (gti.hwndFocus == _hwnd) || (
SafeNativeMethods
.IsChild(_hwnd, gti.hwndFocus));
231
if (IsTopLevelWindow(_hwnd) &&
SafeNativeMethods
.IsIconic(_hwnd))
291
if ( !
SafeNativeMethods
.IsWindow( _hwnd ) )
299
if ( IsBitSet(GetWindowStyle(),
SafeNativeMethods
.WS_DISABLED) )
414
int guiThreadId =
SafeNativeMethods
.GetWindowThreadProcessId(_hwnd, out pid);
492
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
497
return IsBitSet(style,
SafeNativeMethods
.WS_MAXIMIZEBOX);
511
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
516
return IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZEBOX);
524
if (!
SafeNativeMethods
.IsWindow(_hwnd))
534
return IsBitSet(GetWindowStyle(hwndOwner),
SafeNativeMethods
.WS_DISABLED);
546
if ( IsBitSet(style,
SafeNativeMethods
.WS_MAXIMIZE) )
550
else if ( IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZE) )
579
if (
SafeNativeMethods
.IsWindow( _hwnd ) )
593
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
609
return IsBitSet(GetWindowExStyle(),
SafeNativeMethods
.WS_EX_TOPMOST);
629
if ( IsBitSet(extendedStyle,
SafeNativeMethods
.WS_EX_MDICHILD) )
634
NativeMethods.HWND hwndParent =
SafeNativeMethods
.GetAncestor(NativeMethods.HWND.Cast(_hwnd),
SafeNativeMethods
.GA_PARENT);
651
int dx =
SafeNativeMethods
.GetSystemMetrics(
SafeNativeMethods
.SM_CXHSCROLL);
652
int dy =
SafeNativeMethods
.GetSystemMetrics(
SafeNativeMethods
.SM_CYHSCROLL);
712
if ( IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZE) )
771
if ( !
SafeNativeMethods
.IsWindow( _hwnd ) )
783
int x =
SafeNativeMethods
.GetSystemMetrics(
SafeNativeMethods
.SM_CXMAXTRACK);
784
int y =
SafeNativeMethods
.GetSystemMetrics(
SafeNativeMethods
.SM_CYMAXTRACK);
835
if (!
SafeNativeMethods
.IsWindow(_hwnd))
853
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
859
if (IsBitSet(style,
SafeNativeMethods
.WS_SYSMENU))
869
if (IsBitSet(style,
SafeNativeMethods
.WS_MAXIMIZE))
877
if ( IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZE) && !IsBitSet(extendedStyle,
SafeNativeMethods
.WS_EX_MDICHILD) )
882
return IsBitSet(style,
SafeNativeMethods
.WS_BORDER) && IsBitSet(style,
SafeNativeMethods
.WS_DLGFRAME);
898
if (IsBitSet(style,
SafeNativeMethods
.WS_DISABLED))
904
if (IsBitSet(style,
SafeNativeMethods
.WS_SYSMENU))
914
if ( IsBitSet(style,
SafeNativeMethods
.WS_MAXIMIZE) || IsBitSet(style,
SafeNativeMethods
.WS_MINIMIZE) )
919
return IsBitSet(style,
SafeNativeMethods
.WS_THICKFRAME);
928
if (!
SafeNativeMethods
.IsWindow(_hwnd))
951
NativeMethods.HWND desktop =
SafeNativeMethods
.GetDesktopWindow();
1023
if (IsBitSet(extendedStyle,
SafeNativeMethods
.WS_EX_APPWINDOW))
1035
bool hasTitleBar = IsBitSet( style,
SafeNativeMethods
.WS_BORDER ) && IsBitSet( style,
SafeNativeMethods
.WS_DLGFRAME );
1041
if (IsBitSet( extendedStyle,
SafeNativeMethods
.WS_EX_TOOLWINDOW ) && !hasTitleBar )
1044
if (IsBitSet(style,
SafeNativeMethods
.WS_POPUP) && !hasTitleBar)
1048
if (!IsTopLevelWindow(hwnd) && !IsBitSet( extendedStyle,
SafeNativeMethods
.WS_EX_MDICHILD ) )
1070
if ( IsBitSet(style,
SafeNativeMethods
.WS_THICKFRAME) )
1074
if ( IsBitSet(style,
SafeNativeMethods
.WS_BORDER) && IsBitSet(style,
SafeNativeMethods
.WS_DLGFRAME) )
1126
private const int ScanPrev =
SafeNativeMethods
.GW_HWNDPREV;
1127
private const int ScanNext =
SafeNativeMethods
.GW_HWNDNEXT;
1171
NativeMethods.HWND desktop =
SafeNativeMethods
.GetDesktopWindow();
1172
NativeMethods.HWND scan = Misc.GetWindow(desktop,
SafeNativeMethods
.GW_CHILD);
1176
scan = Misc.GetWindow(scan,
SafeNativeMethods
.GW_HWNDLAST);
1195
NativeMethods.HWND parent =
SafeNativeMethods
.GetAncestor(_hwnd,
SafeNativeMethods
.GA_PARENT);
1198
if (parent ==
SafeNativeMethods
.GetDesktopWindow())
1230
hwnd = Misc.GetWindow(hwndOwner,
SafeNativeMethods
.GW_CHILD);
1272
NativeMethods.HWND parent =
SafeNativeMethods
.GetAncestor(_hwnd,
SafeNativeMethods
.GA_PARENT);
1297
hwnd = Misc.GetWindow(_hwnd,
SafeNativeMethods
.GW_CHILD);
1319
NativeMethods.HWND hwnd = Misc.GetWindow(_hwnd,
SafeNativeMethods
.GW_CHILD);
1322
hwnd = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_HWNDLAST);
1400
for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_CHILD);
1402
hChild = Misc.GetWindow(hChild,
SafeNativeMethods
.GW_HWNDNEXT))
1432
if( !
SafeNativeMethods
.IsWindowEnabled( hwnd ) )
1435
hwnd =
SafeNativeMethods
.GetAncestor( hwnd,
SafeNativeMethods
.GA_PARENT );
1459
if(!
SafeNativeMethods
.IsWindowVisible(hwnd))
1491
if (
SafeNativeMethods
.DwmGetWindowAttribute(hwnd,
SafeNativeMethods
.DWMWA_CLOAKED, ref dwCloaked, sizeof(int)) == 0)
1504
return
SafeNativeMethods
.GetAncestor( hwnd,
SafeNativeMethods
.GA_PARENT ) ==
SafeNativeMethods
.GetDesktopWindow();
1509
NativeMethods.HWND hwndOwner = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_OWNER);
1570
int thread =
SafeNativeMethods
.GetWindowThreadProcessId(_hwnd, out process);
1576
SafeNativeMethods
.EnumThreadWndProc enumWindows = new
SafeNativeMethods
.EnumThreadWndProc(EnumWindows);
1581
bool noModalWindow =
SafeNativeMethods
.EnumThreadWindows(thread, enumWindows, _hwnd);
1591
if ( IsBitSet(extendedStyle,
SafeNativeMethods
.WS_EX_DLGMODALFRAME) )
1593
NativeMethods.HWND owner = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_OWNER);
1629
SafeNativeMethods
.GUITHREADINFO gui = new
SafeNativeMethods
.GUITHREADINFO();
1635
return (
SafeNativeMethods
.GUI_INMENUMODE == (gui.dwFlags &
SafeNativeMethods
.GUI_INMENUMODE));
1729
for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd,
SafeNativeMethods
.GW_CHILD);
1731
hChild = Misc.GetWindow(hChild,
SafeNativeMethods
.GW_HWNDNEXT))
1750
NativeMethods.HWND hwndTopLevel =
SafeNativeMethods
.GetAncestor(hChild,
SafeNativeMethods
.GA_ROOT);
1754
SafeNativeMethods
.PhysicalToLogicalPoint(hwndTopLevel, ref pt);
1774
if ((style &
SafeNativeMethods
.WS_CHILD) != 0
1775
&& (style &
SafeNativeMethods
.WS_DISABLED) != 0)
1799
if( ( exStyle &
SafeNativeMethods
.WS_EX_LAYERED ) != 0
1800
&& ( exStyle &
SafeNativeMethods
.WS_EX_TRANSPARENT ) != 0 )
1807
if (
SafeNativeMethods
.GetWindowRgn(hChild.h, hrgn) ==
SafeNativeMethods
.COMPLEXREGION)
1810
if (!
SafeNativeMethods
.PtInRegion(hrgn, (int)xLogical - rc.left, (int)yLogical - rc.top))
1900
hwnd =
SafeNativeMethods
.GetAncestor(hwnd,
SafeNativeMethods
.GA_PARENT);
1962
int style = Misc.GetWindowLong(hwnd,
SafeNativeMethods
.GWL_STYLE);
1973
int exstyle = Misc.GetWindowLong(hwnd,
SafeNativeMethods
.GWL_EXSTYLE);
1991
if (IsBitSet(exStyle,
SafeNativeMethods
.WS_EX_MDICHILD))
1993
NativeMethods.HWND parent =
SafeNativeMethods
.GetAncestor(hwnd,
SafeNativeMethods
.GA_PARENT);
2089
SafeNativeMethods
.GUITHREADINFO gti = new
SafeNativeMethods
.GUITHREADINFO();
2105
SafeNativeMethods
.GUITHREADINFO gti = new
SafeNativeMethods
.GUITHREADINFO();
2108
if ((gti.dwFlags &
SafeNativeMethods
.GUI_INMENUMODE) != 0
2109
|| (gti.dwFlags &
SafeNativeMethods
.GUI_SYSTEMMENUMODE) != 0
2110
|| (gti.dwFlags &
SafeNativeMethods
.GUI_POPUPMENUMODE) != 0)
MS\Internal\Automation\MenuTracker.cs (2)
61
if( !
SafeNativeMethods
.IsWindow( nativeHwnd ) )
65
if( !
SafeNativeMethods
.IsWindowVisible( nativeHwnd ) )
MS\Internal\Automation\Misc.cs (7)
272
IntPtr result =
SafeNativeMethods
.CreateRectRgn(left, top, right, bottom);
311
bool result =
SafeNativeMethods
.GetClientRect(hwnd, out rc);
322
internal static bool GetGUIThreadInfo(int idThread, ref
SafeNativeMethods
.GUITHREADINFO guiThreadInfo)
326
bool result =
SafeNativeMethods
.GetGUIThreadInfo(0, ref guiThreadInfo);
359
int result =
SafeNativeMethods
.GetModuleFileNameEx(hProcess, hModule, buffer, length);
440
bool result =
SafeNativeMethods
.GetWindowRect(hwnd, out rc);
453
short result =
SafeNativeMethods
.GlobalAddAtom(lpString);
MS\Internal\Automation\ProxyManager.cs (5)
224
int result =
SafeNativeMethods
.GetClassName(hwnd, str, NativeMethods.MAX_PATH);
238
int result =
SafeNativeMethods
.RealGetWindowClass(hwnd, str, NativeMethods.MAX_PATH);
280
NativeMethods.HWND hwndParent =
SafeNativeMethods
.GetAncestor(hwnd,
SafeNativeMethods
.GA_PARENT);
298
int instance = Misc.GetWindowLong(hwnd,
SafeNativeMethods
.GWL_HINSTANCE);
MS\Internal\Automation\SafeProcessHandle.cs (1)
24
if (
SafeNativeMethods
.GetWindowThreadProcessId(hwnd, out processId) == 0)
MS\Internal\Automation\WindowHideOrCloseTracker.cs (1)
63
if (eventId == NativeMethods.EVENT_OBJECT_HIDE && !
SafeNativeMethods
.IsWindow( nativeHwnd ))
MS\Internal\Automation\WindowInteractionStateTracker.cs (1)
77
if (!
SafeNativeMethods
.IsWindow(nativeHwnd))
MS\Internal\Automation\WindowShowOrOpenTracker.cs (2)
62
if (!
SafeNativeMethods
.IsWindow( nativeHwnd ))
67
if (!
SafeNativeMethods
.IsWindowVisible( nativeHwnd ))
MS\Internal\Automation\WindowVisualStateTracker.cs (1)
77
if (!
SafeNativeMethods
.IsWindow(nativeHwnd))