MS\Internal\Automation\HwndProxyElementProvider.cs (62)
114int id = Misc.GetWindowLong(_hwnd, SafeNativeMethods.GWL_ID);
133IntPtr len = Misc.SendMessageTimeout( _hwnd, UnsafeNativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero );
143if (Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETTEXT, new IntPtr(ilen + 1), str) == IntPtr.Zero)
149return Misc.StripMnemonic(str.ToString());
179if (!Misc.GetGUIThreadInfo(0, ref gti))
188return Misc.IsWindowsFormsControl(ProxyManager.GetClassName(_hwnd)) ? "WinForm" : "Win32";
254if (!Misc.GetWindowRect(_hwnd, out rcW32))
331if (!Misc.GetWindowPlacement(_hwnd, ref wp))
340if (!Misc.SetWindowPlacement(_hwnd, ref wp))
361if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_MINIMIZE, IntPtr.Zero))
382if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_MAXIMIZE, IntPtr.Zero))
404if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_CLOSE, IntPtr.Zero))
667if (!Misc.GetWindowRect(_hwnd, out currentRect))
691if (!Misc.GetClientRect(hwndParent, out parentRect))
713if (!Misc.SetWindowPos(_hwnd, NativeMethods.HWND.NULL, (int)x, (int)y, 0, 0, UnsafeNativeMethods.SWP_NOSIZE | UnsafeNativeMethods.SWP_NOZORDER | UnsafeNativeMethods.SWP_NOACTIVATE))
723if (!Misc.GetWindowPlacement(_hwnd, ref wp))
743if (!Misc.SetWindowPlacement(_hwnd, ref wp))
752if (!Misc.GetWindowRect(_hwnd, out currentRect))
760if (!Misc.SetWindowPlacement(_hwnd, ref wp))
770if (!Misc.GetWindowPlacement(_hwnd, ref wp))
783if (!Misc.SetWindowPlacement(_hwnd, ref wp))
817Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETMINMAXINFO, IntPtr.Zero, ref minMaxInfo);
835if (!Misc.GetWindowPlacement(_hwnd, ref wp))
847if (!Misc.SetWindowPlacement(_hwnd, ref wp))
993bool result = Misc.GetMenuBarInfo(hwnd, idObject, idItem, ref mbi);
1161hwnd = Misc.GetWindow( hwnd, dir );
1164for( ; hwnd != NativeMethods.HWND.NULL ; hwnd = Misc.GetWindow( hwnd, dir ) )
1192NativeMethods.HWND scan = Misc.GetWindow(desktop, SafeNativeMethods.GW_CHILD);
1196scan = Misc.GetWindow(scan, SafeNativeMethods.GW_HWNDLAST);
1250hwnd = Misc.GetWindow(hwndOwner, SafeNativeMethods.GW_CHILD);
1317hwnd = Misc.GetWindow(_hwnd, SafeNativeMethods.GW_CHILD);
1339NativeMethods.HWND hwnd = Misc.GetWindow(_hwnd, SafeNativeMethods.GW_CHILD);
1342hwnd = Misc.GetWindow(hwnd, SafeNativeMethods.GW_HWNDLAST);
1420for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD);
1422hChild = Misc.GetWindow(hChild, SafeNativeMethods.GW_HWNDNEXT))
1475if (!Misc.GetWindowRect(hwnd, out rcW32))
1518NativeMethods.HWND hwndOwner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER);
1604NativeMethods.HWND owner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER);
1642if (!Misc.GetGUIThreadInfo(0, ref gui))
1731IntPtr hrgn = Misc.CreateRectRgn(0, 0, 0, 0); // NOTE: Must be deleted before returning
1740for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD);
1742hChild = Misc.GetWindow(hChild, SafeNativeMethods.GW_HWNDNEXT))
1750if (!Misc.GetWindowRect(hChild, out rc))
1828IntPtr lr = Misc.SendMessageTimeout( hChild, UnsafeNativeMethods.WM_NCHITTEST, IntPtr.Zero, MAKELPARAM( (int)x, (int)y ) );
1844if (!Misc.GetWindowRect(hChild, out rcBest))
1854if (!Misc.GetWindowRect(hChild, out rcChild))
1873if (!Misc.GetClientRect(hChild, out rcClient) ||
1880Misc.DeleteObject(hrgn); // finished with region
1884Misc.DeleteObject(hrgn); // finished with region
1931Misc.ThrowWin32ExceptionsIfError(lastWin32Error);
1956Misc.ThrowWin32ExceptionsIfError(lastWin32Error);
1973int style = Misc.GetWindowLong(hwnd, SafeNativeMethods.GWL_STYLE);
1984int exstyle = Misc.GetWindowLong(hwnd, SafeNativeMethods.GWL_EXSTYLE);
2009IntPtr lresult = Misc.SendMessageTimeout(parent, UnsafeNativeMethods.WM_MDIACTIVATE, (IntPtr)hwnd, IntPtr.Zero);
2016short atom = Misc.GlobalAddAtom("FocusHotKey");
2026if( Misc.RegisterHotKey( NativeMethods.HWND.NULL, atom, 0, vk ) )
2064int result = Misc.MsgWaitForMultipleObjects(null, false, 2000, UnsafeNativeMethods.QS_ALLINPUT);
2069if (Misc.GetMessage(ref msg, NativeMethods.HWND.NULL, 0, 0) == 0)
2091Misc.UnregisterHotKey(NativeMethods.HWND.NULL, atom);
2093Misc.GlobalDeleteAtom(atom);
2105if (!Misc.GetGUIThreadInfo(0, ref gti))
2120if (Misc.GetGUIThreadInfo(0, ref gti))
System\Windows\Automation\Automation.cs (27)
90return Misc.Compare(el1, el2);
108return Misc.Compare(runtimeId1, runtimeId2);
120Misc.ValidateArgumentNonNull(property, "property");
134Misc.ValidateArgumentNonNull(pattern, "pattern");
162Misc.ValidateArgumentNonNull(element, "element" );
163Misc.ValidateArgumentNonNull(eventHandler, "eventHandler" );
164Misc.ValidateArgument( eventId != AutomationElement.AutomationFocusChangedEvent, SRID.EventIdMustNotBeAutomationFocusChanged );
165Misc.ValidateArgument( eventId != AutomationElement.StructureChangedEvent,SRID.EventIdMustNotBeStructureChanged );
166Misc.ValidateArgument( eventId != AutomationElement.AutomationPropertyChangedEvent, SRID.EventIdMustNotBeAutomationPropertyChanged );
177if ( Misc.Compare( element, AutomationElement.RootElement ) )
238Misc.ValidateArgumentNonNull(element, "element" );
239Misc.ValidateArgumentNonNull(eventHandler, "eventHandler" );
240Misc.ValidateArgument( eventId != AutomationElement.AutomationFocusChangedEvent, SRID.EventIdMustNotBeAutomationFocusChanged );
241Misc.ValidateArgument( eventId != AutomationElement.StructureChangedEvent, SRID.EventIdMustNotBeStructureChanged );
242Misc.ValidateArgument( eventId != AutomationElement.AutomationPropertyChangedEvent, SRID.EventIdMustNotBeAutomationPropertyChanged );
269Misc.ValidateArgumentNonNull(element, "element" );
270Misc.ValidateArgumentNonNull(eventHandler, "eventHandler" );
271Misc.ValidateArgumentNonNull(properties, "properties" );
282Misc.ValidateArgumentNonNull(property, "properties" );
305Misc.ValidateArgumentNonNull(element, "element" );
306Misc.ValidateArgumentNonNull(eventHandler, "eventHandler" );
327Misc.ValidateArgumentNonNull(element, "element");
328Misc.ValidateArgumentNonNull(eventHandler, "eventHandler");
348Misc.ValidateArgumentNonNull(element, "element");
349Misc.ValidateArgumentNonNull(eventHandler, "eventHandler");
369Misc.ValidateArgumentNonNull(eventHandler, "eventHandler" );
392Misc.ValidateArgumentNonNull(eventHandler, "eventHandler" );
System\Windows\Automation\AutomationElement.cs (16)
313return Misc.Compare(this, el);
442Misc.ValidateArgument(hwnd != IntPtr.Zero, SRID.HwndMustBeNonNULL);
470Misc.ValidateArgumentNonNull(localImpl, "localImpl");
523Misc.ValidateArgumentNonNull(property, "property");
616Misc.ValidateArgumentNonNull(pattern, "pattern");
627if (Misc.IsCriticalException(e))
638patternObject = Misc.WrapInterfaceOnClientSide(this, hpatternobj, pattern);
693Misc.ValidateArgumentNonNull(property, "property");
755Misc.ValidateArgumentNonNull(pattern, "pattern");
789Misc.ValidateArgumentNonNull(request, "request");
809Misc.ValidateArgumentNonNull(condition, "condition");
832Misc.ValidateArgumentNonNull(condition, "condition");
883return (AutomationProperty[])Misc.RemoveDuplicates(Misc.CombineArrays(propArrays, typeof(AutomationProperty)), typeof(AutomationProperty));
1362val = Misc.WrapInterfaceOnClientSide(this, hpatternobj, automationPattern);
1386Misc.ValidateArgumentNonNull(condition, "condition");
System\Windows\Automation\TreeWalker.cs (19)
46Misc.ValidateArgumentNonNull(condition, "condition");
98Misc.ValidateArgumentNonNull(element, "element");
113Misc.ValidateArgumentNonNull(element, "element");
128Misc.ValidateArgumentNonNull(element, "element");
143Misc.ValidateArgumentNonNull(element, "element");
158Misc.ValidateArgumentNonNull(element, "element");
183Misc.ValidateArgumentNonNull(element, "element");
201Misc.ValidateArgumentNonNull(element, "element");
202Misc.ValidateArgumentNonNull(request, "request");
219Misc.ValidateArgumentNonNull(element, "element");
220Misc.ValidateArgumentNonNull(request, "request");
237Misc.ValidateArgumentNonNull(element, "element");
238Misc.ValidateArgumentNonNull(request, "request");
255Misc.ValidateArgumentNonNull(element, "element");
256Misc.ValidateArgumentNonNull(request, "request");
273Misc.ValidateArgumentNonNull(element, "element");
274Misc.ValidateArgumentNonNull(request, "request");
301Misc.ValidateArgumentNonNull(element, "element");
302Misc.ValidateArgumentNonNull(request, "request");