830 references to Misc
UIAutomationClientsideProviders (830)
MS\Internal\AutomationProxies\Accessible.cs (5)
177IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject)); 727return Misc.IsBitSet((int)state, (int)testState); 1161if (Misc.IsCriticalException(e) && ! (e is NullReferenceException)) 1337if (Misc.IsCriticalException(e) && ! (e is NullReferenceException)) 1372if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\ClickablePoint.cs (9)
24_hwndProgman = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null); 64for (hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT)) 78hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDPREV); 88if (Misc.IsBitSet(Misc.GetWindowStyle(hwndCurrent), NativeMethods.WS_POPUP)) 95hwnd = Misc.GetParent(hwndCurrent); 245if (!Misc.GetWindowRect(hwnd, ref rc)) 263int lr = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (6)
54SetHandle(Misc.VirtualAllocEx(_processHandle, IntPtr.Zero, new UIntPtr((uint)cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE)); 70return Misc.VirtualFreeEx(_processHandle, handle, UIntPtr.Zero, UnsafeNativeMethods.MEM_RELEASE); 94Misc.WriteProcessMemory(_processHandle, handle, sourceAddress, cbSize, out count); 100Misc.ReadProcessMemory(_processHandle, remoteAddress, destAddress, cbSize, out count); 106Misc.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count); 111Misc.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count);
MS\Internal\AutomationProxies\CommonXSendMessage.cs (14)
115IntPtr result = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 204if (Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address) == IntPtr.Zero) 245IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 292IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam)); 348IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem1.Address, rmem2.Address); 389int res = Misc.ProxySendMessageInt(hwnd, uMsg, wParam, rmem.Address); 992if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref clientPoint, 1)) 1196if (Misc.ProxySendMessageInt(hwnd, msg, new IntPtr(index), remoteMem.Address) != 0) 1199Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2); 1265if (Misc.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero) 1375if (Misc.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1423if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1471if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1502if (!Misc.IsWow64Process(hProcess, out isWOW64Process))
MS\Internal\AutomationProxies\EventManager.cs (3)
462int style = Misc.GetWindowStyle(hwnd); 465if (Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZE)) 469else if (Misc.IsBitSet(style, NativeMethods.WS_MINIMIZE))
MS\Internal\AutomationProxies\Input.cs (1)
173Misc.SendInput(1, ref ki, Marshal.SizeOf(ki));
MS\Internal\AutomationProxies\Misc.cs (10)
392IntPtr hwndParent = Misc.GetParent(hwnd); 407int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero); 1243if (!Misc.ProxyGetTitleBarInfo(hwnd, out ti) || ti.rcTitleBar.IsEmpty) 1253if(Misc.IsControlRTL(hwnd)) 1889int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 1942tool.hwnd = Misc.GetParent(lParam.hwnd); 2007if (!Misc.ProxyGetTitleBarInfo(hwnd, out tiDL)) 2031if (Misc.IsLayoutRTL(hwnd)) 2039leftEdge = (int)(Misc.GetTitleBarRect(hwnd).Left); 2078if (!Misc.ProxyGetTitleBarInfoEx(hwnd, out ti))
MS\Internal\AutomationProxies\MSAANativeProvider.cs (10)
171int index = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 377string className = Misc.GetClassName(_hwnd); 481Misc.SetFocus(_hwnd); 645Misc.SetFocus(_hwnd); 659Misc.SetFocus(_hwnd); 673Misc.SetFocus(_hwnd); 948Misc.GetWindowThreadProcessId(_hwnd, out pid); 1092string className = Misc.GetClassName(hwnd); 1232Misc.SetFocus(_hwnd); 1240if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\MSAAWinEventWrap.cs (4)
88_hHooks[0] = Misc.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc, 0, 0, _fFlags); 108Misc.UnhookWinEvent(_hHooks[i]); 150if (Misc.IsCriticalException(e)) 167if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\NonClientArea.cs (14)
116System.Diagnostics.Debug.Assert(idChild == 0, string.Format(CultureInfo.CurrentCulture, "Invalid Child Id, idChild == {2}\n\rClassName: \"{0}\"\n\rhwnd = 0x{1:x8}", Misc.ProxyGetClassName(hwnd), hwnd.ToInt32(), idChild)); 125Misc.GetClientRectInScreenCoordinates(hwnd, ref clientRect) 126&& Misc.GetWindowRect(hwnd, ref windowRect) 216int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 472if (Misc.ProxyGetClassName(_hwnd) == "SysListView32") 484if (Misc.ProxyGetClassName(_hwnd) == "SysListView32") 509if (Misc.IsBitSet(style, NativeMethods.WS_VSCROLL) && Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) 531if (!Misc.IsBitSet(style, NativeMethods.WS_CHILD)) 586if (Misc.IsLayoutRTL(_hwnd)) 662if (Misc.GetClassName(hwnd) == "ComboLBox") 731if (Misc.GetClassName(hwnd) == "ComboLBox") 748int style = Misc.GetWindowStyle(hwnd); 749if (Misc.IsBitSet(style, NativeMethods.WS_CHILD))
MS\Internal\AutomationProxies\ProxyFragment.cs (1)
228if (fragment == fromPoint || Misc.Compare(fragment, fromPoint))
MS\Internal\AutomationProxies\ProxyHwnd.cs (15)
203IntPtr label = Misc.GetLabelhwnd(_hwnd); 204name = Misc.GetControlName(label, true); 212name = Misc.ProxyGetText(_hwnd); 237_controlLabel = Misc.GetLabelhwnd(_hwnd); 255IntPtr hwndParent = Misc.GetParent(_hwnd); 262if (Misc.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty) 266if (!itemRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 282int idChild = Misc.GetWindowId(_hwnd); 283string text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, idChild); 286text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, 0); 495if (!Misc.GetClientRect(hwnd, ref rc)) 500if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 522IntPtr label = Misc.GetLabelhwnd(hwnd); 525string labelText = Misc.ProxyGetText(label); 528accessKey = Misc.AccessKey(labelText);
MS\Internal\AutomationProxies\ProxySimple.cs (14)
114if (!Misc.GetWindowRect(_hwnd, ref controlRectangle)) 145return Misc.AppendToRuntimeId(GetParent().GetRuntimeId(), _item); 221return Misc.IsEnabled(_hwnd); 232Misc.GetWindowThreadProcessId(_hwnd, out pid); 254return Misc.GetFocusedWindow() == _hwnd ? IsFocused() : false; 285if (Misc.GetFocusedWindow() == _hwnd && IsFocused()) 300if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_TABSTOP)) 339if (!parentRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 357string sRawName = Misc.GetControlName(_hwnd, false); 359return string.IsNullOrEmpty(sRawName) ? null : Misc.AccessKey(sRawName); 596Misc.GetClientRectInScreenCoordinates(_hwnd, ref rcOutside); 598if (!Misc.IntersectRect(ref rcItem, ref rcOutside, ref rcItem)) 681return Misc.GetWindowStyle(_hwnd); 690return Misc.GetWindowExStyle(_hwnd);
MS\Internal\AutomationProxies\QueueProcessor.cs (3)
116Misc.DispatchMessage(ref msg); 132int result = Misc.MsgWaitForMultipleObjects(handle, false, NativeMethods.INFINITE, NativeMethods.QS_ALLINPUT); 141if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\SafeProcessHandle.cs (3)
42Misc.GetWindowThreadProcessId(hwnd, out processId); 46SetHandle(Misc.OpenProcess(NativeMethods.PROCESS_QUERY_INFORMATION | NativeMethods.PROCESS_VM_OPERATION | NativeMethods.PROCESS_VM_READ | NativeMethods.PROCESS_VM_WRITE, false, processId, hwnd)); 62return Misc.CloseHandle(handle);
MS\Internal\AutomationProxies\WindowsAltTab.cs (6)
146if (Misc.MapWindowPoints(System.IntPtr.Zero, _hwnd, ref pt, 1)) 150if(Misc.GetClientRect(_hwnd, ref clientRect)) 152if (Misc.PtInRect(ref clientRect, pt.x, pt.y)) 269Misc.ThrowWin32ExceptionsIfError(lastWin32Error); 361return GetBoundingRect().ToRect(Misc.IsControlRTL(_hwnd)); 406if(!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (30)
121style = Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK; 207int state = Misc.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero); 208if (Misc.IsBitSet(state, NativeMethods.BST_PUSHED) 274return Misc.AccessKey(Misc.ProxyGetText(_hwnd)); 348new WindowsButton(hwndRadioButton, null, ButtonType.RadioButton, Misc.GetWindowStyle(hwndRadioButton) & NativeMethods.BS_TYPEMASK, accRadioButton) 409IntPtr hwndParent = Misc.GetParent(_hwnd); 420return new WindowsButton(hwndParent, null, ButtonType.GroupBox, Misc.GetWindowStyle(hwndParent) & NativeMethods.BS_TYPEMASK, accParent); 490Misc.SetFocus(_hwnd); 514Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 528Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 535Misc.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true); 557IntPtr hwndShell = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null); 569if (!Misc.GetClassName(_hwnd).Equals("Button")) 577return Misc.InTheShellProcess(_hwnd) && UnsafeNativeMethods.GetProp(_hwnd, "StartButtonTag") == new IntPtr(304); 581IntPtr hwndParent = Misc.GetParent(_hwnd); 584if (Misc.GetClassName(hwndParent).Equals("Shell_TrayWnd")) 595if (!Misc.GetClassName(_hwnd).Equals("Button")) 600IntPtr hwndParent = Misc.GetParent(_hwnd); 603if (Misc.GetClassName(hwndParent).Equals("Desktop More Programs Pane")) 621if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_CHILD)) 623hwndParent = Misc.GetParent(hwndRoot); 627hwndParent = Misc.GetWindow(hwndRoot, NativeMethods.GW_OWNER); 660int state = Misc.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero); 661if (Misc.IsBitSet(state, NativeMethods.BST_CHECKED)) 665else if (Misc.IsBitSet(state, NativeMethods.BST_INDETERMINATE)) 685Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound); 714return Misc.StripMnemonic(Misc.ProxyGetText(_hwnd)); 723Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton);
MS\Internal\AutomationProxies\WindowsComboBox.cs (35)
147if (!Misc.GetWindowRect(cbInfo.hwndList, ref rcList)) 151if (!Misc.UnionRect(out rcCombo, ref rcCombo, ref rcList)) 158return rcCombo.ToRect(Misc.IsControlRTL(_hwnd)); 167if (Misc.GetClassName(_hwnd).Equals("Internet Explorer_TridentCmboBx")) 209return Misc.GetControlName(Misc.GetLabelhwnd(_hwndEx), true); 272if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 274if (Misc.PtInRect(ref cbInfo.rcButton, x, y)) 285if (Misc.GetWindowRect(cbInfo.hwndList, ref rcList) && 286Misc.PtInRect(ref rcList, x, y)) 389Misc.CheckEnabled(_hwnd); 404IntPtr hwndParent = Misc.GetParent(_hwnd); 407int id = Misc.GetWindowId(_hwnd); 410Misc.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam, _hwnd); 457Misc.CheckEnabled(_hwnd); 471Misc.CheckEnabled(_hwnd); 538bool result = Misc.GetComboBoxInfo(hwnd, ref cbInfo); 555cbInfo.hwndItem = Misc.FindWindowEx(hwnd, IntPtr.Zero, "EDIT", null); 558result = Misc.GetWindowRect(cbInfo.hwndItem, ref cbInfo.rcItem); 561result = Misc.MapWindowPoints(_hwndDesktop, hwnd, ref cbInfo.rcItem, 2); 577return Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0; 582IntPtr hwndFocused = Misc.GetFocusedWindow(); 590Misc.SetFocus(hwnd); 592Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 597Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 645return Misc.ProxyGetText(IsComboBoxEx32() ? _hwndEx : _hwnd); 653return (Misc.GetWindowStyle(hwnd) & NativeMethods.CBS_COMBOTYPEMASK); 694return (0 == String.Compare(Misc.GetClassName(hwndEx), ComboboxEx32, StringComparison.OrdinalIgnoreCase)); 713index = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 720int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 727if (Misc.GetClassName(hwnd).Equals("Internet Explorer_TridentCmboBx")) 738return Misc.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len); 782if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && Misc.IsBitSet(NativeMethods.STATE_SYSTEM_PRESSED, cbInfo.stateButton)) 941if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 968Misc.CheckEnabled(_hwnd);
MS\Internal\AutomationProxies\WindowsContainer.cs (11)
41string className = Misc.ProxyGetClassName(hwnd); 145return Misc.IsBitSet(style, NativeMethods.WS_CAPTION) || 146Misc.IsBitSet(style, NativeMethods.WS_POPUP); 151int style = Misc.GetWindowStyle(hwnd); 152int exstyle = Misc.GetWindowExStyle(hwnd); 154return Misc.IsBitSet(style, NativeMethods.DS_CONTROL) && 155Misc.IsBitSet(style, NativeMethods.WS_CHILD) && 156Misc.IsBitSet(exstyle, NativeMethods.WS_EX_CONTROLPARENT); 183string dlgName = Misc.ProxyGetText(hwnd); 190IntPtr hwndParent = Misc.GetParent(hwnd); 196hwndTab = Misc.FindWindowEx(hwndParent, IntPtr.Zero, "SysTabControl32", null);
MS\Internal\AutomationProxies\WindowsEditBox.cs (40)
169hwnd = Misc.GetParent(hwnd)) 304Misc.CheckEnabled(_hwnd); 308if (Misc.IsBitSet(styles, NativeMethods.ES_READONLY)) 314if (Misc.IsBitSet(styles, NativeMethods.ES_NUMBER)) 329int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 337result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 391if (!Misc.MapWindowPoints(IntPtr.Zero, WindowHandle, ref clientLocation, 1)) 400if (!Misc.GetClientRect(WindowHandle, ref clientRect)) 509int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam); 558int style = Misc.GetWindowStyle(hwnd); 561if (Misc.IsBitSet(style, NativeMethods.ES_PASSWORD)) 565else if (Misc.IsBitSet(style, NativeMethods.ES_MULTILINE)) 569else if (Misc.IsBitSet(style, NativeMethods.ES_AUTOHSCROLL)) 581return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 588return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 594IntPtr result = Misc.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero); 611return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero); 620if (Misc.GetObjectW(hfont, cb, ref logfont) != cb) 631Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect); 639Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETSEL, out start, out end); 645return Misc.ProxyGetText(_hwnd, GetTextLength()); 651return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero); 661if (Misc.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty) 737return (!SafeNativeMethods.IsWindowEnabled(WindowHandle) || Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 746return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero); 752int index = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero); 759return 0 != Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical); 767if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_VSCROLL)) 773bool ok = Misc.GetScrollInfo(WindowHandle, NativeMethods.SB_VERT, ref si); 784if (Misc.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty) 806int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero); 867Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end); 875return Misc.ProxyGetText(hwnd); 916IntPtr hdc = Misc.GetDC(_hwnd); 926oldFont = Misc.SelectObject(hdc, hfont); 927return Misc.GetTextExtentPoint32(hdc, text, text.Length, out size); 933Misc.SelectObject(hdc, oldFont); 936Misc.ReleaseDC(_hwnd, hdc); 994string classname = Misc.GetClassName(hwndParent); 1010string classname = Misc.GetClassName(hwndParent);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (15)
93Misc.SetFocus(_provider._hwnd); 267if (!Misc.MapWindowPoints(_provider.WindowHandle, IntPtr.Zero, ref w32point, 1)) 307return Misc.RectArrayToDoubleArray(rectArray); 326Misc.SetFocus(_provider._hwnd); 380Misc.SetFocus(_provider._hwnd); 444Misc.SetFocus(_provider._hwnd); 463Misc.SetFocus(_provider._hwnd); 480Misc.SetFocus(_provider._hwnd); 503Misc.SetFocus(_provider._hwnd); 509if (Misc.IsReadingRTL(_provider._hwnd)) 750if (Misc.IsBitSet(style, NativeMethods.ES_CENTER)) 754else if (Misc.IsBitSet(style, NativeMethods.ES_RIGHT)) 767return Misc.IsBitSet(style, NativeMethods.ES_UPPERCASE) ? CapStyle.AllCap : CapStyle.None; 795IntPtr hdc = Misc.GetDC(IntPtr.Zero); 801Misc.ReleaseDC(IntPtr.Zero, hdc);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (9)
61return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 95return new WindowsButton(hwnd, null, WindowsButton.ButtonType.CheckBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 98return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 101return new WindowsButton(hwnd, null, WindowsButton.ButtonType.PushButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 104return new WindowsButton(hwnd, null, WindowsButton.ButtonType.RadioButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 141return IsWindowsFormsControl(Misc.GetClassName(hwnd)); 165if (XSendMessage.XSend(hwnd, WM_GETCONTROLNAME, new IntPtr(Misc.MaxLengthNameProperty), ref winFormsID, Misc.MaxLengthNameProperty)) 206private static int WM_GETCONTROLNAME = Misc.RegisterWindowMessage("WM_GETCONTROLNAME");
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (3)
116Misc.SetFocus(_hwnd); 143Misc.SetFocus(_hwnd); 148Misc.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsGrip.cs (6)
65if (Misc.GetClientRectInScreenCoordinates(_hwnd, ref client)) 69if (Misc.IsLayoutRTL(_hwnd)) 98if (!Misc.GetClientRectInScreenCoordinates(hwnd, ref client)) 118if (Misc.IsLayoutRTL(hwnd)) 122int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 130int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsHyperlink.cs (7)
126return Misc.StripMnemonic(RemoveHTMLAnchorTag(Misc.ProxyGetText(_hwnd))); 212if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 251if (Misc.IsBitSet(_linkItem.state, NativeMethods.LIS_FOCUSED)) 454if (!Misc.GetWindowRect(_hwnd, ref BoundingRect)) 523Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 524Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (10)
152Misc.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4)); 167return Misc.ProxyGetText(_hwnd, IP_ADDRESS_STRING_LENGTH); 175return !Misc.IsEnabled(_hwnd); 257IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 266hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 274IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 277hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 368return Misc.ProxyGetText(_hwnd); 398Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture))); 493return WindowsIPAddress.Create(Misc.GetParent(_hwnd), 0, 0);
MS\Internal\AutomationProxies\WindowsListBox.cs (36)
78int style = Misc.GetWindowStyle(hwnd); 85if (Misc.IsBitSet(style, NativeMethods.LBS_COMBOBOX)) 303Misc.GetClientRectInScreenCoordinates(_hwnd, ref listboxrect); 304if (Misc.PtInRect(ref listboxrect, x, y)) 306int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top)); 321int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero); 396return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0; 446return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero); 536if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LBS_COMBOBOX)) 577int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero); 618return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 741int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 745if (Misc.GetClassName(_hwnd).Equals("Internet Explorer_TridentLstBox")) 756string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen); 954Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 1000return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 1009SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item)); 1013SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1028return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR; 1053return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item; 1057return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1074Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect); 1075return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty; 1129Misc.MouseClick(pt.x, pt.y); 1143Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item)); 1148Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1158int listBoxStyle = Misc.GetWindowStyle(_hwnd); 1159if (Misc.IsBitSet(listBoxStyle, NativeMethods.LBS_NOTIFY)) 1162int idListBox = Misc.GetWindowId(_hwnd); 1166IntPtr hwndListBoxParent = Misc.GetParent(_hwnd); 1169Misc.ProxySendMessageInt( 1178Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1182int id = Misc.GetWindowId(_hwnd); 1186Misc.ProxySendMessageInt(combo._hwnd, NativeMethods.WM_COMMAND, wParam, _hwnd); 1202return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (42)
426if (Misc.PtInRect(ref rc, x, y)) 901return (Misc.IsBitSet(state, NativeMethods.LVIS_FOCUSED)); 1192return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_REPORT); 1222return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1250return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags)); 1261return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero); 1267return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1)); 1273return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_SCROLL, dx, dy) != 0; 1286return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1296return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0; 1320return Misc.IsBitSet(GetItemState(hwnd, listItem, NativeMethods.LVIS_SELECTED), NativeMethods.LVIS_SELECTED); 1326return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_EDITLABELS); 1360return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1366return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_ONECLICKACTIVATE); 1372return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_SINGLESEL); 1378return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_NOSCROLL); 1386return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0; 1392return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 1398item.cchTextMax = Misc.MaxLengthNameProperty; 1424if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref hitTest.pt, 1)) 1431if (Misc.IsComctrlV6OnOsVerV6orHigher(hwnd)) 1460return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1466return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_CHECKBOXES); 1480return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_AUTOARRANGE); 1486return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_FULLROWSELECT); 1492return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_JUSTIFYCOLUMNS); 1507return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1516IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1518return Misc.GetItemToolTipText(hwnd, hwndToolTip, 0); 1655string className = Misc.GetClassName(Misc.GetParent(_hwnd)); 1679if (!Misc.GetScrollBarInfo(_hwnd, scrollBar, ref scrollBarInfo) || 1695if (!Misc.GetScrollInfo(_hwnd, sbFlag, ref si) || 1795return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_LIST); 1808return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref pt, 1); 1818return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero); 1824return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask)); 1846if (Misc.PtInWindowRect(hwndHeader, x, y))
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (6)
45_isComctrlV6OnOsVerV6orHigher = Misc.IsComctrlV6OnOsVerV6orHigher(hwnd); 109group.cchHeader = Misc.MaxLengthNameProperty; 120group.cchHeader = Misc.MaxLengthNameProperty; 338int groupIndex = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 493if (Misc.IsComctrlV6OnOsVerV6orHigher(hwnd)) 495int groupIndex = (int)Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (6)
253return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 380bool isComctrlV6OnOsVerV6orHigher = Misc.IsComctrlV6OnOsVerV6orHigher(hwnd); 719Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2); 728if (!Misc.GetWindowRect(_hwnd, ref rcLv)) 762if (Misc.IsControlRTL(_hwnd)) 830if (Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_VSCROLL, ref sbi))
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (3)
80Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2); 110group.cchSubsetTitle= Misc.MaxLengthNameProperty; 125Misc.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (12)
56_isComctrlV6OnOsVerV6orHigher = Misc.IsComctrlV6OnOsVerV6orHigher(hwnd); 146if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRectangle, 2)) 351if (!checkboxRectangle.IsEmpty && Misc.PtInRect(ref checkboxRectangle, x, y)) 376int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero); 769Misc.SetFocus(hwnd); 869if (Misc.GetWindowRect(hwndHeader, ref headerRect) 870&& Misc.GetClientRectInScreenCoordinates(_hwnd, ref listViewRect)) 878&& !Misc.IsItemVisible(ref listViewRect, ref itemRect)) 944if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 968Misc.MouseClick(clickPoint.x, clickPoint.y, !WindowsListView.ListViewSingleClickActivate(_hwnd)); 987Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode)); 988Misc.ProxySendMessage(hwnd, NativeMethods.WM_KEYUP, key, keyUpLParam);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (10)
87if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 118return name.Length < Misc.MaxLengthNameProperty ? name : name.Substring(0, Misc.MaxLengthNameProperty); 160if (!Misc.GetWindowRect(hwnd, ref controlRectangle)) 194if(Misc.IsControlRTL(hwnd)) 252Misc.SetFocus(_hwnd); 257if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 260Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 261Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewItemStartMenu.cs (1)
111if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (3)
68if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 90Misc.SetScrollPos(_hwnd, _sbFlag, pos, true); 119if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si))
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (9)
107if (Misc.IsControlRTL(_hwnd)) 122if (Misc.IsControlRTL(_hwnd)) 151if (!Misc.IsItemVisible(ref parentRect, ref itemRect)) 181if (Misc.GetClassName(ancestor) == "Desktop Search Open View") 185ancestor = Misc.GetParent(ancestor); 208return name.Length < Misc.MaxLengthNameProperty ? name : name.Substring(0, Misc.MaxLengthNameProperty); 381if (Misc.IsComctrlV6OnOsVerV6orHigher(_hwnd)) 383int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (78)
227if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 244if (!Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 250hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 306if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE)) 315else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_POPUPMENUMODE)) 321else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 522bool result = Misc.GetMenuBarInfo(hwnd, idObject, idItem, ref mbi); 607if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 630for (IntPtr hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndMenu, WindowsMenu.MenuClassName, null); 632hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndPossibleParent, WindowsMenu.MenuClassName, null)) 658for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 660hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, MenuClassName, null)) 685if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER)) 698int count = Misc.GetMenuItemCount(hmenuPossibleParent); 723return Misc.GetMenuItemCount(_hmenu); 733return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero); 746if (Misc.ProxyGetGUIThreadInfo(0, out gui)) 748return Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE); 829if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd))) 834if (!Misc.ProxyGetTitleBarInfo(_hwnd, out ti)) 896Misc.IsBitSet(mbi.focusFlags, 3)) 914if (Misc.ProxyGetGUIThreadInfo(0, out gui)) 928return (String.Compare(Misc.ProxyGetClassName(hwnd), WindowsMenu.MenuClassName, StringComparison.OrdinalIgnoreCase) == 0); 934int count = Misc.GetMenuItemCount(hmenu); 938if (Misc.IsBitSet(state, NativeMethods.MF_HILITE)) 951hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 1103if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 1275if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd))) 1280if (!Misc.ProxyGetTitleBarInfo(_hwnd, out ti)) 1295if (Misc.GetMenuItemRect(_hwnd, _hmenu, _item, out rc)) 1327menuRawText = Misc.StripMnemonic(menuRawText); 1404if (!Misc.IsEnabled(_hwnd)) 1459if (Misc.InMenuMode()) 1461IntPtr hwndFocus = Misc.GetFocusedWindow(); 1474if (!Misc.InMenuMode() && !MenuMode(true)) 1481if (!Misc.InMenuMode()) 1528while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 1560return Misc.AccessKey(Text); 1668if (Misc.PtInRect(ref rc, x, y)) 1886return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); 1901return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED); 1910if (!Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 1915return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero); 1925if (!Misc.GetMenuItemInfo(hmenu, position, true, ref menuItemInfo)) 1930return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1931Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1932Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)); 1969if (Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 1976if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1977Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1978Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 1998IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 2108for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowsMenu.MenuClassName, null); 2110hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, WindowsMenu.MenuClassName, null)) 2139Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' ')); 2166int childIndex = (returnFirstChild) ? 0 : Misc.GetMenuItemCount(hSubmenu) - 1; 2214int cItems = Misc.GetMenuItemCount(_hmenu); 2217for (item = 0; item < cItems && !Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++) 2261if (Misc.ProxyGetGUIThreadInfo(0, out gui) && _hwnd == gui.hwndActive) 2266if (gui.hwndCapture != IntPtr.Zero && Misc.ProxyGetClassName(gui.hwndCapture) == "ListBox") 2277return Misc.SetFocus(_hwnd); 2287while (Misc.InMenuMode() != fInMenuMode && (dwDelta = SubtractTicks(SafeNativeMethods.GetTickCount(), dwTicks)) < WindowsMenu.TimeOut) 2299if (Misc.InMenuMode() == fSet) 2352while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 2372int c = Misc.GetMenuItemCount(_hmenu); 2383if (Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE)) 2418Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP)) 2577if (Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 2579if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 2580Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 2581Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 2585else if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_OWNERDRAW)) 2617if (!Misc.ReadProcessMemory(hProcess, dwItemData, new IntPtr(&msaaMenuInfo), new IntPtr(readSize), out count)) 2640if (Misc.ReadProcessMemory(hProcess, msaaMenuInfo.pszWText, new IntPtr(text), new IntPtr(readSize), out count)) 2671return !(Misc.IsBitSet(state, NativeMethods.MF_DISABLED) | Misc.IsBitSet(state, NativeMethods.MF_GRAYED)); 2695if (nextItem < Misc.GetMenuItemCount(_hmenu)) 2752menuRawText = Misc.StripMnemonic(Text);
MS\Internal\AutomationProxies\WindowsProgressbar.cs (3)
171int cur = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 172int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero); 173int max = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (10)
142if (!Misc.GetWindowRect(_hwnd, ref rebarRect)) 212return Misc.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero); 305IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 306return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 363if (hwndBand != IntPtr.Zero && Misc.PtInWindowRect(hwndBand, x, y)) 396Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero); 422if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2)) 429if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), (int)CommonControlStyles.CCS_VERT)) 435return rectW32.ToRect(Misc.IsControlRTL(hwnd));
MS\Internal\AutomationProxies\WindowsRichEdit.cs (11)
184if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)) 190if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(_hwnd)) 205int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 212result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 403while (!gotPoint || !Misc.PtInRect(ref rect, x, y)) 417while (gotPoint && Misc.PtInRect(ref rect, x, y) && rangeAdjust.Start != rangeAdjust.End) 431while (!gotPoint || !Misc.PtInRect(ref rect, x, y)) 451} while (gotPoint && Misc.PtInRect(ref rect, x, y)); 505Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 607return Misc.ProxyGetText(_hwnd); 727return Misc.GetClassName(hwndParent).Equals("MsoCommandBar");
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (8)
76Misc.SetFocus(_pattern._hwnd); 194Misc.GetClientRectInScreenCoordinates(_pattern.WindowHandle, ref w32rect); 229return Misc.RectArrayToDoubleArray(rectArray); 277Misc.SetFocus(_pattern._hwnd); 295Misc.SetFocus(_pattern._hwnd); 327Misc.SetFocus(_pattern._hwnd); 349Misc.SetFocus(_pattern._hwnd); 373Misc.SetFocus(_pattern._hwnd);
MS\Internal\AutomationProxies\WindowsScroll.cs (21)
122int style = Misc.GetWindowStyle(hwnd); 124if ((sbFlag == NativeMethods.SB_HORZ && !Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) || 125(sbFlag == NativeMethods.SB_VERT && !Misc.IsBitSet(style, NativeMethods.WS_VSCROLL))) 130if (!Misc.IsEnabled(hwnd)) 141if (Misc.GetScrollBarInfo(hwnd, scrollBarObjectId, ref sbi)) 144!Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE); 157if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 167int style = Misc.GetWindowStyle(hwnd); 169bool hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.WS_HSCROLL) || Misc.IsBitSet(style, NativeMethods.WS_VSCROLL); 171string className = Misc.ProxyGetClassName(hwnd); 176hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.ES_MULTILINE); 207if (Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 239string classname = Misc.GetClassName(hwnd); 263if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || (si.nMax == si.nMin)) 304if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || 327bool fRet = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero) == 0; 329if (fRet && Misc.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos) 350} while (fRet && Misc.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos); 378if ((!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || 439int result = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (25)
157if (!Misc.GetScrollBarInfo(_hwnd, idObject, ref sbi)) 177if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_parent._hwnd))) 232return IsEnabled() && Misc.IsEnabled(_hwnd); 350if (Misc.PtInRect(ref rc, x, y)) 382return !Misc.IsEnabled(_hwnd) || !HasValuePattern(_hwnd, _sbFlag); 430return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_VSCROLL); 435return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_HSCROLL); 441return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.SBS_VERT); 453if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 467if (Misc.GetScrollBarInfo(hwnd, idObject, ref sbi)) 540if (_sbFlag != NativeMethods.SB_CTL || Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_CLIENT, ref sbi)) 574string classname = Misc.GetClassName(_hwnd); 591if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 602if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent._hwnd))) 642if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 680string classname = Misc.GetClassName(_hwnd); 703Misc.SetScrollPos(_hwnd, _sbFlag, val, true); 714Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 716Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 731if (Misc.GetScrollBarInfo(hwnd, idObject, ref sbi)) 753if (!Misc.GetScrollBarInfo(_hwnd, idObject, ref sbi)) 758return !Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE);
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (9)
226if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 235if (!Misc.GetScrollBarInfo(hwnd, idObject, ref sbi)) 245if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(parent._parent._hwnd))) 307if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 399if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 426if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(hwnd))) 526IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(_hwnd) : _hwnd; 552if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 573Misc.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd == _hwnd ? IntPtr.Zero : _hwnd));
MS\Internal\AutomationProxies\WindowsSlider.cs (17)
156if (Misc.PtInRect(ref rc, x, y)) 184IntPtr parent = Misc.GetParent(_hwnd); 195Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 272return (Misc.IsBitSet(WindowStyle, NativeMethods.TBS_VERT)); 277int value = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 282int maxValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 300Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val)); 307return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero); 315return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero); 323return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 331return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero); 425IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 426return Misc.GetItemToolTipText(_hwnd, hwndToolTip, 0); 456Misc.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero); 479if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcChannel, 2)) 491if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcThumb, 2)) 499if (Misc.IsLayoutRTL(hwnd))
MS\Internal\AutomationProxies\WindowsSpinner.cs (7)
78hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 84if (Misc.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) == -1) 290IntPtr hwndParent = Misc.GetParent(hwnd); 294IntPtr hwndChild = Misc.GetWindow(hwndParent, NativeMethods.GW_CHILD); 297string className = Misc.ProxyGetClassName(hwndChild); 300IntPtr hwndBuddy = Misc.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 306hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
MS\Internal\AutomationProxies\WindowsStatic.cs (6)
80string className = Misc.GetClassName(hwnd).ToLower(System.Globalization.CultureInfo.InvariantCulture); 100style = Misc.GetWindowStyle(hwnd) & NativeMethods.SS_TYPEMASK; 145return Misc.AccessKey(Misc.ProxyGetText(_hwnd)); 164return Misc.StripMnemonic(Misc.ProxyGetText(_hwnd));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (11)
156return Misc.ProxyGetText(_hwnd); 240if (Misc.PtInRect(ref rc, x, y)) 250if (Misc.PtInRect(ref rc, x, y)) 351return Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero); 370Misc.EnumChildWindows(hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindChildFromRect), (void*)&info); 378if (!Misc.GetClientRectInScreenCoordinates(hwnd, ref rc)) 610int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero); 811if (!Misc.GetClientRectInScreenCoordinates(hwnd, ref client)) 820if (Misc.IsLayoutRTL(hwnd)) 846int style = Misc.GetWindowStyle(hwnd); 847return Misc.IsBitSet(style, SBARS_SIZEGRIP) || WindowsGrip.IsGripPresent(hwnd, true);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (29)
92if (Misc.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0) 173if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 193int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 209return Misc.IsBitSet(WindowStyle, NativeMethods.HDS_VERT) ? OrientationType.Vertical : OrientationType.Horizontal; 263if (Misc.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0) 300Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 308return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.HDS_HIDDEN); 314return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 319return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 434return Misc.AccessKey(Text); 445IntPtr hwndParent = Misc.GetParent(_hwnd); 449if (Misc.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty) 451if (!Misc.IsItemVisible(ref parentRect, ref itemRect)) 467return Misc.StripMnemonic(Text); 500Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 501Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 542if (Misc.IsComctrlV6OnOsVerV6orHigher(_hwnd)) 544int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 592if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2)) 605if (Misc.IsLayoutRTL(_hwnd)) 667return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_BUTTONS)); 673return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_FILTERBAR)); 687return Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1); 712int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 746Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 747Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 756if (Misc.GetFocusedWindow().Equals(_hwnd)) 759IntPtr hwndDropDown = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "DropDown", null);
MS\Internal\AutomationProxies\WindowsTab.cs (51)
262if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref hti.pt, 1)) 271if (updownHwnd != IntPtr.Zero && Misc.PtInWindowRect(updownHwnd, x, y)) 293int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero); 362string sTitle = Misc.ProxyGetText(hwnd); 444return !Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS); 511int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 519Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 520Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 540int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 543int posResult = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 579if (!Misc.GetWindowRect(_hwnd, ref viewable)) 598if (!Misc.GetWindowRect(updownHwnd, ref rectW32)) 651int count = Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 693int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 697Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 698Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 730&& Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32")) 756IntPtr childHwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 765className = Misc.ProxyGetClassName(childHwnd); 772childHwnd = Misc.GetWindow(childHwnd, NativeMethods.GW_HWNDLAST); 787return Misc.IsBitSet(style, NativeMethods.TCS_MULTILINE) && 788(Misc.IsBitSet(style, NativeMethods.TCS_RIGHT) || 789Misc.IsBitSet(style, NativeMethods.TCS_VERTICAL)); 814int newPos = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 815int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 854Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 855Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 867return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_MULTISELECT)); 957return Misc.AccessKey(WindowsTabItem.GetItemText(_hwnd, _item)); 972IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 973return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 999if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_FOCUSNEVER)) 1009Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1109Misc.MouseClick(pt.x, pt.y); 1145Misc.MouseClick(pt.x, pt.y); 1153else if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS)) 1155Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero); 1187return Misc.IsBitSet(TCItem.dwState, NativeMethods.TCIS_BUTTONPRESSED); 1240return !fIsWinform ? Misc.StripMnemonic(sName) : sName; 1245return Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 1261return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item; 1283return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty; 1294if (Misc.IsBitSet(WindowStyle, (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_FOCUSNEVER))) 1303if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1305Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1306Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1312Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1325hwndParent = Misc.GetParent(hwndParent); 1336return Misc.FindWindowEx(hwndParent, IntPtr.Zero, null, sName); 1350tcitem.cchTextMax = Misc.MaxLengthNameProperty;
MS\Internal\AutomationProxies\WindowsTitleBar.cs (21)
70return Misc.GetTitleBarRect(_hwnd); 86return Misc.ProxyGetText(_hwnd); 124int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y)); 211Misc.ProxyGetTitleBarInfo(_hwnd, out ti); 218if (!Misc.IsBitSet(ti.rgstate[i], NativeMethods.STATE_SYSTEM_INVISIBLE) || i == _systemMenu) 232if (Misc.ProxyGetTitleBarInfo(hwnd, out ti)) 234return !Misc.IsBitSet(ti.rgstate[0], NativeMethods.STATE_SYSTEM_INVISIBLE); 299if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 309if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 330if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_DISABLED)) 335return Misc.IsBitSet(WindowExStyle, NativeMethods.WS_EX_CONTEXTHELP); 341if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 346return Misc.IsBitSet(style, NativeMethods.WS_MINIMIZEBOX); 353if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 358return Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZEBOX); 371Rect[] rects = Misc.GetTitlebarRects(_hwnd); 384if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 393if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 444Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero); 455Misc.ClearMenuMode(); 458Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (26)
226if (Misc.PtInRect(ref rc, x, y)) 242int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero); 271string name = Misc.ProxyGetText(_hwnd); 313if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 343return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero); 383bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0; 384int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero); 390if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_SEP)) 392else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_CHECK)) 395IntPtr hwndParent = Misc.GetParent(_hwnd); 396if(Misc.GetClassName(hwndParent) != "MSTaskSwWClass") 401else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_DROPDOWN) 402&& Misc.IsBitSet(exStyle, NativeMethods.TBSTYLE_EX_DRAWDDARROWS)) 443if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 475return Misc.AccessKey(Text); 483return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 507return Misc.StripMnemonic(Text); 529Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 591return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item; 613int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 650IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 651return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _idCommand); 658|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 665if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 683Misc.MouseClick(((int)boundingRectangle.Left + (int)boundingRectangle.Right) / 2, ((int)boundingRectangle.Top + (int)boundingRectangle.Bottom) / 2); 692if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
80if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 86if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (15)
192string className = Misc.ProxyGetClassName(hwnd); 201string className = Misc.ProxyGetClassName(_hwnd); 214return Misc.ProxyGetText(_hwnd); 254if (!Misc.GetCursorPos(ref pt)) 267Rect[] rects = Misc.GetTitlebarRects(hwnd); 285if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 294if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 303return Misc.ProxyGetText(hwnd); 313if (!Misc.GetCursorPos(ref pt)) 324int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 329if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MINIMIZE)) 335if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MAXIMIZE)) 354return Misc.ProxyGetText(hwnd);
MS\Internal\AutomationProxies\WindowsTreeView.cs (34)
422return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0; 428return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0; 436return (Misc.IsBitSet(expanded, NativeMethods.TVIS_EXPANDED)); 447if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0) 453fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0; 534return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem); 540return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask)); 580return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty; 600treeItem.cchTextMax = Misc.MaxLengthNameProperty; 611IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item); 622if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1) 625Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero); 633Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero); 659IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 670int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 828if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 && Misc.IsWindowInGivenProcess(_hwnd, "explorer")) 863if (!Misc.IsItemVisible(_hwnd, ref itemRect)) 879IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 880return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 916if (!parentRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 1240Misc.SetFocus(_hwnd); 1244Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem); 1297int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED)); 1299return Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED); 1413state = Misc.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked; 1461state = Misc.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked; 1481if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1490return Misc.IsBitSet(WindowStyle, NativeMethods.TVS_EDITLABELS); 1498if (Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED)) 1510bool isCheckbox = Misc.IsBitSet(WindowStyle, NativeMethods.TVS_CHECKBOXES); 1553Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1554Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1616if (!Misc.ReadProcessMemory(hProcess, pAddress, new IntPtr(&ent), new IntPtr(readSize), out count)) 1652int childId = Misc.ProxySendMessageInt(_hwnd, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (19)
207if (Misc.PtInRect(ref rc, x, y)) 244Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0)); 247Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 315return Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32"); 361int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 374IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 379hwndBuddy = Misc.GetParent(hwnd); 389return hwndBuddy != IntPtr.Zero && Misc.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) != -1; 398int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 412int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 544if (IsHorizontal(_hwnd) && Misc.IsLayoutRTL(_hwnd)) 553if (!Misc.GetWindowRect(_hwnd, ref updownRect)) 563Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center); 564Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center); 581if (!Misc.GetWindowRect(hwnd, ref updownRect)) 590if (fHorz && Misc.IsLayoutRTL(hwnd)) 646hwndParent = Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero; 654return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.UDS_HORZ);
MS\Internal\AutomationProxies\WinEventTracker.cs (9)
178if (Misc.IsCriticalException(e)) 188hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); 197Misc.UnhookWinEvent(hp._winEventHook); 281if (Misc.IsCriticalException(e)) 326if (Misc.IsCriticalException(e)) 341if (Misc.IsCriticalException(e)) 379if (Misc.GetWindowThreadProcessId(hwnd, out processId) == 0) 495return Misc.ProxyGetClassName(Process.GetProcessById(processId).MainWindowHandle).Equals("ConsoleWindowClass"); 499if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\WinFormsSpinner.cs (6)
48text = Misc.ProxyGetText(hwndEdit); 140IntPtr hwndFirstChild = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 147IntPtr hwndLastChild = Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDLAST); 154if (Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDNEXT) != hwndLastChild) 165if (Misc.ProxyGetClassName(hwndLastChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1) 173if (Misc.ProxyGetClassName(hwndFirstChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1)