830 references to Misc
UIAutomationClientSideProviders (830)
MS\Internal\AutomationProxies\Accessible.cs (5)
162IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject)); 697return Misc.IsBitSet((int)state, (int)testState); 1097if (Misc.IsCriticalException(e) && ! (e is NullReferenceException)) 1272if (Misc.IsCriticalException(e) && ! (e is NullReferenceException)) 1307if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\ClickablePoint.cs (9)
20_hwndProgman = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null); 60for (hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT)) 74hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDPREV); 84if (Misc.IsBitSet(Misc.GetWindowStyle(hwndCurrent), NativeMethods.WS_POPUP)) 91hwnd = Misc.GetParent(hwndCurrent); 241if (!Misc.GetWindowRect(hwnd, ref rc)) 259int lr = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (6)
42SetHandle(Misc.VirtualAllocEx(_processHandle, IntPtr.Zero, new UIntPtr((uint)cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE)); 54return Misc.VirtualFreeEx(_processHandle, handle, UIntPtr.Zero, UnsafeNativeMethods.MEM_RELEASE); 78Misc.WriteProcessMemory(_processHandle, handle, sourceAddress, cbSize, out count); 84Misc.ReadProcessMemory(_processHandle, remoteAddress, destAddress, cbSize, out count); 90Misc.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count); 95Misc.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count);
MS\Internal\AutomationProxies\CommonXSendMessage.cs (14)
106IntPtr result = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 195if (Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address) == IntPtr.Zero) 236IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 283IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam)); 339IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem1.Address, rmem2.Address); 380int res = Misc.ProxySendMessageInt(hwnd, uMsg, wParam, rmem.Address); 983if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref clientPoint, 1)) 1187if (Misc.ProxySendMessageInt(hwnd, msg, new IntPtr(index), remoteMem.Address) != 0) 1190Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2); 1256if (Misc.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero) 1366if (Misc.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1414if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1462if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1493if (!Misc.IsWow64Process(hProcess, out isWOW64Process))
MS\Internal\AutomationProxies\EventManager.cs (3)
448int style = Misc.GetWindowStyle(hwnd); 451if (Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZE)) 455else if (Misc.IsBitSet(style, NativeMethods.WS_MINIMIZE))
MS\Internal\AutomationProxies\Input.cs (1)
168Misc.SendInput(1, ref ki, Marshal.SizeOf(ki));
MS\Internal\AutomationProxies\Misc.cs (10)
377IntPtr hwndParent = Misc.GetParent(hwnd); 391int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero); 1222if (!Misc.ProxyGetTitleBarInfo(hwnd, out ti) || ti.rcTitleBar.IsEmpty) 1232if(Misc.IsControlRTL(hwnd)) 1855int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 1908tool.hwnd = Misc.GetParent(lParam.hwnd); 1973if (!Misc.ProxyGetTitleBarInfo(hwnd, out tiDL)) 1997if (Misc.IsLayoutRTL(hwnd)) 2005leftEdge = (int)(Misc.GetTitleBarRect(hwnd).Left); 2044if (!Misc.ProxyGetTitleBarInfoEx(hwnd, out ti))
MS\Internal\AutomationProxies\MSAANativeProvider.cs (10)
157int index = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 363string className = Misc.GetClassName(_hwnd); 455Misc.SetFocus(_hwnd); 619Misc.SetFocus(_hwnd); 633Misc.SetFocus(_hwnd); 647Misc.SetFocus(_hwnd); 922Misc.GetWindowThreadProcessId(_hwnd, out pid); 1059string className = Misc.GetClassName(hwnd); 1197Misc.SetFocus(_hwnd); 1205if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\MSAAWinEventWrap.cs (4)
79_hHooks[0] = Misc.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc, 0, 0, _fFlags); 99Misc.UnhookWinEvent(_hHooks[i]); 138if (Misc.IsCriticalException(e)) 155if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\NonClientArea.cs (14)
108System.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)); 117Misc.GetClientRectInScreenCoordinates(hwnd, ref clientRect) 118&& Misc.GetWindowRect(hwnd, ref windowRect) 208int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 464if (Misc.ProxyGetClassName(_hwnd) == "SysListView32") 476if (Misc.ProxyGetClassName(_hwnd) == "SysListView32") 501if (Misc.IsBitSet(style, NativeMethods.WS_VSCROLL) && Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) 523if (!Misc.IsBitSet(style, NativeMethods.WS_CHILD)) 578if (Misc.IsLayoutRTL(_hwnd)) 651if (Misc.GetClassName(hwnd) == "ComboLBox") 714if (Misc.GetClassName(hwnd) == "ComboLBox") 728int style = Misc.GetWindowStyle(hwnd); 729if (Misc.IsBitSet(style, NativeMethods.WS_CHILD))
MS\Internal\AutomationProxies\ProxyFragment.cs (1)
218if (fragment == fromPoint || Misc.Compare(fragment, fromPoint))
MS\Internal\AutomationProxies\ProxyHwnd.cs (15)
180IntPtr label = Misc.GetLabelhwnd(_hwnd); 181name = Misc.GetControlName(label, true); 189name = Misc.ProxyGetText(_hwnd); 214_controlLabel = Misc.GetLabelhwnd(_hwnd); 232IntPtr hwndParent = Misc.GetParent(_hwnd); 239if (Misc.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty) 243if (!itemRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 259int idChild = Misc.GetWindowId(_hwnd); 260string text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, idChild); 263text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, 0); 467if (!Misc.GetClientRect(hwnd, ref rc)) 472if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 494IntPtr label = Misc.GetLabelhwnd(hwnd); 497string labelText = Misc.ProxyGetText(label); 500accessKey = Misc.AccessKey(labelText);
MS\Internal\AutomationProxies\ProxySimple.cs (14)
98if (!Misc.GetWindowRect(_hwnd, ref controlRectangle)) 129return Misc.AppendToRuntimeId(GetParent().GetRuntimeId(), _item); 205return Misc.IsEnabled(_hwnd); 216Misc.GetWindowThreadProcessId(_hwnd, out pid); 238return Misc.GetFocusedWindow() == _hwnd ? IsFocused() : false; 267if (Misc.GetFocusedWindow() == _hwnd && IsFocused()) 282if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_TABSTOP)) 321if (!parentRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 339string sRawName = Misc.GetControlName(_hwnd, false); 341return string.IsNullOrEmpty(sRawName) ? null : Misc.AccessKey(sRawName); 578Misc.GetClientRectInScreenCoordinates(_hwnd, ref rcOutside); 580if (!Misc.IntersectRect(ref rcItem, ref rcOutside, ref rcItem)) 662return Misc.GetWindowStyle(_hwnd); 671return Misc.GetWindowExStyle(_hwnd);
MS\Internal\AutomationProxies\QueueProcessor.cs (3)
108Misc.DispatchMessage(ref msg); 124int result = Misc.MsgWaitForMultipleObjects(handle, false, NativeMethods.INFINITE, NativeMethods.QS_ALLINPUT); 133if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\SafeProcessHandle.cs (3)
28Misc.GetWindowThreadProcessId(hwnd, out processId); 32SetHandle(Misc.OpenProcess(NativeMethods.PROCESS_QUERY_INFORMATION | NativeMethods.PROCESS_VM_OPERATION | NativeMethods.PROCESS_VM_READ | NativeMethods.PROCESS_VM_WRITE, false, processId, hwnd)); 44return Misc.CloseHandle(handle);
MS\Internal\AutomationProxies\WindowsAltTab.cs (6)
126if (Misc.MapWindowPoints(System.IntPtr.Zero, _hwnd, ref pt, 1)) 130if(Misc.GetClientRect(_hwnd, ref clientRect)) 132if (Misc.PtInRect(ref clientRect, pt.x, pt.y)) 249Misc.ThrowWin32ExceptionsIfError(lastWin32Error); 341return GetBoundingRect().ToRect(Misc.IsControlRTL(_hwnd)); 386if(!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (30)
104style = Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK; 190int state = Misc.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero); 191if (Misc.IsBitSet(state, NativeMethods.BST_PUSHED) 257return Misc.AccessKey(Misc.ProxyGetText(_hwnd)); 328new WindowsButton(hwndRadioButton, null, ButtonType.RadioButton, Misc.GetWindowStyle(hwndRadioButton) & NativeMethods.BS_TYPEMASK, accRadioButton) 389IntPtr hwndParent = Misc.GetParent(_hwnd); 400return new WindowsButton(hwndParent, null, ButtonType.GroupBox, Misc.GetWindowStyle(hwndParent) & NativeMethods.BS_TYPEMASK, accParent); 470Misc.SetFocus(_hwnd); 494Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 508Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 515Misc.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true); 537IntPtr hwndShell = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null); 549if (!Misc.GetClassName(_hwnd).Equals("Button")) 557return Misc.InTheShellProcess(_hwnd) && UnsafeNativeMethods.GetProp(_hwnd, "StartButtonTag") == new IntPtr(304); 561IntPtr hwndParent = Misc.GetParent(_hwnd); 564if (Misc.GetClassName(hwndParent).Equals("Shell_TrayWnd")) 575if (!Misc.GetClassName(_hwnd).Equals("Button")) 580IntPtr hwndParent = Misc.GetParent(_hwnd); 583if (Misc.GetClassName(hwndParent).Equals("Desktop More Programs Pane")) 601if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_CHILD)) 603hwndParent = Misc.GetParent(hwndRoot); 607hwndParent = Misc.GetWindow(hwndRoot, NativeMethods.GW_OWNER); 640int state = Misc.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero); 641if (Misc.IsBitSet(state, NativeMethods.BST_CHECKED)) 645else if (Misc.IsBitSet(state, NativeMethods.BST_INDETERMINATE)) 665Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound); 694return Misc.StripMnemonic(Misc.ProxyGetText(_hwnd)); 703Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton);
MS\Internal\AutomationProxies\WindowsComboBox.cs (35)
129if (!Misc.GetWindowRect(cbInfo.hwndList, ref rcList)) 133if (!Misc.UnionRect(out rcCombo, ref rcCombo, ref rcList)) 140return rcCombo.ToRect(Misc.IsControlRTL(_hwnd)); 149if (Misc.GetClassName(_hwnd).Equals("Internet Explorer_TridentCmboBx")) 191return Misc.GetControlName(Misc.GetLabelhwnd(_hwndEx), true); 254if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 256if (Misc.PtInRect(ref cbInfo.rcButton, x, y)) 267if (Misc.GetWindowRect(cbInfo.hwndList, ref rcList) && 268Misc.PtInRect(ref rcList, x, y)) 367Misc.CheckEnabled(_hwnd); 382IntPtr hwndParent = Misc.GetParent(_hwnd); 385int id = Misc.GetWindowId(_hwnd); 388Misc.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam, _hwnd); 435Misc.CheckEnabled(_hwnd); 449Misc.CheckEnabled(_hwnd); 516bool result = Misc.GetComboBoxInfo(hwnd, ref cbInfo); 533cbInfo.hwndItem = Misc.FindWindowEx(hwnd, IntPtr.Zero, "EDIT", null); 536result = Misc.GetWindowRect(cbInfo.hwndItem, ref cbInfo.rcItem); 539result = Misc.MapWindowPoints(_hwndDesktop, hwnd, ref cbInfo.rcItem, 2); 555return Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0; 560IntPtr hwndFocused = Misc.GetFocusedWindow(); 568Misc.SetFocus(hwnd); 570Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 575Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 623return Misc.ProxyGetText(IsComboBoxEx32() ? _hwndEx : _hwnd); 631return (Misc.GetWindowStyle(hwnd) & NativeMethods.CBS_COMBOTYPEMASK); 672return string.Equals(Misc.GetClassName(hwndEx), ComboboxEx32, StringComparison.OrdinalIgnoreCase); 691index = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 698int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 705if (Misc.GetClassName(hwnd).Equals("Internet Explorer_TridentCmboBx")) 716return Misc.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len); 760if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && Misc.IsBitSet(NativeMethods.STATE_SYSTEM_PRESSED, cbInfo.stateButton)) 913if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 940Misc.CheckEnabled(_hwnd);
MS\Internal\AutomationProxies\WindowsContainer.cs (11)
27string className = Misc.ProxyGetClassName(hwnd); 127return Misc.IsBitSet(style, NativeMethods.WS_CAPTION) || 128Misc.IsBitSet(style, NativeMethods.WS_POPUP); 133int style = Misc.GetWindowStyle(hwnd); 134int exstyle = Misc.GetWindowExStyle(hwnd); 136return Misc.IsBitSet(style, NativeMethods.DS_CONTROL) && 137Misc.IsBitSet(style, NativeMethods.WS_CHILD) && 138Misc.IsBitSet(exstyle, NativeMethods.WS_EX_CONTROLPARENT); 165string dlgName = Misc.ProxyGetText(hwnd); 172IntPtr hwndParent = Misc.GetParent(hwnd); 178hwndTab = Misc.FindWindowEx(hwndParent, IntPtr.Zero, "SysTabControl32", null);
MS\Internal\AutomationProxies\WindowsEditBox.cs (40)
150hwnd = Misc.GetParent(hwnd)) 265Misc.CheckEnabled(_hwnd); 269if (Misc.IsBitSet(styles, NativeMethods.ES_READONLY)) 275if (Misc.IsBitSet(styles, NativeMethods.ES_NUMBER)) 289int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 297result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 351if (!Misc.MapWindowPoints(IntPtr.Zero, WindowHandle, ref clientLocation, 1)) 360if (!Misc.GetClientRect(WindowHandle, ref clientRect)) 443int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam); 492int style = Misc.GetWindowStyle(hwnd); 495if (Misc.IsBitSet(style, NativeMethods.ES_PASSWORD)) 499else if (Misc.IsBitSet(style, NativeMethods.ES_MULTILINE)) 503else if (Misc.IsBitSet(style, NativeMethods.ES_AUTOHSCROLL)) 515return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 522return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 528IntPtr result = Misc.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero); 545return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero); 554if (Misc.GetObjectW(hfont, cb, ref logfont) != cb) 565Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect); 573Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETSEL, out start, out end); 579return Misc.ProxyGetText(_hwnd, GetTextLength()); 585return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero); 595if (Misc.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty) 671return (!SafeNativeMethods.IsWindowEnabled(WindowHandle) || Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 680return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero); 686int index = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero); 693return 0 != Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical); 701if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_VSCROLL)) 709bool ok = Misc.GetScrollInfo(WindowHandle, NativeMethods.SB_VERT, ref si); 720if (Misc.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty) 742int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero); 803Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end); 811return Misc.ProxyGetText(hwnd); 852IntPtr hdc = Misc.GetDC(_hwnd); 862oldFont = Misc.SelectObject(hdc, hfont); 863return Misc.GetTextExtentPoint32(hdc, text, text.Length, out size); 869Misc.SelectObject(hdc, oldFont); 872Misc.ReleaseDC(_hwnd, hdc); 930string classname = Misc.GetClassName(hwndParent); 946string classname = Misc.GetClassName(hwndParent);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (15)
79Misc.SetFocus(_provider._hwnd); 241if (!Misc.MapWindowPoints(_provider.WindowHandle, IntPtr.Zero, ref w32point, 1)) 281return Misc.RectArrayToDoubleArray(rectArray); 300Misc.SetFocus(_provider._hwnd); 354Misc.SetFocus(_provider._hwnd); 418Misc.SetFocus(_provider._hwnd); 437Misc.SetFocus(_provider._hwnd); 454Misc.SetFocus(_provider._hwnd); 477Misc.SetFocus(_provider._hwnd); 483if (Misc.IsReadingRTL(_provider._hwnd)) 724if (Misc.IsBitSet(style, NativeMethods.ES_CENTER)) 728else if (Misc.IsBitSet(style, NativeMethods.ES_RIGHT)) 741return Misc.IsBitSet(style, NativeMethods.ES_UPPERCASE) ? CapStyle.AllCap : CapStyle.None; 769IntPtr hdc = Misc.GetDC(IntPtr.Zero); 775Misc.ReleaseDC(IntPtr.Zero, hdc);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (9)
50return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 84return new WindowsButton(hwnd, null, WindowsButton.ButtonType.CheckBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 87return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 90return new WindowsButton(hwnd, null, WindowsButton.ButtonType.PushButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 93return new WindowsButton(hwnd, null, WindowsButton.ButtonType.RadioButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 130return IsWindowsFormsControl(Misc.GetClassName(hwnd)); 154if (XSendMessage.XSend(hwnd, WM_GETCONTROLNAME, new IntPtr(Misc.MaxLengthNameProperty), ref winFormsID, Misc.MaxLengthNameProperty)) 195private static int WM_GETCONTROLNAME = Misc.RegisterWindowMessage("WM_GETCONTROLNAME");
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (3)
91Misc.SetFocus(_hwnd); 118Misc.SetFocus(_hwnd); 123Misc.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsGrip.cs (6)
50if (Misc.GetClientRectInScreenCoordinates(_hwnd, ref client)) 54if (Misc.IsLayoutRTL(_hwnd)) 83if (!Misc.GetClientRectInScreenCoordinates(hwnd, ref client)) 103if (Misc.IsLayoutRTL(hwnd)) 107int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 115int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsHyperlink.cs (7)
115return Misc.StripMnemonic(RemoveHTMLAnchorTag(Misc.ProxyGetText(_hwnd))); 196if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 234if (Misc.IsBitSet(_linkItem.state, NativeMethods.LIS_FOCUSED)) 436if (!Misc.GetWindowRect(_hwnd, ref BoundingRect)) 504Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 505Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (10)
137Misc.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4)); 152return Misc.ProxyGetText(_hwnd, IP_ADDRESS_STRING_LENGTH); 160return !Misc.IsEnabled(_hwnd); 242IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 251hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 259IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 262hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 350return Misc.ProxyGetText(_hwnd); 380Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture))); 475return WindowsIPAddress.Create(Misc.GetParent(_hwnd), 0, 0);
MS\Internal\AutomationProxies\WindowsListBox.cs (36)
65int style = Misc.GetWindowStyle(hwnd); 72if (Misc.IsBitSet(style, NativeMethods.LBS_COMBOBOX)) 287Misc.GetClientRectInScreenCoordinates(_hwnd, ref listboxrect); 288if (Misc.PtInRect(ref listboxrect, x, y)) 290int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top)); 305int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero); 380return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0; 430return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero); 517if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LBS_COMBOBOX)) 555int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero); 596return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 719int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 723if (Misc.GetClassName(_hwnd).Equals("Internet Explorer_TridentLstBox")) 734string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen); 932Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 978return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 987SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item)); 991SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1006return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR; 1031return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item; 1035return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1052Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect); 1053return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty; 1107Misc.MouseClick(pt.x, pt.y); 1121Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item)); 1126Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1136int listBoxStyle = Misc.GetWindowStyle(_hwnd); 1137if (Misc.IsBitSet(listBoxStyle, NativeMethods.LBS_NOTIFY)) 1140int idListBox = Misc.GetWindowId(_hwnd); 1144IntPtr hwndListBoxParent = Misc.GetParent(_hwnd); 1147Misc.ProxySendMessageInt( 1156Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1160int id = Misc.GetWindowId(_hwnd); 1164Misc.ProxySendMessageInt(combo._hwnd, NativeMethods.WM_COMMAND, wParam, _hwnd); 1180return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (42)
412if (Misc.PtInRect(ref rc, x, y)) 886return (Misc.IsBitSet(state, NativeMethods.LVIS_FOCUSED)); 1177return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_REPORT); 1207return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1235return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags)); 1246return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero); 1252return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1)); 1258return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_SCROLL, dx, dy) != 0; 1271return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1281return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0; 1305return Misc.IsBitSet(GetItemState(hwnd, listItem, NativeMethods.LVIS_SELECTED), NativeMethods.LVIS_SELECTED); 1311return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_EDITLABELS); 1345return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1351return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_ONECLICKACTIVATE); 1357return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_SINGLESEL); 1363return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_NOSCROLL); 1371return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0; 1377return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 1383item.cchTextMax = Misc.MaxLengthNameProperty; 1410if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref hitTest.pt, 1)) 1417if (Misc.IsComctrlV6OnOsVerV6orHigher(hwnd)) 1448return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1454return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_CHECKBOXES); 1468return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_AUTOARRANGE); 1474return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_FULLROWSELECT); 1480return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_JUSTIFYCOLUMNS); 1495return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1504IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1506return Misc.GetItemToolTipText(hwnd, hwndToolTip, 0); 1643string className = Misc.GetClassName(Misc.GetParent(_hwnd)); 1667if (!Misc.GetScrollBarInfo(_hwnd, scrollBar, ref scrollBarInfo) || 1683if (!Misc.GetScrollInfo(_hwnd, sbFlag, ref si) || 1783return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_LIST); 1796return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref pt, 1); 1806return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero); 1812return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask)); 1835if (Misc.PtInWindowRect(hwndHeader, x, y))
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (6)
35_isComctrlV6OnOsVerV6orHigher = Misc.IsComctrlV6OnOsVerV6orHigher(hwnd); 99group.cchHeader = Misc.MaxLengthNameProperty; 110group.cchHeader = Misc.MaxLengthNameProperty; 328int groupIndex = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 484if (Misc.IsComctrlV6OnOsVerV6orHigher(hwnd)) 486int groupIndex = (int)Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (6)
240return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 366bool isComctrlV6OnOsVerV6orHigher = Misc.IsComctrlV6OnOsVerV6orHigher(hwnd); 705Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2); 714if (!Misc.GetWindowRect(_hwnd, ref rcLv)) 748if (Misc.IsControlRTL(_hwnd)) 816if (Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_VSCROLL, ref sbi))
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (3)
78Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2); 108group.cchSubsetTitle= Misc.MaxLengthNameProperty; 123Misc.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (12)
43_isComctrlV6OnOsVerV6orHigher = Misc.IsComctrlV6OnOsVerV6orHigher(hwnd); 135if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRectangle, 2)) 340if (!checkboxRectangle.IsEmpty && Misc.PtInRect(ref checkboxRectangle, x, y)) 365int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero); 754Misc.SetFocus(hwnd); 854if (Misc.GetWindowRect(hwndHeader, ref headerRect) 855&& Misc.GetClientRectInScreenCoordinates(_hwnd, ref listViewRect)) 863&& !Misc.IsItemVisible(ref listViewRect, ref itemRect)) 929if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 953Misc.MouseClick(clickPoint.x, clickPoint.y, !WindowsListView.ListViewSingleClickActivate(_hwnd)); 972Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode)); 973Misc.ProxySendMessage(hwnd, NativeMethods.WM_KEYUP, key, keyUpLParam);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (10)
79if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 110return name.Length < Misc.MaxLengthNameProperty ? name : name.Substring(0, Misc.MaxLengthNameProperty); 152if (!Misc.GetWindowRect(hwnd, ref controlRectangle)) 186if(Misc.IsControlRTL(hwnd)) 244Misc.SetFocus(_hwnd); 249if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 252Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 253Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewItemStartMenu.cs (1)
97if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (3)
58if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 80Misc.SetScrollPos(_hwnd, _sbFlag, pos, true); 109if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si))
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (9)
98if (Misc.IsControlRTL(_hwnd)) 113if (Misc.IsControlRTL(_hwnd)) 142if (!Misc.IsItemVisible(ref parentRect, ref itemRect)) 172if (Misc.GetClassName(ancestor) == "Desktop Search Open View") 176ancestor = Misc.GetParent(ancestor); 199return name.Length < Misc.MaxLengthNameProperty ? name : name.Substring(0, Misc.MaxLengthNameProperty); 372if (Misc.IsComctrlV6OnOsVerV6orHigher(_hwnd)) 374int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (78)
210if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 227if (!Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 233hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 289if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE)) 298else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_POPUPMENUMODE)) 304else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 505bool result = Misc.GetMenuBarInfo(hwnd, idObject, idItem, ref mbi); 590if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 613for (IntPtr hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndMenu, WindowsMenu.MenuClassName, null); 615hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndPossibleParent, WindowsMenu.MenuClassName, null)) 641for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 643hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, MenuClassName, null)) 668if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER)) 681int count = Misc.GetMenuItemCount(hmenuPossibleParent); 706return Misc.GetMenuItemCount(_hmenu); 716return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero); 729if (Misc.ProxyGetGUIThreadInfo(0, out gui)) 731return Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE); 812if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd))) 817if (!Misc.ProxyGetTitleBarInfo(_hwnd, out ti)) 879Misc.IsBitSet(mbi.focusFlags, 3)) 897if (Misc.ProxyGetGUIThreadInfo(0, out gui)) 911return string.Equals(Misc.ProxyGetClassName(hwnd), WindowsMenu.MenuClassName, StringComparison.OrdinalIgnoreCase); 916int count = Misc.GetMenuItemCount(hmenu); 920if (Misc.IsBitSet(state, NativeMethods.MF_HILITE)) 933hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 1084if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 1256if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd))) 1261if (!Misc.ProxyGetTitleBarInfo(_hwnd, out ti)) 1274if (Misc.GetMenuItemRect(_hwnd, _hmenu, _item, out rc)) 1306menuRawText = Misc.StripMnemonic(menuRawText); 1383if (!Misc.IsEnabled(_hwnd)) 1438if (Misc.InMenuMode()) 1440IntPtr hwndFocus = Misc.GetFocusedWindow(); 1453if (!Misc.InMenuMode() && !MenuMode(true)) 1460if (!Misc.InMenuMode()) 1507while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 1539return Misc.AccessKey(Text); 1647if (Misc.PtInRect(ref rc, x, y)) 1865return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); 1880return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED); 1889if (!Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 1894return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero); 1904if (!Misc.GetMenuItemInfo(hmenu, position, true, ref menuItemInfo)) 1909return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1910Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1911Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)); 1948if (Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 1955if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1956Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1957Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 1977IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 2087for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowsMenu.MenuClassName, null); 2089hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, WindowsMenu.MenuClassName, null)) 2118Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' ')); 2145int childIndex = (returnFirstChild) ? 0 : Misc.GetMenuItemCount(hSubmenu) - 1; 2193int cItems = Misc.GetMenuItemCount(_hmenu); 2196for (item = 0; item < cItems && !Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++) 2240if (Misc.ProxyGetGUIThreadInfo(0, out gui) && _hwnd == gui.hwndActive) 2245if (gui.hwndCapture != IntPtr.Zero && Misc.ProxyGetClassName(gui.hwndCapture) == "ListBox") 2256return Misc.SetFocus(_hwnd); 2266while (Misc.InMenuMode() != fInMenuMode && (dwDelta = SubtractTicks(SafeNativeMethods.GetTickCount(), dwTicks)) < WindowsMenu.TimeOut) 2278if (Misc.InMenuMode() == fSet) 2331while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 2351int c = Misc.GetMenuItemCount(_hmenu); 2362if (Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE)) 2397Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP)) 2556if (Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 2558if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 2559Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 2560Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 2564else if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_OWNERDRAW)) 2596if (!Misc.ReadProcessMemory(hProcess, dwItemData, new IntPtr(&msaaMenuInfo), new IntPtr(readSize), out count)) 2619if (Misc.ReadProcessMemory(hProcess, msaaMenuInfo.pszWText, new IntPtr(text), new IntPtr(readSize), out count)) 2650return !(Misc.IsBitSet(state, NativeMethods.MF_DISABLED) | Misc.IsBitSet(state, NativeMethods.MF_GRAYED)); 2674if (nextItem < Misc.GetMenuItemCount(_hmenu)) 2731menuRawText = Misc.StripMnemonic(Text);
MS\Internal\AutomationProxies\WindowsProgressbar.cs (3)
154int cur = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 155int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero); 156int max = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (10)
123if (!Misc.GetWindowRect(_hwnd, ref rebarRect)) 193return Misc.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero); 288IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 289return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 346if (hwndBand != IntPtr.Zero && Misc.PtInWindowRect(hwndBand, x, y)) 379Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero); 405if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2)) 412if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), (int)CommonControlStyles.CCS_VERT)) 418return rectW32.ToRect(Misc.IsControlRTL(hwnd));
MS\Internal\AutomationProxies\WindowsRichEdit.cs (11)
167if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)) 173if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(_hwnd)) 188int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 195result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 358while (!gotPoint || !Misc.PtInRect(ref rect, x, y)) 372while (gotPoint && Misc.PtInRect(ref rect, x, y) && rangeAdjust.Start != rangeAdjust.End) 386while (!gotPoint || !Misc.PtInRect(ref rect, x, y)) 406} while (gotPoint && Misc.PtInRect(ref rect, x, y)); 460Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 560return Misc.ProxyGetText(_hwnd); 684return Misc.GetClassName(hwndParent).Equals("MsoCommandBar");
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (8)
64Misc.SetFocus(_pattern._hwnd); 170Misc.GetClientRectInScreenCoordinates(_pattern.WindowHandle, ref w32rect); 205return Misc.RectArrayToDoubleArray(rectArray); 250Misc.SetFocus(_pattern._hwnd); 268Misc.SetFocus(_pattern._hwnd); 300Misc.SetFocus(_pattern._hwnd); 322Misc.SetFocus(_pattern._hwnd); 346Misc.SetFocus(_pattern._hwnd);
MS\Internal\AutomationProxies\WindowsScroll.cs (21)
111int style = Misc.GetWindowStyle(hwnd); 113if ((sbFlag == NativeMethods.SB_HORZ && !Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) || 114(sbFlag == NativeMethods.SB_VERT && !Misc.IsBitSet(style, NativeMethods.WS_VSCROLL))) 119if (!Misc.IsEnabled(hwnd)) 130if (Misc.GetScrollBarInfo(hwnd, scrollBarObjectId, ref sbi)) 133!Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE); 146if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 156int style = Misc.GetWindowStyle(hwnd); 158bool hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.WS_HSCROLL) || Misc.IsBitSet(style, NativeMethods.WS_VSCROLL); 160string className = Misc.ProxyGetClassName(hwnd); 165hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.ES_MULTILINE); 197if (Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 229string classname = Misc.GetClassName(hwnd); 253if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || (si.nMax == si.nMin)) 296if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || 319bool fRet = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero) == 0; 321if (fRet && Misc.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos) 342} while (fRet && Misc.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos); 372if ((!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || 433int result = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (25)
139if (!Misc.GetScrollBarInfo(_hwnd, idObject, ref sbi)) 159if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_parent._hwnd))) 214return IsEnabled() && Misc.IsEnabled(_hwnd); 331if (Misc.PtInRect(ref rc, x, y)) 363return !Misc.IsEnabled(_hwnd) || !HasValuePattern(_hwnd, _sbFlag); 411return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_VSCROLL); 416return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_HSCROLL); 422return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.SBS_VERT); 434if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 448if (Misc.GetScrollBarInfo(hwnd, idObject, ref sbi)) 521if (_sbFlag != NativeMethods.SB_CTL || Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_CLIENT, ref sbi)) 555string classname = Misc.GetClassName(_hwnd); 574if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 585if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent._hwnd))) 627if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 665string classname = Misc.GetClassName(_hwnd); 688Misc.SetScrollPos(_hwnd, _sbFlag, val, true); 699Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 701Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 716if (Misc.GetScrollBarInfo(hwnd, idObject, ref sbi)) 738if (!Misc.GetScrollBarInfo(_hwnd, idObject, ref sbi)) 743return !Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE);
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (9)
216if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 225if (!Misc.GetScrollBarInfo(hwnd, idObject, ref sbi)) 235if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(parent._parent._hwnd))) 297if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 389if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 416if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(hwnd))) 516IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(_hwnd) : _hwnd; 544if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 565Misc.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd == _hwnd ? IntPtr.Zero : _hwnd));
MS\Internal\AutomationProxies\WindowsSlider.cs (17)
139if (Misc.PtInRect(ref rc, x, y)) 167IntPtr parent = Misc.GetParent(_hwnd); 178Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 255return (Misc.IsBitSet(WindowStyle, NativeMethods.TBS_VERT)); 260int value = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 265int maxValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 283Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val)); 290return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero); 298return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero); 306return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 314return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero); 408IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 409return Misc.GetItemToolTipText(_hwnd, hwndToolTip, 0); 439Misc.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero); 462if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcChannel, 2)) 474if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcThumb, 2)) 482if (Misc.IsLayoutRTL(hwnd))
MS\Internal\AutomationProxies\WindowsSpinner.cs (7)
60hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 66if (!Misc.ProxyGetClassName(hwndBuddy).Contains("EDIT", StringComparison.OrdinalIgnoreCase)) 272IntPtr hwndParent = Misc.GetParent(hwnd); 276IntPtr hwndChild = Misc.GetWindow(hwndParent, NativeMethods.GW_CHILD); 279string className = Misc.ProxyGetClassName(hwndChild); 282IntPtr hwndBuddy = Misc.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 288hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
MS\Internal\AutomationProxies\WindowsStatic.cs (6)
68string className = Misc.GetClassName(hwnd).ToLower(System.Globalization.CultureInfo.InvariantCulture); 88style = Misc.GetWindowStyle(hwnd) & NativeMethods.SS_TYPEMASK; 132return Misc.AccessKey(Misc.ProxyGetText(_hwnd)); 151return Misc.StripMnemonic(Misc.ProxyGetText(_hwnd));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (11)
141return Misc.ProxyGetText(_hwnd); 225if (Misc.PtInRect(ref rc, x, y)) 235if (Misc.PtInRect(ref rc, x, y)) 336return Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero); 356Misc.EnumChildWindows(hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindChildFromRect), (void*)&info); 364if (!Misc.GetClientRectInScreenCoordinates(hwnd, ref rc)) 596int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero); 797if (!Misc.GetClientRectInScreenCoordinates(hwnd, ref client)) 806if (Misc.IsLayoutRTL(hwnd)) 832int style = Misc.GetWindowStyle(hwnd); 833return Misc.IsBitSet(style, SBARS_SIZEGRIP) || WindowsGrip.IsGripPresent(hwnd, true);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (29)
78if (Misc.GetClassName(hwndParent).Contains("SysListView32", StringComparison.Ordinal)) 157if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 177int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 193return Misc.IsBitSet(WindowStyle, NativeMethods.HDS_VERT) ? OrientationType.Vertical : OrientationType.Horizontal; 247if (Misc.GetClassName(hwndParent).Contains("SysListView32", StringComparison.Ordinal)) 284Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 292return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.HDS_HIDDEN); 298return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 303return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 418return Misc.AccessKey(Text); 429IntPtr hwndParent = Misc.GetParent(_hwnd); 433if (Misc.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty) 435if (!Misc.IsItemVisible(ref parentRect, ref itemRect)) 451return Misc.StripMnemonic(Text); 481Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 482Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 523if (Misc.IsComctrlV6OnOsVerV6orHigher(_hwnd)) 525int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 573if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2)) 586if (Misc.IsLayoutRTL(_hwnd)) 648return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_BUTTONS)); 654return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_FILTERBAR)); 668return Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1); 693int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 724Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 725Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 734if (Misc.GetFocusedWindow().Equals(_hwnd)) 737IntPtr hwndDropDown = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "DropDown", null);
MS\Internal\AutomationProxies\WindowsTab.cs (51)
259if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref hti.pt, 1)) 268if (updownHwnd != IntPtr.Zero && Misc.PtInWindowRect(updownHwnd, x, y)) 290int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero); 355string sTitle = Misc.ProxyGetText(hwnd); 437return !Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS); 504int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 512Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 513Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 533int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 536int posResult = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 573if (!Misc.GetWindowRect(_hwnd, ref viewable)) 592if (!Misc.GetWindowRect(updownHwnd, ref rectW32)) 645int count = Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 687int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 691Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 692Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 724&& Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32")) 750IntPtr childHwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 759className = Misc.ProxyGetClassName(childHwnd); 766childHwnd = Misc.GetWindow(childHwnd, NativeMethods.GW_HWNDLAST); 781return Misc.IsBitSet(style, NativeMethods.TCS_MULTILINE) && 782(Misc.IsBitSet(style, NativeMethods.TCS_RIGHT) || 783Misc.IsBitSet(style, NativeMethods.TCS_VERTICAL)); 808int newPos = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 809int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 848Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 849Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 861return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_MULTISELECT)); 951return Misc.AccessKey(WindowsTabItem.GetItemText(_hwnd, _item)); 966IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 967return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 993if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_FOCUSNEVER)) 1003Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1103Misc.MouseClick(pt.x, pt.y); 1139Misc.MouseClick(pt.x, pt.y); 1147else if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS)) 1149Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero); 1181return Misc.IsBitSet(TCItem.dwState, NativeMethods.TCIS_BUTTONPRESSED); 1234return !fIsWinform ? Misc.StripMnemonic(sName) : sName; 1239return Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 1255return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item; 1277return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty; 1288if (Misc.IsBitSet(WindowStyle, (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_FOCUSNEVER))) 1297if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1299Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1300Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1306Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1319hwndParent = Misc.GetParent(hwndParent); 1330return Misc.FindWindowEx(hwndParent, IntPtr.Zero, null, sName); 1344tcitem.cchTextMax = Misc.MaxLengthNameProperty;
MS\Internal\AutomationProxies\WindowsTitleBar.cs (21)
57return Misc.GetTitleBarRect(_hwnd); 73return Misc.ProxyGetText(_hwnd); 111int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y)); 198Misc.ProxyGetTitleBarInfo(_hwnd, out ti); 205if (!Misc.IsBitSet(ti.rgstate[i], NativeMethods.STATE_SYSTEM_INVISIBLE) || i == _systemMenu) 219if (Misc.ProxyGetTitleBarInfo(hwnd, out ti)) 221return !Misc.IsBitSet(ti.rgstate[0], NativeMethods.STATE_SYSTEM_INVISIBLE); 286if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 296if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 317if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_DISABLED)) 322return Misc.IsBitSet(WindowExStyle, NativeMethods.WS_EX_CONTEXTHELP); 328if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 333return Misc.IsBitSet(style, NativeMethods.WS_MINIMIZEBOX); 340if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 345return Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZEBOX); 358Rect[] rects = Misc.GetTitlebarRects(_hwnd); 371if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 380if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 431Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero); 442Misc.ClearMenuMode(); 445Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (26)
212if (Misc.PtInRect(ref rc, x, y)) 228int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero); 257string name = Misc.ProxyGetText(_hwnd); 299if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 329return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero); 368bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0; 369int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero); 375if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_SEP)) 377else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_CHECK)) 380IntPtr hwndParent = Misc.GetParent(_hwnd); 381if(Misc.GetClassName(hwndParent) != "MSTaskSwWClass") 386else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_DROPDOWN) 387&& Misc.IsBitSet(exStyle, NativeMethods.TBSTYLE_EX_DRAWDDARROWS)) 428if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 460return Misc.AccessKey(Text); 468return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 492return Misc.StripMnemonic(Text); 514Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 576return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item; 598int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 635IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 636return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _idCommand); 643|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 650if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 668Misc.MouseClick(((int)boundingRectangle.Left + (int)boundingRectangle.Right) / 2, ((int)boundingRectangle.Top + (int)boundingRectangle.Bottom) / 2); 677if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
73if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 79if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (15)
173string className = Misc.ProxyGetClassName(hwnd); 182string className = Misc.ProxyGetClassName(_hwnd); 195return Misc.ProxyGetText(_hwnd); 234if (!Misc.GetCursorPos(ref pt)) 247Rect[] rects = Misc.GetTitlebarRects(hwnd); 265if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 274if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 283return Misc.ProxyGetText(hwnd); 293if (!Misc.GetCursorPos(ref pt)) 304int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 309if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MINIMIZE)) 315if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MAXIMIZE)) 334return Misc.ProxyGetText(hwnd);
MS\Internal\AutomationProxies\WindowsTreeView.cs (34)
406return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0; 412return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0; 420return (Misc.IsBitSet(expanded, NativeMethods.TVIS_EXPANDED)); 431if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0) 437fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0; 518return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem); 524return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask)); 564return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty; 584treeItem.cchTextMax = Misc.MaxLengthNameProperty; 595IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item); 606if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1) 609Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero); 617Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero); 643IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 654int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 812if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 && Misc.IsWindowInGivenProcess(_hwnd, "explorer")) 847if (!Misc.IsItemVisible(_hwnd, ref itemRect)) 863IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 864return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 900if (!parentRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 1224Misc.SetFocus(_hwnd); 1228Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem); 1281int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED)); 1283return Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED); 1397state = Misc.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked; 1445state = Misc.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked; 1465if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1474return Misc.IsBitSet(WindowStyle, NativeMethods.TVS_EDITLABELS); 1482if (Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED)) 1494bool isCheckbox = Misc.IsBitSet(WindowStyle, NativeMethods.TVS_CHECKBOXES); 1537Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1538Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1600if (!Misc.ReadProcessMemory(hProcess, pAddress, new IntPtr(&ent), new IntPtr(readSize), out count)) 1636int childId = Misc.ProxySendMessageInt(_hwnd, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (19)
186if (Misc.PtInRect(ref rc, x, y)) 223Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0)); 226Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 294return Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32"); 340int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 353IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 358hwndBuddy = Misc.GetParent(hwnd); 368return hwndBuddy != IntPtr.Zero && Misc.ProxyGetClassName(hwndBuddy).Contains("EDIT", StringComparison.OrdinalIgnoreCase); 377int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 391int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 523if (IsHorizontal(_hwnd) && Misc.IsLayoutRTL(_hwnd)) 532if (!Misc.GetWindowRect(_hwnd, ref updownRect)) 542Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center); 543Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center); 560if (!Misc.GetWindowRect(hwnd, ref updownRect)) 569if (fHorz && Misc.IsLayoutRTL(hwnd)) 625hwndParent = Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero; 633return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.UDS_HORZ);
MS\Internal\AutomationProxies\WinEventTracker.cs (9)
164if (Misc.IsCriticalException(e)) 174hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); 183Misc.UnhookWinEvent(hp._winEventHook); 266if (Misc.IsCriticalException(e)) 311if (Misc.IsCriticalException(e)) 326if (Misc.IsCriticalException(e)) 359if (Misc.GetWindowThreadProcessId(hwnd, out processId) == 0) 475return Misc.ProxyGetClassName(Process.GetProcessById(processId).MainWindowHandle).Equals("ConsoleWindowClass"); 479if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\WinFormsSpinner.cs (6)
37text = Misc.ProxyGetText(hwndEdit); 129IntPtr hwndFirstChild = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 136IntPtr hwndLastChild = Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDLAST); 143if (Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDNEXT) != hwndLastChild) 154if (Misc.ProxyGetClassName(hwndLastChild).Contains("Edit", StringComparison.OrdinalIgnoreCase)) 162if (Misc.ProxyGetClassName(hwndFirstChild).Contains("Edit", StringComparison.OrdinalIgnoreCase))