830 references to Misc
UIAutomationClientSideProviders (830)
MS\Internal\AutomationProxies\Accessible.cs (5)
163IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject)); 698return Misc.IsBitSet((int)state, (int)testState); 1098if (Misc.IsCriticalException(e) && ! (e is NullReferenceException)) 1273if (Misc.IsCriticalException(e) && ! (e is NullReferenceException)) 1308if (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)
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)
171Misc.SendInput(1, ref ki, Marshal.SizeOf(ki));
MS\Internal\AutomationProxies\Misc.cs (10)
378IntPtr hwndParent = Misc.GetParent(hwnd); 392int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero); 1223if (!Misc.ProxyGetTitleBarInfo(hwnd, out ti) || ti.rcTitleBar.IsEmpty) 1233if(Misc.IsControlRTL(hwnd)) 1856int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 1909tool.hwnd = Misc.GetParent(lParam.hwnd); 1974if (!Misc.ProxyGetTitleBarInfo(hwnd, out tiDL)) 1998if (Misc.IsLayoutRTL(hwnd)) 2006leftEdge = (int)(Misc.GetTitleBarRect(hwnd).Left); 2045if (!Misc.ProxyGetTitleBarInfoEx(hwnd, out ti))
MS\Internal\AutomationProxies\MSAANativeProvider.cs (10)
158int index = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 364string className = Misc.GetClassName(_hwnd); 456Misc.SetFocus(_hwnd); 620Misc.SetFocus(_hwnd); 634Misc.SetFocus(_hwnd); 648Misc.SetFocus(_hwnd); 923Misc.GetWindowThreadProcessId(_hwnd, out pid); 1060string className = Misc.GetClassName(hwnd); 1198Misc.SetFocus(_hwnd); 1206if (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]); 139if (Misc.IsCriticalException(e)) 156if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\NonClientArea.cs (14)
109System.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)); 118Misc.GetClientRectInScreenCoordinates(hwnd, ref clientRect) 119&& Misc.GetWindowRect(hwnd, ref windowRect) 209int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 465if (Misc.ProxyGetClassName(_hwnd) == "SysListView32") 477if (Misc.ProxyGetClassName(_hwnd) == "SysListView32") 502if (Misc.IsBitSet(style, NativeMethods.WS_VSCROLL) && Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) 524if (!Misc.IsBitSet(style, NativeMethods.WS_CHILD)) 579if (Misc.IsLayoutRTL(_hwnd)) 652if (Misc.GetClassName(hwnd) == "ComboLBox") 715if (Misc.GetClassName(hwnd) == "ComboLBox") 729int style = Misc.GetWindowStyle(hwnd); 730if (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)
182IntPtr label = Misc.GetLabelhwnd(_hwnd); 183name = Misc.GetControlName(label, true); 191name = Misc.ProxyGetText(_hwnd); 216_controlLabel = Misc.GetLabelhwnd(_hwnd); 234IntPtr hwndParent = Misc.GetParent(_hwnd); 241if (Misc.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty) 245if (!itemRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 261int idChild = Misc.GetWindowId(_hwnd); 262string text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, idChild); 265text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, 0); 474if (!Misc.GetClientRect(hwnd, ref rc)) 479if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 501IntPtr label = Misc.GetLabelhwnd(hwnd); 504string labelText = Misc.ProxyGetText(label); 507accessKey = Misc.AccessKey(labelText);
MS\Internal\AutomationProxies\ProxySimple.cs (14)
99if (!Misc.GetWindowRect(_hwnd, ref controlRectangle)) 130return Misc.AppendToRuntimeId(GetParent().GetRuntimeId(), _item); 206return Misc.IsEnabled(_hwnd); 217Misc.GetWindowThreadProcessId(_hwnd, out pid); 239return Misc.GetFocusedWindow() == _hwnd ? IsFocused() : false; 268if (Misc.GetFocusedWindow() == _hwnd && IsFocused()) 283if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_TABSTOP)) 322if (!parentRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 340string sRawName = Misc.GetControlName(_hwnd, false); 342return string.IsNullOrEmpty(sRawName) ? null : Misc.AccessKey(sRawName); 579Misc.GetClientRectInScreenCoordinates(_hwnd, ref rcOutside); 581if (!Misc.IntersectRect(ref rcItem, ref rcOutside, ref rcItem)) 664return Misc.GetWindowStyle(_hwnd); 673return Misc.GetWindowExStyle(_hwnd);
MS\Internal\AutomationProxies\QueueProcessor.cs (3)
109Misc.DispatchMessage(ref msg); 125int result = Misc.MsgWaitForMultipleObjects(handle, false, NativeMethods.INFINITE, NativeMethods.QS_ALLINPUT); 134if (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)
127if (Misc.MapWindowPoints(System.IntPtr.Zero, _hwnd, ref pt, 1)) 131if(Misc.GetClientRect(_hwnd, ref clientRect)) 133if (Misc.PtInRect(ref clientRect, pt.x, pt.y)) 250Misc.ThrowWin32ExceptionsIfError(lastWin32Error); 342return GetBoundingRect().ToRect(Misc.IsControlRTL(_hwnd)); 387if(!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)) 921if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 948Misc.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)) 710bool ok = Misc.GetScrollInfo(WindowHandle, NativeMethods.SB_VERT, ref si); 721if (Misc.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty) 743int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero); 804Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end); 812return Misc.ProxyGetText(hwnd); 853IntPtr hdc = Misc.GetDC(_hwnd); 863oldFont = Misc.SelectObject(hdc, hfont); 864return Misc.GetTextExtentPoint32(hdc, text, text.Length, out size); 870Misc.SelectObject(hdc, oldFont); 873Misc.ReleaseDC(_hwnd, hdc); 931string classname = Misc.GetClassName(hwndParent); 947string classname = Misc.GetClassName(hwndParent);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (15)
80Misc.SetFocus(_provider._hwnd); 242if (!Misc.MapWindowPoints(_provider.WindowHandle, IntPtr.Zero, ref w32point, 1)) 282return Misc.RectArrayToDoubleArray(rectArray); 301Misc.SetFocus(_provider._hwnd); 355Misc.SetFocus(_provider._hwnd); 419Misc.SetFocus(_provider._hwnd); 438Misc.SetFocus(_provider._hwnd); 455Misc.SetFocus(_provider._hwnd); 478Misc.SetFocus(_provider._hwnd); 484if (Misc.IsReadingRTL(_provider._hwnd)) 725if (Misc.IsBitSet(style, NativeMethods.ES_CENTER)) 729else if (Misc.IsBitSet(style, NativeMethods.ES_RIGHT)) 742return Misc.IsBitSet(style, NativeMethods.ES_UPPERCASE) ? CapStyle.AllCap : CapStyle.None; 770IntPtr hdc = Misc.GetDC(IntPtr.Zero); 776Misc.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)
96Misc.SetFocus(_hwnd); 123Misc.SetFocus(_hwnd); 128Misc.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)) 441if (!Misc.GetWindowRect(_hwnd, ref BoundingRect)) 509Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 510Misc.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)) 288Misc.GetClientRectInScreenCoordinates(_hwnd, ref listboxrect); 289if (Misc.PtInRect(ref listboxrect, x, y)) 291int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top)); 306int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero); 381return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0; 431return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero); 518if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LBS_COMBOBOX)) 556int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero); 597return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 720int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 724if (Misc.GetClassName(_hwnd).Equals("Internet Explorer_TridentLstBox")) 735string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen); 933Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 979return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 988SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item)); 992SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1007return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR; 1032return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item; 1036return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1053Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect); 1054return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty; 1108Misc.MouseClick(pt.x, pt.y); 1122Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item)); 1127Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1137int listBoxStyle = Misc.GetWindowStyle(_hwnd); 1138if (Misc.IsBitSet(listBoxStyle, NativeMethods.LBS_NOTIFY)) 1141int idListBox = Misc.GetWindowId(_hwnd); 1145IntPtr hwndListBoxParent = Misc.GetParent(_hwnd); 1148Misc.ProxySendMessageInt( 1157Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1161int id = Misc.GetWindowId(_hwnd); 1165Misc.ProxySendMessageInt(combo._hwnd, NativeMethods.WM_COMMAND, wParam, _hwnd); 1181return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (42)
413if (Misc.PtInRect(ref rc, x, y)) 887return (Misc.IsBitSet(state, NativeMethods.LVIS_FOCUSED)); 1178return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_REPORT); 1208return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1236return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags)); 1247return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero); 1253return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1)); 1259return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_SCROLL, dx, dy) != 0; 1272return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1282return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0; 1306return Misc.IsBitSet(GetItemState(hwnd, listItem, NativeMethods.LVIS_SELECTED), NativeMethods.LVIS_SELECTED); 1312return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_EDITLABELS); 1346return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1352return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_ONECLICKACTIVATE); 1358return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_SINGLESEL); 1364return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_NOSCROLL); 1372return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0; 1378return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 1384item.cchTextMax = Misc.MaxLengthNameProperty; 1411if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref hitTest.pt, 1)) 1418if (Misc.IsComctrlV6OnOsVerV6orHigher(hwnd)) 1449return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1455return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_CHECKBOXES); 1469return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_AUTOARRANGE); 1475return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_FULLROWSELECT); 1481return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_JUSTIFYCOLUMNS); 1496return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1505IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1507return Misc.GetItemToolTipText(hwnd, hwndToolTip, 0); 1644string className = Misc.GetClassName(Misc.GetParent(_hwnd)); 1668if (!Misc.GetScrollBarInfo(_hwnd, scrollBar, ref scrollBarInfo) || 1684if (!Misc.GetScrollInfo(_hwnd, sbFlag, ref si) || 1784return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_LIST); 1797return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref pt, 1); 1807return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero); 1813return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask)); 1836if (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); 485if (Misc.IsComctrlV6OnOsVerV6orHigher(hwnd)) 487int groupIndex = (int)Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (6)
241return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 367bool isComctrlV6OnOsVerV6orHigher = Misc.IsComctrlV6OnOsVerV6orHigher(hwnd); 706Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2); 715if (!Misc.GetWindowRect(_hwnd, ref rcLv)) 749if (Misc.IsControlRTL(_hwnd)) 817if (Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_VSCROLL, ref sbi))
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (3)
79Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2); 109group.cchSubsetTitle= Misc.MaxLengthNameProperty; 124Misc.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (12)
44_isComctrlV6OnOsVerV6orHigher = Misc.IsComctrlV6OnOsVerV6orHigher(hwnd); 136if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRectangle, 2)) 341if (!checkboxRectangle.IsEmpty && Misc.PtInRect(ref checkboxRectangle, x, y)) 366int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero); 755Misc.SetFocus(hwnd); 855if (Misc.GetWindowRect(hwndHeader, ref headerRect) 856&& Misc.GetClientRectInScreenCoordinates(_hwnd, ref listViewRect)) 864&& !Misc.IsItemVisible(ref listViewRect, ref itemRect)) 930if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 954Misc.MouseClick(clickPoint.x, clickPoint.y, !WindowsListView.ListViewSingleClickActivate(_hwnd)); 973Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode)); 974Misc.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)
59if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 81Misc.SetScrollPos(_hwnd, _sbFlag, pos, true); 110if (!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)
211if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 228if (!Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 234hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 290if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE)) 299else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_POPUPMENUMODE)) 305else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 506bool result = Misc.GetMenuBarInfo(hwnd, idObject, idItem, ref mbi); 591if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 614for (IntPtr hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndMenu, WindowsMenu.MenuClassName, null); 616hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndPossibleParent, WindowsMenu.MenuClassName, null)) 642for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 644hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, MenuClassName, null)) 669if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER)) 682int count = Misc.GetMenuItemCount(hmenuPossibleParent); 707return Misc.GetMenuItemCount(_hmenu); 717return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero); 730if (Misc.ProxyGetGUIThreadInfo(0, out gui)) 732return Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE); 813if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd))) 818if (!Misc.ProxyGetTitleBarInfo(_hwnd, out ti)) 880Misc.IsBitSet(mbi.focusFlags, 3)) 898if (Misc.ProxyGetGUIThreadInfo(0, out gui)) 912return string.Equals(Misc.ProxyGetClassName(hwnd), WindowsMenu.MenuClassName, StringComparison.OrdinalIgnoreCase); 917int count = Misc.GetMenuItemCount(hmenu); 921if (Misc.IsBitSet(state, NativeMethods.MF_HILITE)) 934hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 1085if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 1257if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd))) 1262if (!Misc.ProxyGetTitleBarInfo(_hwnd, out ti)) 1275if (Misc.GetMenuItemRect(_hwnd, _hmenu, _item, out rc)) 1307menuRawText = Misc.StripMnemonic(menuRawText); 1384if (!Misc.IsEnabled(_hwnd)) 1439if (Misc.InMenuMode()) 1441IntPtr hwndFocus = Misc.GetFocusedWindow(); 1454if (!Misc.InMenuMode() && !MenuMode(true)) 1461if (!Misc.InMenuMode()) 1508while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 1540return Misc.AccessKey(Text); 1648if (Misc.PtInRect(ref rc, x, y)) 1866return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); 1881return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED); 1890if (!Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 1895return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero); 1905if (!Misc.GetMenuItemInfo(hmenu, position, true, ref menuItemInfo)) 1910return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1911Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1912Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)); 1949if (Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 1956if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1957Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1958Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 1978IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 2088for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowsMenu.MenuClassName, null); 2090hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, WindowsMenu.MenuClassName, null)) 2119Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' ')); 2146int childIndex = (returnFirstChild) ? 0 : Misc.GetMenuItemCount(hSubmenu) - 1; 2194int cItems = Misc.GetMenuItemCount(_hmenu); 2197for (item = 0; item < cItems && !Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++) 2241if (Misc.ProxyGetGUIThreadInfo(0, out gui) && _hwnd == gui.hwndActive) 2246if (gui.hwndCapture != IntPtr.Zero && Misc.ProxyGetClassName(gui.hwndCapture) == "ListBox") 2257return Misc.SetFocus(_hwnd); 2267while (Misc.InMenuMode() != fInMenuMode && (dwDelta = SubtractTicks(SafeNativeMethods.GetTickCount(), dwTicks)) < WindowsMenu.TimeOut) 2279if (Misc.InMenuMode() == fSet) 2332while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 2352int c = Misc.GetMenuItemCount(_hmenu); 2363if (Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE)) 2398Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP)) 2557if (Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 2559if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 2560Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 2561Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 2565else if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_OWNERDRAW)) 2597if (!Misc.ReadProcessMemory(hProcess, dwItemData, new IntPtr(&msaaMenuInfo), new IntPtr(readSize), out count)) 2620if (Misc.ReadProcessMemory(hProcess, msaaMenuInfo.pszWText, new IntPtr(text), new IntPtr(readSize), out count)) 2651return !(Misc.IsBitSet(state, NativeMethods.MF_DISABLED) | Misc.IsBitSet(state, NativeMethods.MF_GRAYED)); 2675if (nextItem < Misc.GetMenuItemCount(_hmenu)) 2732menuRawText = 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); 289IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 290return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 347if (hwndBand != IntPtr.Zero && Misc.PtInWindowRect(hwndBand, x, y)) 380Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero); 406if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2)) 413if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), (int)CommonControlStyles.CCS_VERT)) 419return 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); 685return Misc.GetClassName(hwndParent).Equals("MsoCommandBar");
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (8)
65Misc.SetFocus(_pattern._hwnd); 171Misc.GetClientRectInScreenCoordinates(_pattern.WindowHandle, ref w32rect); 206return Misc.RectArrayToDoubleArray(rectArray); 251Misc.SetFocus(_pattern._hwnd); 269Misc.SetFocus(_pattern._hwnd); 301Misc.SetFocus(_pattern._hwnd); 323Misc.SetFocus(_pattern._hwnd); 347Misc.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); 198if (Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 230string classname = Misc.GetClassName(hwnd); 254if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || (si.nMax == si.nMin)) 297if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || 320bool fRet = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero) == 0; 322if (fRet && Misc.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos) 343} while (fRet && Misc.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos); 373if ((!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || 434int result = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (25)
140if (!Misc.GetScrollBarInfo(_hwnd, idObject, ref sbi)) 160if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_parent._hwnd))) 215return IsEnabled() && Misc.IsEnabled(_hwnd); 332if (Misc.PtInRect(ref rc, x, y)) 364return !Misc.IsEnabled(_hwnd) || !HasValuePattern(_hwnd, _sbFlag); 412return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_VSCROLL); 417return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_HSCROLL); 423return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.SBS_VERT); 435if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 449if (Misc.GetScrollBarInfo(hwnd, idObject, ref sbi)) 522if (_sbFlag != NativeMethods.SB_CTL || Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_CLIENT, ref sbi)) 556string classname = Misc.GetClassName(_hwnd); 575if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 586if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent._hwnd))) 628if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 666string classname = Misc.GetClassName(_hwnd); 689Misc.SetScrollPos(_hwnd, _sbFlag, val, true); 700Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 702Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 717if (Misc.GetScrollBarInfo(hwnd, idObject, ref sbi)) 739if (!Misc.GetScrollBarInfo(_hwnd, idObject, ref sbi)) 744return !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; 545if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 566Misc.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; 133return Misc.AccessKey(Misc.ProxyGetText(_hwnd)); 152return 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); 357Misc.EnumChildWindows(hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindChildFromRect), (void*)&info); 365if (!Misc.GetClientRectInScreenCoordinates(hwnd, ref rc)) 597int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero); 798if (!Misc.GetClientRectInScreenCoordinates(hwnd, ref client)) 807if (Misc.IsLayoutRTL(hwnd)) 833int style = Misc.GetWindowStyle(hwnd); 834return Misc.IsBitSet(style, SBARS_SIZEGRIP) || WindowsGrip.IsGripPresent(hwnd, true);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (29)
79if (Misc.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0) 158if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 178int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 194return Misc.IsBitSet(WindowStyle, NativeMethods.HDS_VERT) ? OrientationType.Vertical : OrientationType.Horizontal; 248if (Misc.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0) 285Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 293return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.HDS_HIDDEN); 299return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 304return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 419return Misc.AccessKey(Text); 430IntPtr hwndParent = Misc.GetParent(_hwnd); 434if (Misc.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty) 436if (!Misc.IsItemVisible(ref parentRect, ref itemRect)) 452return Misc.StripMnemonic(Text); 482Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 483Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 524if (Misc.IsComctrlV6OnOsVerV6orHigher(_hwnd)) 526int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 574if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2)) 587if (Misc.IsLayoutRTL(_hwnd)) 649return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_BUTTONS)); 655return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_FILTERBAR)); 669return Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1); 694int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 725Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 726Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 735if (Misc.GetFocusedWindow().Equals(_hwnd)) 738IntPtr hwndDropDown = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "DropDown", null);
MS\Internal\AutomationProxies\WindowsTab.cs (51)
260if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref hti.pt, 1)) 269if (updownHwnd != IntPtr.Zero && Misc.PtInWindowRect(updownHwnd, x, y)) 291int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero); 360string sTitle = Misc.ProxyGetText(hwnd); 442return !Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS); 509int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 517Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 518Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 538int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 541int posResult = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 578if (!Misc.GetWindowRect(_hwnd, ref viewable)) 597if (!Misc.GetWindowRect(updownHwnd, ref rectW32)) 650int count = Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 692int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 696Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 697Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 729&& Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32")) 755IntPtr childHwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 764className = Misc.ProxyGetClassName(childHwnd); 771childHwnd = Misc.GetWindow(childHwnd, NativeMethods.GW_HWNDLAST); 786return Misc.IsBitSet(style, NativeMethods.TCS_MULTILINE) && 787(Misc.IsBitSet(style, NativeMethods.TCS_RIGHT) || 788Misc.IsBitSet(style, NativeMethods.TCS_VERTICAL)); 813int newPos = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 814int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 853Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 854Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 866return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_MULTISELECT)); 956return Misc.AccessKey(WindowsTabItem.GetItemText(_hwnd, _item)); 971IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 972return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 998if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_FOCUSNEVER)) 1008Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1108Misc.MouseClick(pt.x, pt.y); 1144Misc.MouseClick(pt.x, pt.y); 1152else if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS)) 1154Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero); 1186return Misc.IsBitSet(TCItem.dwState, NativeMethods.TCIS_BUTTONPRESSED); 1239return !fIsWinform ? Misc.StripMnemonic(sName) : sName; 1244return Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 1260return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item; 1282return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty; 1293if (Misc.IsBitSet(WindowStyle, (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_FOCUSNEVER))) 1302if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1304Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1305Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1311Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1324hwndParent = Misc.GetParent(hwndParent); 1335return Misc.FindWindowEx(hwndParent, IntPtr.Zero, null, sName); 1349tcitem.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)
213if (Misc.PtInRect(ref rc, x, y)) 229int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero); 258string name = Misc.ProxyGetText(_hwnd); 300if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 330return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero); 369bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0; 370int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero); 376if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_SEP)) 378else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_CHECK)) 381IntPtr hwndParent = Misc.GetParent(_hwnd); 382if(Misc.GetClassName(hwndParent) != "MSTaskSwWClass") 387else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_DROPDOWN) 388&& Misc.IsBitSet(exStyle, NativeMethods.TBSTYLE_EX_DRAWDDARROWS)) 429if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 461return Misc.AccessKey(Text); 469return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 493return Misc.StripMnemonic(Text); 515Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 577return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item; 599int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 636IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 637return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _idCommand); 644|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 651if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 669Misc.MouseClick(((int)boundingRectangle.Left + (int)boundingRectangle.Right) / 2, ((int)boundingRectangle.Top + (int)boundingRectangle.Bottom) / 2); 678if (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)
174string className = Misc.ProxyGetClassName(hwnd); 183string className = Misc.ProxyGetClassName(_hwnd); 196return Misc.ProxyGetText(_hwnd); 235if (!Misc.GetCursorPos(ref pt)) 248Rect[] rects = Misc.GetTitlebarRects(hwnd); 266if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 275if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 284return Misc.ProxyGetText(hwnd); 294if (!Misc.GetCursorPos(ref pt)) 305int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 310if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MINIMIZE)) 316if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MAXIMIZE)) 335return Misc.ProxyGetText(hwnd);
MS\Internal\AutomationProxies\WindowsTreeView.cs (34)
408return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0; 414return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0; 422return (Misc.IsBitSet(expanded, NativeMethods.TVIS_EXPANDED)); 433if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0) 439fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0; 520return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem); 526return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask)); 566return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty; 586treeItem.cchTextMax = Misc.MaxLengthNameProperty; 597IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item); 608if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1) 611Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero); 619Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero); 645IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 656int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 814if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 && Misc.IsWindowInGivenProcess(_hwnd, "explorer")) 849if (!Misc.IsItemVisible(_hwnd, ref itemRect)) 865IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 866return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 902if (!parentRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 1226Misc.SetFocus(_hwnd); 1230Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem); 1283int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED)); 1285return Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED); 1399state = Misc.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked; 1447state = Misc.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked; 1467if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1476return Misc.IsBitSet(WindowStyle, NativeMethods.TVS_EDITLABELS); 1484if (Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED)) 1496bool isCheckbox = Misc.IsBitSet(WindowStyle, NativeMethods.TVS_CHECKBOXES); 1539Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1540Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1602if (!Misc.ReadProcessMemory(hProcess, pAddress, new IntPtr(&ent), new IntPtr(readSize), out count)) 1638int childId = Misc.ProxySendMessageInt(_hwnd, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (19)
187if (Misc.PtInRect(ref rc, x, y)) 224Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0)); 227Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 295return Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32"); 341int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 354IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 359hwndBuddy = Misc.GetParent(hwnd); 369return hwndBuddy != IntPtr.Zero && Misc.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) != -1; 378int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 392int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 524if (IsHorizontal(_hwnd) && Misc.IsLayoutRTL(_hwnd)) 533if (!Misc.GetWindowRect(_hwnd, ref updownRect)) 543Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center); 544Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center); 561if (!Misc.GetWindowRect(hwnd, ref updownRect)) 570if (fHorz && Misc.IsLayoutRTL(hwnd)) 626hwndParent = Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero; 634return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.UDS_HORZ);
MS\Internal\AutomationProxies\WinEventTracker.cs (9)
166if (Misc.IsCriticalException(e)) 176hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); 185Misc.UnhookWinEvent(hp._winEventHook); 268if (Misc.IsCriticalException(e)) 313if (Misc.IsCriticalException(e)) 328if (Misc.IsCriticalException(e)) 366if (Misc.GetWindowThreadProcessId(hwnd, out processId) == 0) 484return Misc.ProxyGetClassName(Process.GetProcessById(processId).MainWindowHandle).Equals("ConsoleWindowClass"); 488if (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)