830 references to Misc
UIAutomationClientSideProviders (830)
MS\Internal\AutomationProxies\Accessible.cs (5)
167IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject)); 715return Misc.IsBitSet((int)state, (int)testState); 1123if (Misc.IsCriticalException(e) && ! (e is NullReferenceException)) 1298if (Misc.IsCriticalException(e) && ! (e is NullReferenceException)) 1333if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\ClickablePoint.cs (9)
23_hwndProgman = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null); 63for (hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT)) 77hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDPREV); 87if (Misc.IsBitSet(Misc.GetWindowStyle(hwndCurrent), NativeMethods.WS_POPUP)) 94hwnd = Misc.GetParent(hwndCurrent); 244if (!Misc.GetWindowRect(hwnd, ref rc)) 262int lr = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (6)
43SetHandle(Misc.VirtualAllocEx(_processHandle, IntPtr.Zero, new UIntPtr((uint)cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE)); 55return Misc.VirtualFreeEx(_processHandle, handle, UIntPtr.Zero, UnsafeNativeMethods.MEM_RELEASE); 79Misc.WriteProcessMemory(_processHandle, handle, sourceAddress, cbSize, out count); 85Misc.ReadProcessMemory(_processHandle, remoteAddress, destAddress, cbSize, out count); 91Misc.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count); 96Misc.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count);
MS\Internal\AutomationProxies\CommonXSendMessage.cs (14)
107IntPtr result = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 196if (Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address) == IntPtr.Zero) 237IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 284IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam)); 340IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem1.Address, rmem2.Address); 381int res = Misc.ProxySendMessageInt(hwnd, uMsg, wParam, rmem.Address); 984if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref clientPoint, 1)) 1188if (Misc.ProxySendMessageInt(hwnd, msg, new IntPtr(index), remoteMem.Address) != 0) 1191Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2); 1257if (Misc.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero) 1367if (Misc.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1415if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1463if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1494if (!Misc.IsWow64Process(hProcess, out isWOW64Process))
MS\Internal\AutomationProxies\EventManager.cs (3)
449int style = Misc.GetWindowStyle(hwnd); 452if (Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZE)) 456else if (Misc.IsBitSet(style, NativeMethods.WS_MINIMIZE))
MS\Internal\AutomationProxies\Input.cs (1)
166Misc.SendInput(1, ref ki, Marshal.SizeOf(ki));
MS\Internal\AutomationProxies\Misc.cs (10)
381IntPtr hwndParent = Misc.GetParent(hwnd); 396int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero); 1230if (!Misc.ProxyGetTitleBarInfo(hwnd, out ti) || ti.rcTitleBar.IsEmpty) 1240if(Misc.IsControlRTL(hwnd)) 1876int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 1929tool.hwnd = Misc.GetParent(lParam.hwnd); 1994if (!Misc.ProxyGetTitleBarInfo(hwnd, out tiDL)) 2018if (Misc.IsLayoutRTL(hwnd)) 2026leftEdge = (int)(Misc.GetTitleBarRect(hwnd).Left); 2065if (!Misc.ProxyGetTitleBarInfoEx(hwnd, out ti))
MS\Internal\AutomationProxies\MSAANativeProvider.cs (10)
161int index = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 367string className = Misc.GetClassName(_hwnd); 459Misc.SetFocus(_hwnd); 623Misc.SetFocus(_hwnd); 637Misc.SetFocus(_hwnd); 651Misc.SetFocus(_hwnd); 926Misc.GetWindowThreadProcessId(_hwnd, out pid); 1063string className = Misc.GetClassName(hwnd); 1203Misc.SetFocus(_hwnd); 1211if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\MSAAWinEventWrap.cs (4)
80_hHooks[0] = Misc.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc, 0, 0, _fFlags); 100Misc.UnhookWinEvent(_hHooks[i]); 142if (Misc.IsCriticalException(e)) 159if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\NonClientArea.cs (14)
115System.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)); 124Misc.GetClientRectInScreenCoordinates(hwnd, ref clientRect) 125&& Misc.GetWindowRect(hwnd, ref windowRect) 215int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 471if (Misc.ProxyGetClassName(_hwnd) == "SysListView32") 483if (Misc.ProxyGetClassName(_hwnd) == "SysListView32") 508if (Misc.IsBitSet(style, NativeMethods.WS_VSCROLL) && Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) 530if (!Misc.IsBitSet(style, NativeMethods.WS_CHILD)) 585if (Misc.IsLayoutRTL(_hwnd)) 661if (Misc.GetClassName(hwnd) == "ComboLBox") 730if (Misc.GetClassName(hwnd) == "ComboLBox") 747int style = Misc.GetWindowStyle(hwnd); 748if (Misc.IsBitSet(style, NativeMethods.WS_CHILD))
MS\Internal\AutomationProxies\ProxyFragment.cs (1)
219if (fragment == fromPoint || Misc.Compare(fragment, fromPoint))
MS\Internal\AutomationProxies\ProxyHwnd.cs (15)
187IntPtr label = Misc.GetLabelhwnd(_hwnd); 188name = Misc.GetControlName(label, true); 196name = Misc.ProxyGetText(_hwnd); 221_controlLabel = Misc.GetLabelhwnd(_hwnd); 239IntPtr hwndParent = Misc.GetParent(_hwnd); 246if (Misc.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty) 250if (!itemRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 266int idChild = Misc.GetWindowId(_hwnd); 267string text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, idChild); 270text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, 0); 479if (!Misc.GetClientRect(hwnd, ref rc)) 484if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 506IntPtr label = Misc.GetLabelhwnd(hwnd); 509string labelText = Misc.ProxyGetText(label); 512accessKey = Misc.AccessKey(labelText);
MS\Internal\AutomationProxies\ProxySimple.cs (14)
103if (!Misc.GetWindowRect(_hwnd, ref controlRectangle)) 134return Misc.AppendToRuntimeId(GetParent().GetRuntimeId(), _item); 210return Misc.IsEnabled(_hwnd); 221Misc.GetWindowThreadProcessId(_hwnd, out pid); 243return Misc.GetFocusedWindow() == _hwnd ? IsFocused() : false; 274if (Misc.GetFocusedWindow() == _hwnd && IsFocused()) 289if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_TABSTOP)) 328if (!parentRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 346string sRawName = Misc.GetControlName(_hwnd, false); 348return string.IsNullOrEmpty(sRawName) ? null : Misc.AccessKey(sRawName); 585Misc.GetClientRectInScreenCoordinates(_hwnd, ref rcOutside); 587if (!Misc.IntersectRect(ref rcItem, ref rcOutside, ref rcItem)) 670return Misc.GetWindowStyle(_hwnd); 679return Misc.GetWindowExStyle(_hwnd);
MS\Internal\AutomationProxies\QueueProcessor.cs (3)
107Misc.DispatchMessage(ref msg); 123int result = Misc.MsgWaitForMultipleObjects(handle, false, NativeMethods.INFINITE, NativeMethods.QS_ALLINPUT); 132if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\SafeProcessHandle.cs (3)
29Misc.GetWindowThreadProcessId(hwnd, out processId); 33SetHandle(Misc.OpenProcess(NativeMethods.PROCESS_QUERY_INFORMATION | NativeMethods.PROCESS_VM_OPERATION | NativeMethods.PROCESS_VM_READ | NativeMethods.PROCESS_VM_WRITE, false, processId, hwnd)); 45return Misc.CloseHandle(handle);
MS\Internal\AutomationProxies\WindowsAltTab.cs (6)
133if (Misc.MapWindowPoints(System.IntPtr.Zero, _hwnd, ref pt, 1)) 137if(Misc.GetClientRect(_hwnd, ref clientRect)) 139if (Misc.PtInRect(ref clientRect, pt.x, pt.y)) 256Misc.ThrowWin32ExceptionsIfError(lastWin32Error); 348return GetBoundingRect().ToRect(Misc.IsControlRTL(_hwnd)); 393if(!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (30)
105style = Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK; 191int state = Misc.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero); 192if (Misc.IsBitSet(state, NativeMethods.BST_PUSHED) 258return Misc.AccessKey(Misc.ProxyGetText(_hwnd)); 332new WindowsButton(hwndRadioButton, null, ButtonType.RadioButton, Misc.GetWindowStyle(hwndRadioButton) & NativeMethods.BS_TYPEMASK, accRadioButton) 393IntPtr hwndParent = Misc.GetParent(_hwnd); 404return new WindowsButton(hwndParent, null, ButtonType.GroupBox, Misc.GetWindowStyle(hwndParent) & NativeMethods.BS_TYPEMASK, accParent); 474Misc.SetFocus(_hwnd); 498Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 512Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 519Misc.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true); 541IntPtr hwndShell = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null); 553if (!Misc.GetClassName(_hwnd).Equals("Button")) 561return Misc.InTheShellProcess(_hwnd) && UnsafeNativeMethods.GetProp(_hwnd, "StartButtonTag") == new IntPtr(304); 565IntPtr hwndParent = Misc.GetParent(_hwnd); 568if (Misc.GetClassName(hwndParent).Equals("Shell_TrayWnd")) 579if (!Misc.GetClassName(_hwnd).Equals("Button")) 584IntPtr hwndParent = Misc.GetParent(_hwnd); 587if (Misc.GetClassName(hwndParent).Equals("Desktop More Programs Pane")) 605if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_CHILD)) 607hwndParent = Misc.GetParent(hwndRoot); 611hwndParent = Misc.GetWindow(hwndRoot, NativeMethods.GW_OWNER); 644int state = Misc.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero); 645if (Misc.IsBitSet(state, NativeMethods.BST_CHECKED)) 649else if (Misc.IsBitSet(state, NativeMethods.BST_INDETERMINATE)) 669Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound); 698return Misc.StripMnemonic(Misc.ProxyGetText(_hwnd)); 707Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton);
MS\Internal\AutomationProxies\WindowsComboBox.cs (35)
130if (!Misc.GetWindowRect(cbInfo.hwndList, ref rcList)) 134if (!Misc.UnionRect(out rcCombo, ref rcCombo, ref rcList)) 141return rcCombo.ToRect(Misc.IsControlRTL(_hwnd)); 150if (Misc.GetClassName(_hwnd).Equals("Internet Explorer_TridentCmboBx")) 192return Misc.GetControlName(Misc.GetLabelhwnd(_hwndEx), true); 255if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 257if (Misc.PtInRect(ref cbInfo.rcButton, x, y)) 268if (Misc.GetWindowRect(cbInfo.hwndList, ref rcList) && 269Misc.PtInRect(ref rcList, x, y)) 372Misc.CheckEnabled(_hwnd); 387IntPtr hwndParent = Misc.GetParent(_hwnd); 390int id = Misc.GetWindowId(_hwnd); 393Misc.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam, _hwnd); 440Misc.CheckEnabled(_hwnd); 454Misc.CheckEnabled(_hwnd); 521bool result = Misc.GetComboBoxInfo(hwnd, ref cbInfo); 538cbInfo.hwndItem = Misc.FindWindowEx(hwnd, IntPtr.Zero, "EDIT", null); 541result = Misc.GetWindowRect(cbInfo.hwndItem, ref cbInfo.rcItem); 544result = Misc.MapWindowPoints(_hwndDesktop, hwnd, ref cbInfo.rcItem, 2); 560return Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0; 565IntPtr hwndFocused = Misc.GetFocusedWindow(); 573Misc.SetFocus(hwnd); 575Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 580Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 628return Misc.ProxyGetText(IsComboBoxEx32() ? _hwndEx : _hwnd); 636return (Misc.GetWindowStyle(hwnd) & NativeMethods.CBS_COMBOTYPEMASK); 677return string.Equals(Misc.GetClassName(hwndEx), ComboboxEx32, StringComparison.OrdinalIgnoreCase); 696index = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 703int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 710if (Misc.GetClassName(hwnd).Equals("Internet Explorer_TridentCmboBx")) 721return Misc.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len); 765if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && Misc.IsBitSet(NativeMethods.STATE_SYSTEM_PRESSED, cbInfo.stateButton)) 924if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 951Misc.CheckEnabled(_hwnd);
MS\Internal\AutomationProxies\WindowsContainer.cs (11)
28string className = Misc.ProxyGetClassName(hwnd); 128return Misc.IsBitSet(style, NativeMethods.WS_CAPTION) || 129Misc.IsBitSet(style, NativeMethods.WS_POPUP); 134int style = Misc.GetWindowStyle(hwnd); 135int exstyle = Misc.GetWindowExStyle(hwnd); 137return Misc.IsBitSet(style, NativeMethods.DS_CONTROL) && 138Misc.IsBitSet(style, NativeMethods.WS_CHILD) && 139Misc.IsBitSet(exstyle, NativeMethods.WS_EX_CONTROLPARENT); 166string dlgName = Misc.ProxyGetText(hwnd); 173IntPtr hwndParent = Misc.GetParent(hwnd); 179hwndTab = Misc.FindWindowEx(hwndParent, IntPtr.Zero, "SysTabControl32", null);
MS\Internal\AutomationProxies\WindowsEditBox.cs (40)
151hwnd = Misc.GetParent(hwnd)) 266Misc.CheckEnabled(_hwnd); 270if (Misc.IsBitSet(styles, NativeMethods.ES_READONLY)) 276if (Misc.IsBitSet(styles, NativeMethods.ES_NUMBER)) 290int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 298result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 352if (!Misc.MapWindowPoints(IntPtr.Zero, WindowHandle, ref clientLocation, 1)) 361if (!Misc.GetClientRect(WindowHandle, ref clientRect)) 444int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam); 493int style = Misc.GetWindowStyle(hwnd); 496if (Misc.IsBitSet(style, NativeMethods.ES_PASSWORD)) 500else if (Misc.IsBitSet(style, NativeMethods.ES_MULTILINE)) 504else if (Misc.IsBitSet(style, NativeMethods.ES_AUTOHSCROLL)) 516return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 523return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 529IntPtr result = Misc.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero); 546return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero); 555if (Misc.GetObjectW(hfont, cb, ref logfont) != cb) 566Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect); 574Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETSEL, out start, out end); 580return Misc.ProxyGetText(_hwnd, GetTextLength()); 586return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero); 596if (Misc.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty) 672return (!SafeNativeMethods.IsWindowEnabled(WindowHandle) || Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 681return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero); 687int index = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero); 694return 0 != Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical); 702if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_VSCROLL)) 708bool ok = Misc.GetScrollInfo(WindowHandle, NativeMethods.SB_VERT, ref si); 719if (Misc.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty) 741int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero); 802Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end); 810return Misc.ProxyGetText(hwnd); 851IntPtr hdc = Misc.GetDC(_hwnd); 861oldFont = Misc.SelectObject(hdc, hfont); 862return Misc.GetTextExtentPoint32(hdc, text, text.Length, out size); 868Misc.SelectObject(hdc, oldFont); 871Misc.ReleaseDC(_hwnd, hdc); 929string classname = Misc.GetClassName(hwndParent); 945string classname = Misc.GetClassName(hwndParent);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (15)
83Misc.SetFocus(_provider._hwnd); 245if (!Misc.MapWindowPoints(_provider.WindowHandle, IntPtr.Zero, ref w32point, 1)) 285return Misc.RectArrayToDoubleArray(rectArray); 304Misc.SetFocus(_provider._hwnd); 358Misc.SetFocus(_provider._hwnd); 422Misc.SetFocus(_provider._hwnd); 441Misc.SetFocus(_provider._hwnd); 458Misc.SetFocus(_provider._hwnd); 481Misc.SetFocus(_provider._hwnd); 487if (Misc.IsReadingRTL(_provider._hwnd)) 728if (Misc.IsBitSet(style, NativeMethods.ES_CENTER)) 732else if (Misc.IsBitSet(style, NativeMethods.ES_RIGHT)) 745return Misc.IsBitSet(style, NativeMethods.ES_UPPERCASE) ? CapStyle.AllCap : CapStyle.None; 773IntPtr hdc = Misc.GetDC(IntPtr.Zero); 779Misc.ReleaseDC(IntPtr.Zero, hdc);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (9)
51return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 85return new WindowsButton(hwnd, null, WindowsButton.ButtonType.CheckBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 88return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 91return new WindowsButton(hwnd, null, WindowsButton.ButtonType.PushButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 94return new WindowsButton(hwnd, null, WindowsButton.ButtonType.RadioButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 131return IsWindowsFormsControl(Misc.GetClassName(hwnd)); 155if (XSendMessage.XSend(hwnd, WM_GETCONTROLNAME, new IntPtr(Misc.MaxLengthNameProperty), ref winFormsID, Misc.MaxLengthNameProperty)) 196private static int WM_GETCONTROLNAME = Misc.RegisterWindowMessage("WM_GETCONTROLNAME");
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (3)
99Misc.SetFocus(_hwnd); 126Misc.SetFocus(_hwnd); 131Misc.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsGrip.cs (6)
51if (Misc.GetClientRectInScreenCoordinates(_hwnd, ref client)) 55if (Misc.IsLayoutRTL(_hwnd)) 84if (!Misc.GetClientRectInScreenCoordinates(hwnd, ref client)) 104if (Misc.IsLayoutRTL(hwnd)) 108int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 116int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsHyperlink.cs (7)
116return Misc.StripMnemonic(RemoveHTMLAnchorTag(Misc.ProxyGetText(_hwnd))); 201if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 239if (Misc.IsBitSet(_linkItem.state, NativeMethods.LIS_FOCUSED)) 440if (!Misc.GetWindowRect(_hwnd, ref BoundingRect)) 508Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 509Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (10)
138Misc.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4)); 153return Misc.ProxyGetText(_hwnd, IP_ADDRESS_STRING_LENGTH); 161return !Misc.IsEnabled(_hwnd); 243IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 252hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 260IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 263hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 351return Misc.ProxyGetText(_hwnd); 381Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture))); 476return WindowsIPAddress.Create(Misc.GetParent(_hwnd), 0, 0);
MS\Internal\AutomationProxies\WindowsListBox.cs (36)
66int style = Misc.GetWindowStyle(hwnd); 73if (Misc.IsBitSet(style, NativeMethods.LBS_COMBOBOX)) 291Misc.GetClientRectInScreenCoordinates(_hwnd, ref listboxrect); 292if (Misc.PtInRect(ref listboxrect, x, y)) 294int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top)); 309int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero); 384return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0; 434return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero); 524if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LBS_COMBOBOX)) 565int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero); 606return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 729int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 733if (Misc.GetClassName(_hwnd).Equals("Internet Explorer_TridentLstBox")) 744string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen); 942Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 988return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 997SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item)); 1001SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1016return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR; 1041return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item; 1045return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1062Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect); 1063return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty; 1117Misc.MouseClick(pt.x, pt.y); 1131Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item)); 1136Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1146int listBoxStyle = Misc.GetWindowStyle(_hwnd); 1147if (Misc.IsBitSet(listBoxStyle, NativeMethods.LBS_NOTIFY)) 1150int idListBox = Misc.GetWindowId(_hwnd); 1154IntPtr hwndListBoxParent = Misc.GetParent(_hwnd); 1157Misc.ProxySendMessageInt( 1166Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1170int id = Misc.GetWindowId(_hwnd); 1174Misc.ProxySendMessageInt(combo._hwnd, NativeMethods.WM_COMMAND, wParam, _hwnd); 1190return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (42)
416if (Misc.PtInRect(ref rc, x, y)) 890return (Misc.IsBitSet(state, NativeMethods.LVIS_FOCUSED)); 1181return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_REPORT); 1211return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1239return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags)); 1250return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero); 1256return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1)); 1262return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_SCROLL, dx, dy) != 0; 1275return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1285return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0; 1309return Misc.IsBitSet(GetItemState(hwnd, listItem, NativeMethods.LVIS_SELECTED), NativeMethods.LVIS_SELECTED); 1315return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_EDITLABELS); 1349return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1355return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_ONECLICKACTIVATE); 1361return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_SINGLESEL); 1367return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_NOSCROLL); 1375return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0; 1381return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 1387item.cchTextMax = Misc.MaxLengthNameProperty; 1413if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref hitTest.pt, 1)) 1420if (Misc.IsComctrlV6OnOsVerV6orHigher(hwnd)) 1451return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1457return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_CHECKBOXES); 1471return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_AUTOARRANGE); 1477return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_FULLROWSELECT); 1483return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_JUSTIFYCOLUMNS); 1498return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1507IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1509return Misc.GetItemToolTipText(hwnd, hwndToolTip, 0); 1646string className = Misc.GetClassName(Misc.GetParent(_hwnd)); 1670if (!Misc.GetScrollBarInfo(_hwnd, scrollBar, ref scrollBarInfo) || 1686if (!Misc.GetScrollInfo(_hwnd, sbFlag, ref si) || 1786return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_LIST); 1799return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref pt, 1); 1809return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero); 1815return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask)); 1837if (Misc.PtInWindowRect(hwndHeader, x, y))
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (6)
36_isComctrlV6OnOsVerV6orHigher = Misc.IsComctrlV6OnOsVerV6orHigher(hwnd); 100group.cchHeader = Misc.MaxLengthNameProperty; 111group.cchHeader = Misc.MaxLengthNameProperty; 329int 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); 703Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2); 712if (!Misc.GetWindowRect(_hwnd, ref rcLv)) 746if (Misc.IsControlRTL(_hwnd)) 814if (Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_VSCROLL, ref sbi))
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (3)
77Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2); 107group.cchSubsetTitle= Misc.MaxLengthNameProperty; 122Misc.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (12)
48_isComctrlV6OnOsVerV6orHigher = Misc.IsComctrlV6OnOsVerV6orHigher(hwnd); 138if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRectangle, 2)) 343if (!checkboxRectangle.IsEmpty && Misc.PtInRect(ref checkboxRectangle, x, y)) 368int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero); 758Misc.SetFocus(hwnd); 858if (Misc.GetWindowRect(hwndHeader, ref headerRect) 859&& Misc.GetClientRectInScreenCoordinates(_hwnd, ref listViewRect)) 867&& !Misc.IsItemVisible(ref listViewRect, ref itemRect)) 933if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 957Misc.MouseClick(clickPoint.x, clickPoint.y, !WindowsListView.ListViewSingleClickActivate(_hwnd)); 976Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode)); 977Misc.ProxySendMessage(hwnd, NativeMethods.WM_KEYUP, key, keyUpLParam);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (10)
80if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 111return name.Length < Misc.MaxLengthNameProperty ? name : name.Substring(0, Misc.MaxLengthNameProperty); 153if (!Misc.GetWindowRect(hwnd, ref controlRectangle)) 187if(Misc.IsControlRTL(hwnd)) 245Misc.SetFocus(_hwnd); 250if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 253Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 254Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewItemStartMenu.cs (1)
98if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (3)
57if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 79Misc.SetScrollPos(_hwnd, _sbFlag, pos, true); 108if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si))
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (9)
99if (Misc.IsControlRTL(_hwnd)) 114if (Misc.IsControlRTL(_hwnd)) 143if (!Misc.IsItemVisible(ref parentRect, ref itemRect)) 173if (Misc.GetClassName(ancestor) == "Desktop Search Open View") 177ancestor = Misc.GetParent(ancestor); 200return name.Length < Misc.MaxLengthNameProperty ? name : name.Substring(0, Misc.MaxLengthNameProperty); 373if (Misc.IsComctrlV6OnOsVerV6orHigher(_hwnd)) 375int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (78)
214if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 231if (!Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 237hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 293if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE)) 302else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_POPUPMENUMODE)) 308else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 509bool result = Misc.GetMenuBarInfo(hwnd, idObject, idItem, ref mbi); 594if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 617for (IntPtr hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndMenu, WindowsMenu.MenuClassName, null); 619hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndPossibleParent, WindowsMenu.MenuClassName, null)) 645for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 647hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, MenuClassName, null)) 672if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER)) 685int count = Misc.GetMenuItemCount(hmenuPossibleParent); 710return Misc.GetMenuItemCount(_hmenu); 720return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero); 733if (Misc.ProxyGetGUIThreadInfo(0, out gui)) 735return Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE); 816if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd))) 821if (!Misc.ProxyGetTitleBarInfo(_hwnd, out ti)) 883Misc.IsBitSet(mbi.focusFlags, 3)) 901if (Misc.ProxyGetGUIThreadInfo(0, out gui)) 915return string.Equals(Misc.ProxyGetClassName(hwnd), WindowsMenu.MenuClassName, StringComparison.OrdinalIgnoreCase); 920int count = Misc.GetMenuItemCount(hmenu); 924if (Misc.IsBitSet(state, NativeMethods.MF_HILITE)) 937hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 1088if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 1260if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd))) 1265if (!Misc.ProxyGetTitleBarInfo(_hwnd, out ti)) 1280if (Misc.GetMenuItemRect(_hwnd, _hmenu, _item, out rc)) 1312menuRawText = Misc.StripMnemonic(menuRawText); 1389if (!Misc.IsEnabled(_hwnd)) 1444if (Misc.InMenuMode()) 1446IntPtr hwndFocus = Misc.GetFocusedWindow(); 1459if (!Misc.InMenuMode() && !MenuMode(true)) 1466if (!Misc.InMenuMode()) 1513while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 1545return Misc.AccessKey(Text); 1653if (Misc.PtInRect(ref rc, x, y)) 1871return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); 1886return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED); 1895if (!Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 1900return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero); 1910if (!Misc.GetMenuItemInfo(hmenu, position, true, ref menuItemInfo)) 1915return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1916Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1917Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)); 1954if (Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 1961if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1962Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1963Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 1983IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 2093for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowsMenu.MenuClassName, null); 2095hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, WindowsMenu.MenuClassName, null)) 2124Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' ')); 2151int childIndex = (returnFirstChild) ? 0 : Misc.GetMenuItemCount(hSubmenu) - 1; 2199int cItems = Misc.GetMenuItemCount(_hmenu); 2202for (item = 0; item < cItems && !Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++) 2246if (Misc.ProxyGetGUIThreadInfo(0, out gui) && _hwnd == gui.hwndActive) 2251if (gui.hwndCapture != IntPtr.Zero && Misc.ProxyGetClassName(gui.hwndCapture) == "ListBox") 2262return Misc.SetFocus(_hwnd); 2272while (Misc.InMenuMode() != fInMenuMode && (dwDelta = SubtractTicks(SafeNativeMethods.GetTickCount(), dwTicks)) < WindowsMenu.TimeOut) 2284if (Misc.InMenuMode() == fSet) 2337while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 2357int c = Misc.GetMenuItemCount(_hmenu); 2368if (Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE)) 2403Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP)) 2562if (Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 2564if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 2565Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 2566Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 2570else if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_OWNERDRAW)) 2602if (!Misc.ReadProcessMemory(hProcess, dwItemData, new IntPtr(&msaaMenuInfo), new IntPtr(readSize), out count)) 2625if (Misc.ReadProcessMemory(hProcess, msaaMenuInfo.pszWText, new IntPtr(text), new IntPtr(readSize), out count)) 2656return !(Misc.IsBitSet(state, NativeMethods.MF_DISABLED) | Misc.IsBitSet(state, NativeMethods.MF_GRAYED)); 2680if (nextItem < Misc.GetMenuItemCount(_hmenu)) 2737menuRawText = Misc.StripMnemonic(Text);
MS\Internal\AutomationProxies\WindowsProgressbar.cs (3)
155int cur = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 156int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero); 157int max = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (10)
124if (!Misc.GetWindowRect(_hwnd, ref rebarRect)) 194return Misc.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero); 287IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 288return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 345if (hwndBand != IntPtr.Zero && Misc.PtInWindowRect(hwndBand, x, y)) 378Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero); 404if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2)) 411if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), (int)CommonControlStyles.CCS_VERT)) 417return rectW32.ToRect(Misc.IsControlRTL(hwnd));
MS\Internal\AutomationProxies\WindowsRichEdit.cs (11)
168if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)) 174if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(_hwnd)) 189int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 196result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 359while (!gotPoint || !Misc.PtInRect(ref rect, x, y)) 373while (gotPoint && Misc.PtInRect(ref rect, x, y) && rangeAdjust.Start != rangeAdjust.End) 387while (!gotPoint || !Misc.PtInRect(ref rect, x, y)) 407} while (gotPoint && Misc.PtInRect(ref rect, x, y)); 461Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 561return Misc.ProxyGetText(_hwnd); 681return Misc.GetClassName(hwndParent).Equals("MsoCommandBar");
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (8)
68Misc.SetFocus(_pattern._hwnd); 174Misc.GetClientRectInScreenCoordinates(_pattern.WindowHandle, ref w32rect); 209return Misc.RectArrayToDoubleArray(rectArray); 257Misc.SetFocus(_pattern._hwnd); 275Misc.SetFocus(_pattern._hwnd); 307Misc.SetFocus(_pattern._hwnd); 329Misc.SetFocus(_pattern._hwnd); 353Misc.SetFocus(_pattern._hwnd);
MS\Internal\AutomationProxies\WindowsScroll.cs (21)
112int style = Misc.GetWindowStyle(hwnd); 114if ((sbFlag == NativeMethods.SB_HORZ && !Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) || 115(sbFlag == NativeMethods.SB_VERT && !Misc.IsBitSet(style, NativeMethods.WS_VSCROLL))) 120if (!Misc.IsEnabled(hwnd)) 131if (Misc.GetScrollBarInfo(hwnd, scrollBarObjectId, ref sbi)) 134!Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE); 147if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 157int style = Misc.GetWindowStyle(hwnd); 159bool hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.WS_HSCROLL) || Misc.IsBitSet(style, NativeMethods.WS_VSCROLL); 161string className = Misc.ProxyGetClassName(hwnd); 166hasScrollableStyle = 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)) 294if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || 317bool fRet = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero) == 0; 319if (fRet && Misc.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos) 340} while (fRet && Misc.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos); 368if ((!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || 429int result = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (25)
143if (!Misc.GetScrollBarInfo(_hwnd, idObject, ref sbi)) 163if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_parent._hwnd))) 218return IsEnabled() && Misc.IsEnabled(_hwnd); 335if (Misc.PtInRect(ref rc, x, y)) 367return !Misc.IsEnabled(_hwnd) || !HasValuePattern(_hwnd, _sbFlag); 415return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_VSCROLL); 420return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_HSCROLL); 426return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.SBS_VERT); 438if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 452if (Misc.GetScrollBarInfo(hwnd, idObject, ref sbi)) 525if (_sbFlag != NativeMethods.SB_CTL || Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_CLIENT, ref sbi)) 559string classname = Misc.GetClassName(_hwnd); 576if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 587if ((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)
217if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 226if (!Misc.GetScrollBarInfo(hwnd, idObject, ref sbi)) 236if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(parent._parent._hwnd))) 298if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 390if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 417if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(hwnd))) 517IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(_hwnd) : _hwnd; 543if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 564Misc.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd == _hwnd ? IntPtr.Zero : _hwnd));
MS\Internal\AutomationProxies\WindowsSlider.cs (17)
140if (Misc.PtInRect(ref rc, x, y)) 168IntPtr parent = Misc.GetParent(_hwnd); 179Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 256return (Misc.IsBitSet(WindowStyle, NativeMethods.TBS_VERT)); 261int value = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 266int maxValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 284Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val)); 291return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero); 299return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero); 307return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 315return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero); 409IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 410return Misc.GetItemToolTipText(_hwnd, hwndToolTip, 0); 440Misc.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero); 463if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcChannel, 2)) 475if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcThumb, 2)) 483if (Misc.IsLayoutRTL(hwnd))
MS\Internal\AutomationProxies\WindowsSpinner.cs (7)
61hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 67if (Misc.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) == -1) 273IntPtr hwndParent = Misc.GetParent(hwnd); 277IntPtr hwndChild = Misc.GetWindow(hwndParent, NativeMethods.GW_CHILD); 280string className = Misc.ProxyGetClassName(hwndChild); 283IntPtr hwndBuddy = Misc.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 289hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
MS\Internal\AutomationProxies\WindowsStatic.cs (6)
69string className = Misc.GetClassName(hwnd).ToLower(System.Globalization.CultureInfo.InvariantCulture); 89style = Misc.GetWindowStyle(hwnd) & NativeMethods.SS_TYPEMASK; 134return Misc.AccessKey(Misc.ProxyGetText(_hwnd)); 153return Misc.StripMnemonic(Misc.ProxyGetText(_hwnd));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (11)
142return Misc.ProxyGetText(_hwnd); 226if (Misc.PtInRect(ref rc, x, y)) 236if (Misc.PtInRect(ref rc, x, y)) 337return 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)
79if (Misc.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0) 160if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 180int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 196return Misc.IsBitSet(WindowStyle, NativeMethods.HDS_VERT) ? OrientationType.Vertical : OrientationType.Horizontal; 250if (Misc.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0) 287Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 295return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.HDS_HIDDEN); 301return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 306return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 421return Misc.AccessKey(Text); 432IntPtr hwndParent = Misc.GetParent(_hwnd); 436if (Misc.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty) 438if (!Misc.IsItemVisible(ref parentRect, ref itemRect)) 454return Misc.StripMnemonic(Text); 487Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 488Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 529if (Misc.IsComctrlV6OnOsVerV6orHigher(_hwnd)) 531int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 579if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2)) 592if (Misc.IsLayoutRTL(_hwnd)) 654return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_BUTTONS)); 660return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_FILTERBAR)); 674return Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1); 699int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 733Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 734Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 743if (Misc.GetFocusedWindow().Equals(_hwnd)) 746IntPtr 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)
58return Misc.GetTitleBarRect(_hwnd); 74return Misc.ProxyGetText(_hwnd); 112int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y)); 199Misc.ProxyGetTitleBarInfo(_hwnd, out ti); 206if (!Misc.IsBitSet(ti.rgstate[i], NativeMethods.STATE_SYSTEM_INVISIBLE) || i == _systemMenu) 220if (Misc.ProxyGetTitleBarInfo(hwnd, out ti)) 222return !Misc.IsBitSet(ti.rgstate[0], NativeMethods.STATE_SYSTEM_INVISIBLE); 287if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 297if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 318if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_DISABLED)) 323return Misc.IsBitSet(WindowExStyle, NativeMethods.WS_EX_CONTEXTHELP); 329if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 334return Misc.IsBitSet(style, NativeMethods.WS_MINIMIZEBOX); 341if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 346return Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZEBOX); 359Rect[] rects = Misc.GetTitlebarRects(_hwnd); 372if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 381if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 432Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero); 443Misc.ClearMenuMode(); 446Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (26)
216if (Misc.PtInRect(ref rc, x, y)) 232int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero); 261string name = Misc.ProxyGetText(_hwnd); 303if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 333return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero); 372bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0; 373int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero); 379if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_SEP)) 381else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_CHECK)) 384IntPtr hwndParent = Misc.GetParent(_hwnd); 385if(Misc.GetClassName(hwndParent) != "MSTaskSwWClass") 390else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_DROPDOWN) 391&& Misc.IsBitSet(exStyle, NativeMethods.TBSTYLE_EX_DRAWDDARROWS)) 432if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 464return Misc.AccessKey(Text); 472return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 496return Misc.StripMnemonic(Text); 518Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 580return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item; 602int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 639IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 640return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _idCommand); 647|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 654if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 672Misc.MouseClick(((int)boundingRectangle.Left + (int)boundingRectangle.Right) / 2, ((int)boundingRectangle.Top + (int)boundingRectangle.Bottom) / 2); 681if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
74if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 80if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (15)
177string className = Misc.ProxyGetClassName(hwnd); 186string className = Misc.ProxyGetClassName(_hwnd); 199return Misc.ProxyGetText(_hwnd); 238if (!Misc.GetCursorPos(ref pt)) 251Rect[] rects = Misc.GetTitlebarRects(hwnd); 269if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 278if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 287return Misc.ProxyGetText(hwnd); 297if (!Misc.GetCursorPos(ref pt)) 308int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 313if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MINIMIZE)) 319if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MAXIMIZE)) 338return Misc.ProxyGetText(hwnd);
MS\Internal\AutomationProxies\WindowsTreeView.cs (34)
411return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0; 417return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0; 425return (Misc.IsBitSet(expanded, NativeMethods.TVIS_EXPANDED)); 436if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0) 442fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0; 523return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem); 529return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask)); 569return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty; 589treeItem.cchTextMax = Misc.MaxLengthNameProperty; 600IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item); 611if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1) 614Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero); 622Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero); 648IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 659int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 817if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 && Misc.IsWindowInGivenProcess(_hwnd, "explorer")) 852if (!Misc.IsItemVisible(_hwnd, ref itemRect)) 868IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 869return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 905if (!parentRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 1229Misc.SetFocus(_hwnd); 1233Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem); 1286int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED)); 1288return Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED); 1402state = Misc.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked; 1450state = Misc.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked; 1470if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1479return Misc.IsBitSet(WindowStyle, NativeMethods.TVS_EDITLABELS); 1487if (Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED)) 1499bool isCheckbox = Misc.IsBitSet(WindowStyle, NativeMethods.TVS_CHECKBOXES); 1542Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1543Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1605if (!Misc.ReadProcessMemory(hProcess, pAddress, new IntPtr(&ent), new IntPtr(readSize), out count)) 1641int childId = Misc.ProxySendMessageInt(_hwnd, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (19)
190if (Misc.PtInRect(ref rc, x, y)) 227Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0)); 230Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 298return Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32"); 344int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 357IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 362hwndBuddy = Misc.GetParent(hwnd); 372return hwndBuddy != IntPtr.Zero && Misc.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) != -1; 381int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 395int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 527if (IsHorizontal(_hwnd) && Misc.IsLayoutRTL(_hwnd)) 536if (!Misc.GetWindowRect(_hwnd, ref updownRect)) 546Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center); 547Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center); 564if (!Misc.GetWindowRect(hwnd, ref updownRect)) 573if (fHorz && Misc.IsLayoutRTL(hwnd)) 629hwndParent = Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero; 637return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.UDS_HORZ);
MS\Internal\AutomationProxies\WinEventTracker.cs (9)
169if (Misc.IsCriticalException(e)) 179hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); 188Misc.UnhookWinEvent(hp._winEventHook); 272if (Misc.IsCriticalException(e)) 317if (Misc.IsCriticalException(e)) 332if (Misc.IsCriticalException(e)) 370if (Misc.GetWindowThreadProcessId(hwnd, out processId) == 0) 486return Misc.ProxyGetClassName(Process.GetProcessById(processId).MainWindowHandle).Equals("ConsoleWindowClass"); 490if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\WinFormsSpinner.cs (6)
38text = Misc.ProxyGetText(hwndEdit); 130IntPtr hwndFirstChild = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 137IntPtr hwndLastChild = Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDLAST); 144if (Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDNEXT) != hwndLastChild) 155if (Misc.ProxyGetClassName(hwndLastChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1) 163if (Misc.ProxyGetClassName(hwndFirstChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1)