830 references to Misc
UIAutomationClientSideProviders (830)
MS\Internal\AutomationProxies\Accessible.cs (5)
170IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject)); 718return Misc.IsBitSet((int)state, (int)testState); 1126if (Misc.IsCriticalException(e) && ! (e is NullReferenceException)) 1301if (Misc.IsCriticalException(e) && ! (e is NullReferenceException)) 1336if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\ClickablePoint.cs (9)
27_hwndProgman = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null); 67for (hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT)) 81hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDPREV); 91if (Misc.IsBitSet(Misc.GetWindowStyle(hwndCurrent), NativeMethods.WS_POPUP)) 98hwnd = Misc.GetParent(hwndCurrent); 248if (!Misc.GetWindowRect(hwnd, ref rc)) 266int lr = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (6)
48SetHandle(Misc.VirtualAllocEx(_processHandle, IntPtr.Zero, new UIntPtr((uint)cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE)); 60return Misc.VirtualFreeEx(_processHandle, handle, UIntPtr.Zero, UnsafeNativeMethods.MEM_RELEASE); 84Misc.WriteProcessMemory(_processHandle, handle, sourceAddress, cbSize, out count); 90Misc.ReadProcessMemory(_processHandle, remoteAddress, destAddress, cbSize, out count); 96Misc.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count); 101Misc.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count);
MS\Internal\AutomationProxies\CommonXSendMessage.cs (14)
108IntPtr result = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 197if (Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address) == IntPtr.Zero) 238IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 285IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam)); 341IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem1.Address, rmem2.Address); 382int res = Misc.ProxySendMessageInt(hwnd, uMsg, wParam, rmem.Address); 985if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref clientPoint, 1)) 1189if (Misc.ProxySendMessageInt(hwnd, msg, new IntPtr(index), remoteMem.Address) != 0) 1192Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2); 1258if (Misc.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero) 1368if (Misc.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1416if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1464if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1495if (!Misc.IsWow64Process(hProcess, out isWOW64Process))
MS\Internal\AutomationProxies\EventManager.cs (3)
455int style = Misc.GetWindowStyle(hwnd); 458if (Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZE)) 462else 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)
383IntPtr hwndParent = Misc.GetParent(hwnd); 398int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero); 1232if (!Misc.ProxyGetTitleBarInfo(hwnd, out ti) || ti.rcTitleBar.IsEmpty) 1242if(Misc.IsControlRTL(hwnd)) 1878int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 1931tool.hwnd = Misc.GetParent(lParam.hwnd); 1996if (!Misc.ProxyGetTitleBarInfo(hwnd, out tiDL)) 2020if (Misc.IsLayoutRTL(hwnd)) 2028leftEdge = (int)(Misc.GetTitleBarRect(hwnd).Left); 2067if (!Misc.ProxyGetTitleBarInfoEx(hwnd, out ti))
MS\Internal\AutomationProxies\MSAANativeProvider.cs (10)
163int index = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 369string className = Misc.GetClassName(_hwnd); 461Misc.SetFocus(_hwnd); 625Misc.SetFocus(_hwnd); 639Misc.SetFocus(_hwnd); 653Misc.SetFocus(_hwnd); 928Misc.GetWindowThreadProcessId(_hwnd, out pid); 1065string className = Misc.GetClassName(hwnd); 1205Misc.SetFocus(_hwnd); 1213if (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)
119System.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)); 128Misc.GetClientRectInScreenCoordinates(hwnd, ref clientRect) 129&& Misc.GetWindowRect(hwnd, ref windowRect) 219int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 475if (Misc.ProxyGetClassName(_hwnd) == "SysListView32") 487if (Misc.ProxyGetClassName(_hwnd) == "SysListView32") 512if (Misc.IsBitSet(style, NativeMethods.WS_VSCROLL) && Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) 534if (!Misc.IsBitSet(style, NativeMethods.WS_CHILD)) 589if (Misc.IsLayoutRTL(_hwnd)) 665if (Misc.GetClassName(hwnd) == "ComboLBox") 734if (Misc.GetClassName(hwnd) == "ComboLBox") 751int style = Misc.GetWindowStyle(hwnd); 752if (Misc.IsBitSet(style, NativeMethods.WS_CHILD))
MS\Internal\AutomationProxies\ProxyFragment.cs (1)
222if (fragment == fromPoint || Misc.Compare(fragment, fromPoint))
MS\Internal\AutomationProxies\ProxyHwnd.cs (15)
192IntPtr label = Misc.GetLabelhwnd(_hwnd); 193name = Misc.GetControlName(label, true); 201name = Misc.ProxyGetText(_hwnd); 226_controlLabel = Misc.GetLabelhwnd(_hwnd); 244IntPtr hwndParent = Misc.GetParent(_hwnd); 251if (Misc.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty) 255if (!itemRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 271int idChild = Misc.GetWindowId(_hwnd); 272string text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, idChild); 275text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, 0); 484if (!Misc.GetClientRect(hwnd, ref rc)) 489if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 511IntPtr label = Misc.GetLabelhwnd(hwnd); 514string labelText = Misc.ProxyGetText(label); 517accessKey = Misc.AccessKey(labelText);
MS\Internal\AutomationProxies\ProxySimple.cs (14)
107if (!Misc.GetWindowRect(_hwnd, ref controlRectangle)) 138return Misc.AppendToRuntimeId(GetParent().GetRuntimeId(), _item); 214return Misc.IsEnabled(_hwnd); 225Misc.GetWindowThreadProcessId(_hwnd, out pid); 247return Misc.GetFocusedWindow() == _hwnd ? IsFocused() : false; 278if (Misc.GetFocusedWindow() == _hwnd && IsFocused()) 293if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_TABSTOP)) 332if (!parentRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 350string sRawName = Misc.GetControlName(_hwnd, false); 352return string.IsNullOrEmpty(sRawName) ? null : Misc.AccessKey(sRawName); 589Misc.GetClientRectInScreenCoordinates(_hwnd, ref rcOutside); 591if (!Misc.IntersectRect(ref rcItem, ref rcOutside, ref rcItem)) 674return Misc.GetWindowStyle(_hwnd); 683return Misc.GetWindowExStyle(_hwnd);
MS\Internal\AutomationProxies\QueueProcessor.cs (3)
110Misc.DispatchMessage(ref msg); 126int result = Misc.MsgWaitForMultipleObjects(handle, false, NativeMethods.INFINITE, NativeMethods.QS_ALLINPUT); 135if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\SafeProcessHandle.cs (3)
33Misc.GetWindowThreadProcessId(hwnd, out processId); 37SetHandle(Misc.OpenProcess(NativeMethods.PROCESS_QUERY_INFORMATION | NativeMethods.PROCESS_VM_OPERATION | NativeMethods.PROCESS_VM_READ | NativeMethods.PROCESS_VM_WRITE, false, processId, hwnd)); 49return Misc.CloseHandle(handle);
MS\Internal\AutomationProxies\WindowsAltTab.cs (6)
138if (Misc.MapWindowPoints(System.IntPtr.Zero, _hwnd, ref pt, 1)) 142if(Misc.GetClientRect(_hwnd, ref clientRect)) 144if (Misc.PtInRect(ref clientRect, pt.x, pt.y)) 261Misc.ThrowWin32ExceptionsIfError(lastWin32Error); 353return GetBoundingRect().ToRect(Misc.IsControlRTL(_hwnd)); 398if(!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (30)
110style = Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK; 196int state = Misc.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero); 197if (Misc.IsBitSet(state, NativeMethods.BST_PUSHED) 263return Misc.AccessKey(Misc.ProxyGetText(_hwnd)); 337new WindowsButton(hwndRadioButton, null, ButtonType.RadioButton, Misc.GetWindowStyle(hwndRadioButton) & NativeMethods.BS_TYPEMASK, accRadioButton) 398IntPtr hwndParent = Misc.GetParent(_hwnd); 409return new WindowsButton(hwndParent, null, ButtonType.GroupBox, Misc.GetWindowStyle(hwndParent) & NativeMethods.BS_TYPEMASK, accParent); 479Misc.SetFocus(_hwnd); 503Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 517Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 524Misc.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true); 546IntPtr hwndShell = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null); 558if (!Misc.GetClassName(_hwnd).Equals("Button")) 566return Misc.InTheShellProcess(_hwnd) && UnsafeNativeMethods.GetProp(_hwnd, "StartButtonTag") == new IntPtr(304); 570IntPtr hwndParent = Misc.GetParent(_hwnd); 573if (Misc.GetClassName(hwndParent).Equals("Shell_TrayWnd")) 584if (!Misc.GetClassName(_hwnd).Equals("Button")) 589IntPtr hwndParent = Misc.GetParent(_hwnd); 592if (Misc.GetClassName(hwndParent).Equals("Desktop More Programs Pane")) 610if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_CHILD)) 612hwndParent = Misc.GetParent(hwndRoot); 616hwndParent = Misc.GetWindow(hwndRoot, NativeMethods.GW_OWNER); 649int state = Misc.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero); 650if (Misc.IsBitSet(state, NativeMethods.BST_CHECKED)) 654else if (Misc.IsBitSet(state, NativeMethods.BST_INDETERMINATE)) 674Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound); 703return Misc.StripMnemonic(Misc.ProxyGetText(_hwnd)); 712Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton);
MS\Internal\AutomationProxies\WindowsComboBox.cs (35)
134if (!Misc.GetWindowRect(cbInfo.hwndList, ref rcList)) 138if (!Misc.UnionRect(out rcCombo, ref rcCombo, ref rcList)) 145return rcCombo.ToRect(Misc.IsControlRTL(_hwnd)); 154if (Misc.GetClassName(_hwnd).Equals("Internet Explorer_TridentCmboBx")) 196return Misc.GetControlName(Misc.GetLabelhwnd(_hwndEx), true); 259if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 261if (Misc.PtInRect(ref cbInfo.rcButton, x, y)) 272if (Misc.GetWindowRect(cbInfo.hwndList, ref rcList) && 273Misc.PtInRect(ref rcList, x, y)) 376Misc.CheckEnabled(_hwnd); 391IntPtr hwndParent = Misc.GetParent(_hwnd); 394int id = Misc.GetWindowId(_hwnd); 397Misc.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam, _hwnd); 444Misc.CheckEnabled(_hwnd); 458Misc.CheckEnabled(_hwnd); 525bool result = Misc.GetComboBoxInfo(hwnd, ref cbInfo); 542cbInfo.hwndItem = Misc.FindWindowEx(hwnd, IntPtr.Zero, "EDIT", null); 545result = Misc.GetWindowRect(cbInfo.hwndItem, ref cbInfo.rcItem); 548result = Misc.MapWindowPoints(_hwndDesktop, hwnd, ref cbInfo.rcItem, 2); 564return Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0; 569IntPtr hwndFocused = Misc.GetFocusedWindow(); 577Misc.SetFocus(hwnd); 579Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 584Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 632return Misc.ProxyGetText(IsComboBoxEx32() ? _hwndEx : _hwnd); 640return (Misc.GetWindowStyle(hwnd) & NativeMethods.CBS_COMBOTYPEMASK); 681return (0 == String.Compare(Misc.GetClassName(hwndEx), ComboboxEx32, StringComparison.OrdinalIgnoreCase)); 700index = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 707int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 714if (Misc.GetClassName(hwnd).Equals("Internet Explorer_TridentCmboBx")) 725return Misc.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len); 769if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && Misc.IsBitSet(NativeMethods.STATE_SYSTEM_PRESSED, cbInfo.stateButton)) 928if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 955Misc.CheckEnabled(_hwnd);
MS\Internal\AutomationProxies\WindowsContainer.cs (11)
33string className = Misc.ProxyGetClassName(hwnd); 133return Misc.IsBitSet(style, NativeMethods.WS_CAPTION) || 134Misc.IsBitSet(style, NativeMethods.WS_POPUP); 139int style = Misc.GetWindowStyle(hwnd); 140int exstyle = Misc.GetWindowExStyle(hwnd); 142return Misc.IsBitSet(style, NativeMethods.DS_CONTROL) && 143Misc.IsBitSet(style, NativeMethods.WS_CHILD) && 144Misc.IsBitSet(exstyle, NativeMethods.WS_EX_CONTROLPARENT); 171string dlgName = Misc.ProxyGetText(hwnd); 178IntPtr hwndParent = Misc.GetParent(hwnd); 184hwndTab = Misc.FindWindowEx(hwndParent, IntPtr.Zero, "SysTabControl32", null);
MS\Internal\AutomationProxies\WindowsEditBox.cs (40)
155hwnd = Misc.GetParent(hwnd)) 270Misc.CheckEnabled(_hwnd); 274if (Misc.IsBitSet(styles, NativeMethods.ES_READONLY)) 280if (Misc.IsBitSet(styles, NativeMethods.ES_NUMBER)) 294int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 302result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 356if (!Misc.MapWindowPoints(IntPtr.Zero, WindowHandle, ref clientLocation, 1)) 365if (!Misc.GetClientRect(WindowHandle, ref clientRect)) 448int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam); 497int style = Misc.GetWindowStyle(hwnd); 500if (Misc.IsBitSet(style, NativeMethods.ES_PASSWORD)) 504else if (Misc.IsBitSet(style, NativeMethods.ES_MULTILINE)) 508else if (Misc.IsBitSet(style, NativeMethods.ES_AUTOHSCROLL)) 520return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 527return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 533IntPtr result = Misc.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero); 550return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero); 559if (Misc.GetObjectW(hfont, cb, ref logfont) != cb) 570Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect); 578Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETSEL, out start, out end); 584return Misc.ProxyGetText(_hwnd, GetTextLength()); 590return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero); 600if (Misc.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty) 676return (!SafeNativeMethods.IsWindowEnabled(WindowHandle) || Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 685return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero); 691int index = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero); 698return 0 != Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical); 706if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_VSCROLL)) 712bool ok = Misc.GetScrollInfo(WindowHandle, NativeMethods.SB_VERT, ref si); 723if (Misc.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty) 745int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero); 806Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end); 814return Misc.ProxyGetText(hwnd); 855IntPtr hdc = Misc.GetDC(_hwnd); 865oldFont = Misc.SelectObject(hdc, hfont); 866return Misc.GetTextExtentPoint32(hdc, text, text.Length, out size); 872Misc.SelectObject(hdc, oldFont); 875Misc.ReleaseDC(_hwnd, hdc); 933string classname = Misc.GetClassName(hwndParent); 949string classname = Misc.GetClassName(hwndParent);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (15)
86Misc.SetFocus(_provider._hwnd); 248if (!Misc.MapWindowPoints(_provider.WindowHandle, IntPtr.Zero, ref w32point, 1)) 288return Misc.RectArrayToDoubleArray(rectArray); 307Misc.SetFocus(_provider._hwnd); 361Misc.SetFocus(_provider._hwnd); 425Misc.SetFocus(_provider._hwnd); 444Misc.SetFocus(_provider._hwnd); 461Misc.SetFocus(_provider._hwnd); 484Misc.SetFocus(_provider._hwnd); 490if (Misc.IsReadingRTL(_provider._hwnd)) 731if (Misc.IsBitSet(style, NativeMethods.ES_CENTER)) 735else if (Misc.IsBitSet(style, NativeMethods.ES_RIGHT)) 748return Misc.IsBitSet(style, NativeMethods.ES_UPPERCASE) ? CapStyle.AllCap : CapStyle.None; 776IntPtr hdc = Misc.GetDC(IntPtr.Zero); 782Misc.ReleaseDC(IntPtr.Zero, hdc);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (9)
55return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 89return new WindowsButton(hwnd, null, WindowsButton.ButtonType.CheckBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 92return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 95return new WindowsButton(hwnd, null, WindowsButton.ButtonType.PushButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 98return new WindowsButton(hwnd, null, WindowsButton.ButtonType.RadioButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 135return IsWindowsFormsControl(Misc.GetClassName(hwnd)); 159if (XSendMessage.XSend(hwnd, WM_GETCONTROLNAME, new IntPtr(Misc.MaxLengthNameProperty), ref winFormsID, Misc.MaxLengthNameProperty)) 200private static int WM_GETCONTROLNAME = Misc.RegisterWindowMessage("WM_GETCONTROLNAME");
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (3)
105Misc.SetFocus(_hwnd); 132Misc.SetFocus(_hwnd); 137Misc.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsGrip.cs (6)
57if (Misc.GetClientRectInScreenCoordinates(_hwnd, ref client)) 61if (Misc.IsLayoutRTL(_hwnd)) 90if (!Misc.GetClientRectInScreenCoordinates(hwnd, ref client)) 110if (Misc.IsLayoutRTL(hwnd)) 114int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 122int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsHyperlink.cs (7)
119return Misc.StripMnemonic(RemoveHTMLAnchorTag(Misc.ProxyGetText(_hwnd))); 204if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 242if (Misc.IsBitSet(_linkItem.state, NativeMethods.LIS_FOCUSED)) 443if (!Misc.GetWindowRect(_hwnd, ref BoundingRect)) 511Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 512Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (10)
140Misc.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4)); 155return Misc.ProxyGetText(_hwnd, IP_ADDRESS_STRING_LENGTH); 163return !Misc.IsEnabled(_hwnd); 245IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 254hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 262IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 265hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 353return Misc.ProxyGetText(_hwnd); 383Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture))); 478return WindowsIPAddress.Create(Misc.GetParent(_hwnd), 0, 0);
MS\Internal\AutomationProxies\WindowsListBox.cs (36)
70int style = Misc.GetWindowStyle(hwnd); 77if (Misc.IsBitSet(style, NativeMethods.LBS_COMBOBOX)) 295Misc.GetClientRectInScreenCoordinates(_hwnd, ref listboxrect); 296if (Misc.PtInRect(ref listboxrect, x, y)) 298int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top)); 313int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero); 388return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0; 438return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero); 528if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LBS_COMBOBOX)) 569int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero); 610return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 733int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 737if (Misc.GetClassName(_hwnd).Equals("Internet Explorer_TridentLstBox")) 748string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen); 946Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 992return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 1001SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item)); 1005SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1020return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR; 1045return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item; 1049return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1066Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect); 1067return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty; 1121Misc.MouseClick(pt.x, pt.y); 1135Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item)); 1140Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1150int listBoxStyle = Misc.GetWindowStyle(_hwnd); 1151if (Misc.IsBitSet(listBoxStyle, NativeMethods.LBS_NOTIFY)) 1154int idListBox = Misc.GetWindowId(_hwnd); 1158IntPtr hwndListBoxParent = Misc.GetParent(_hwnd); 1161Misc.ProxySendMessageInt( 1170Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1174int id = Misc.GetWindowId(_hwnd); 1178Misc.ProxySendMessageInt(combo._hwnd, NativeMethods.WM_COMMAND, wParam, _hwnd); 1194return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (42)
419if (Misc.PtInRect(ref rc, x, y)) 893return (Misc.IsBitSet(state, NativeMethods.LVIS_FOCUSED)); 1184return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_REPORT); 1214return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1242return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags)); 1253return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero); 1259return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1)); 1265return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_SCROLL, dx, dy) != 0; 1278return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1288return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0; 1312return Misc.IsBitSet(GetItemState(hwnd, listItem, NativeMethods.LVIS_SELECTED), NativeMethods.LVIS_SELECTED); 1318return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_EDITLABELS); 1352return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1358return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_ONECLICKACTIVATE); 1364return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_SINGLESEL); 1370return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_NOSCROLL); 1378return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0; 1384return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 1390item.cchTextMax = Misc.MaxLengthNameProperty; 1416if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref hitTest.pt, 1)) 1423if (Misc.IsComctrlV6OnOsVerV6orHigher(hwnd)) 1452return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1458return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_CHECKBOXES); 1472return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_AUTOARRANGE); 1478return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_FULLROWSELECT); 1484return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_JUSTIFYCOLUMNS); 1499return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1508IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1510return Misc.GetItemToolTipText(hwnd, hwndToolTip, 0); 1647string className = Misc.GetClassName(Misc.GetParent(_hwnd)); 1671if (!Misc.GetScrollBarInfo(_hwnd, scrollBar, ref scrollBarInfo) || 1687if (!Misc.GetScrollInfo(_hwnd, sbFlag, ref si) || 1787return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_LIST); 1800return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref pt, 1); 1810return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero); 1816return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask)); 1838if (Misc.PtInWindowRect(hwndHeader, x, y))
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (6)
38_isComctrlV6OnOsVerV6orHigher = Misc.IsComctrlV6OnOsVerV6orHigher(hwnd); 102group.cchHeader = Misc.MaxLengthNameProperty; 113group.cchHeader = Misc.MaxLengthNameProperty; 331int groupIndex = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 486if (Misc.IsComctrlV6OnOsVerV6orHigher(hwnd)) 488int groupIndex = (int)Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (6)
244return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 370bool isComctrlV6OnOsVerV6orHigher = Misc.IsComctrlV6OnOsVerV6orHigher(hwnd); 707Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2); 716if (!Misc.GetWindowRect(_hwnd, ref rcLv)) 750if (Misc.IsControlRTL(_hwnd)) 818if (Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_VSCROLL, ref sbi))
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (3)
78Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2); 108group.cchSubsetTitle= Misc.MaxLengthNameProperty; 123Misc.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (12)
49_isComctrlV6OnOsVerV6orHigher = Misc.IsComctrlV6OnOsVerV6orHigher(hwnd); 139if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRectangle, 2)) 344if (!checkboxRectangle.IsEmpty && Misc.PtInRect(ref checkboxRectangle, x, y)) 369int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero); 759Misc.SetFocus(hwnd); 859if (Misc.GetWindowRect(hwndHeader, ref headerRect) 860&& Misc.GetClientRectInScreenCoordinates(_hwnd, ref listViewRect)) 868&& !Misc.IsItemVisible(ref listViewRect, ref itemRect)) 934if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 958Misc.MouseClick(clickPoint.x, clickPoint.y, !WindowsListView.ListViewSingleClickActivate(_hwnd)); 977Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode)); 978Misc.ProxySendMessage(hwnd, NativeMethods.WM_KEYUP, key, keyUpLParam);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (10)
82if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 113return name.Length < Misc.MaxLengthNameProperty ? name : name.Substring(0, Misc.MaxLengthNameProperty); 155if (!Misc.GetWindowRect(hwnd, ref controlRectangle)) 189if(Misc.IsControlRTL(hwnd)) 247Misc.SetFocus(_hwnd); 252if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 255Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 256Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewItemStartMenu.cs (1)
102if (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)
100if (Misc.IsControlRTL(_hwnd)) 115if (Misc.IsControlRTL(_hwnd)) 144if (!Misc.IsItemVisible(ref parentRect, ref itemRect)) 174if (Misc.GetClassName(ancestor) == "Desktop Search Open View") 178ancestor = Misc.GetParent(ancestor); 201return name.Length < Misc.MaxLengthNameProperty ? name : name.Substring(0, Misc.MaxLengthNameProperty); 374if (Misc.IsComctrlV6OnOsVerV6orHigher(_hwnd)) 376int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (78)
216if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 233if (!Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 239hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 295if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE)) 304else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_POPUPMENUMODE)) 310else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 511bool result = Misc.GetMenuBarInfo(hwnd, idObject, idItem, ref mbi); 596if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 619for (IntPtr hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndMenu, WindowsMenu.MenuClassName, null); 621hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndPossibleParent, WindowsMenu.MenuClassName, null)) 647for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 649hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, MenuClassName, null)) 674if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER)) 687int count = Misc.GetMenuItemCount(hmenuPossibleParent); 712return Misc.GetMenuItemCount(_hmenu); 722return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero); 735if (Misc.ProxyGetGUIThreadInfo(0, out gui)) 737return Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE); 818if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd))) 823if (!Misc.ProxyGetTitleBarInfo(_hwnd, out ti)) 885Misc.IsBitSet(mbi.focusFlags, 3)) 903if (Misc.ProxyGetGUIThreadInfo(0, out gui)) 917return (String.Compare(Misc.ProxyGetClassName(hwnd), WindowsMenu.MenuClassName, StringComparison.OrdinalIgnoreCase) == 0); 923int count = Misc.GetMenuItemCount(hmenu); 927if (Misc.IsBitSet(state, NativeMethods.MF_HILITE)) 940hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 1091if (!Misc.ProxyGetGUIThreadInfo(0, out gui)) 1263if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd))) 1268if (!Misc.ProxyGetTitleBarInfo(_hwnd, out ti)) 1283if (Misc.GetMenuItemRect(_hwnd, _hmenu, _item, out rc)) 1315menuRawText = Misc.StripMnemonic(menuRawText); 1392if (!Misc.IsEnabled(_hwnd)) 1447if (Misc.InMenuMode()) 1449IntPtr hwndFocus = Misc.GetFocusedWindow(); 1462if (!Misc.InMenuMode() && !MenuMode(true)) 1469if (!Misc.InMenuMode()) 1516while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 1548return Misc.AccessKey(Text); 1656if (Misc.PtInRect(ref rc, x, y)) 1874return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); 1889return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED); 1898if (!Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 1903return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero); 1913if (!Misc.GetMenuItemInfo(hmenu, position, true, ref menuItemInfo)) 1918return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1919Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1920Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)); 1957if (Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 1964if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1965Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1966Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 1986IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 2096for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowsMenu.MenuClassName, null); 2098hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, WindowsMenu.MenuClassName, null)) 2127Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' ')); 2154int childIndex = (returnFirstChild) ? 0 : Misc.GetMenuItemCount(hSubmenu) - 1; 2202int cItems = Misc.GetMenuItemCount(_hmenu); 2205for (item = 0; item < cItems && !Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++) 2249if (Misc.ProxyGetGUIThreadInfo(0, out gui) && _hwnd == gui.hwndActive) 2254if (gui.hwndCapture != IntPtr.Zero && Misc.ProxyGetClassName(gui.hwndCapture) == "ListBox") 2265return Misc.SetFocus(_hwnd); 2275while (Misc.InMenuMode() != fInMenuMode && (dwDelta = SubtractTicks(SafeNativeMethods.GetTickCount(), dwTicks)) < WindowsMenu.TimeOut) 2287if (Misc.InMenuMode() == fSet) 2340while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 2360int c = Misc.GetMenuItemCount(_hmenu); 2371if (Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE)) 2406Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP)) 2565if (Misc.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo)) 2567if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 2568Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 2569Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 2573else if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_OWNERDRAW)) 2605if (!Misc.ReadProcessMemory(hProcess, dwItemData, new IntPtr(&msaaMenuInfo), new IntPtr(readSize), out count)) 2628if (Misc.ReadProcessMemory(hProcess, msaaMenuInfo.pszWText, new IntPtr(text), new IntPtr(readSize), out count)) 2659return !(Misc.IsBitSet(state, NativeMethods.MF_DISABLED) | Misc.IsBitSet(state, NativeMethods.MF_GRAYED)); 2683if (nextItem < Misc.GetMenuItemCount(_hmenu)) 2740menuRawText = Misc.StripMnemonic(Text);
MS\Internal\AutomationProxies\WindowsProgressbar.cs (3)
159int cur = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 160int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero); 161int max = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (10)
127if (!Misc.GetWindowRect(_hwnd, ref rebarRect)) 197return Misc.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero); 290IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 291return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 348if (hwndBand != IntPtr.Zero && Misc.PtInWindowRect(hwndBand, x, y)) 381Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero); 407if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2)) 414if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), (int)CommonControlStyles.CCS_VERT)) 420return rectW32.ToRect(Misc.IsControlRTL(hwnd));
MS\Internal\AutomationProxies\WindowsRichEdit.cs (11)
172if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)) 178if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(_hwnd)) 193int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 200result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 363while (!gotPoint || !Misc.PtInRect(ref rect, x, y)) 377while (gotPoint && Misc.PtInRect(ref rect, x, y) && rangeAdjust.Start != rangeAdjust.End) 391while (!gotPoint || !Misc.PtInRect(ref rect, x, y)) 411} while (gotPoint && Misc.PtInRect(ref rect, x, y)); 465Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 565return Misc.ProxyGetText(_hwnd); 685return Misc.GetClassName(hwndParent).Equals("MsoCommandBar");
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (8)
69Misc.SetFocus(_pattern._hwnd); 175Misc.GetClientRectInScreenCoordinates(_pattern.WindowHandle, ref w32rect); 210return Misc.RectArrayToDoubleArray(rectArray); 258Misc.SetFocus(_pattern._hwnd); 276Misc.SetFocus(_pattern._hwnd); 308Misc.SetFocus(_pattern._hwnd); 330Misc.SetFocus(_pattern._hwnd); 354Misc.SetFocus(_pattern._hwnd);
MS\Internal\AutomationProxies\WindowsScroll.cs (21)
116int style = Misc.GetWindowStyle(hwnd); 118if ((sbFlag == NativeMethods.SB_HORZ && !Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) || 119(sbFlag == NativeMethods.SB_VERT && !Misc.IsBitSet(style, NativeMethods.WS_VSCROLL))) 124if (!Misc.IsEnabled(hwnd)) 135if (Misc.GetScrollBarInfo(hwnd, scrollBarObjectId, ref sbi)) 138!Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE); 151if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 161int style = Misc.GetWindowStyle(hwnd); 163bool hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.WS_HSCROLL) || Misc.IsBitSet(style, NativeMethods.WS_VSCROLL); 165string className = Misc.ProxyGetClassName(hwnd); 170hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.ES_MULTILINE); 201if (Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 233string classname = Misc.GetClassName(hwnd); 257if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || (si.nMax == si.nMin)) 298if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || 321bool fRet = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero) == 0; 323if (fRet && Misc.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos) 344} while (fRet && Misc.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos); 372if ((!Misc.GetScrollInfo(hwnd, sbFlag, ref si) || 433int result = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (25)
146if (!Misc.GetScrollBarInfo(_hwnd, idObject, ref sbi)) 166if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_parent._hwnd))) 221return IsEnabled() && Misc.IsEnabled(_hwnd); 338if (Misc.PtInRect(ref rc, x, y)) 370return !Misc.IsEnabled(_hwnd) || !HasValuePattern(_hwnd, _sbFlag); 418return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_VSCROLL); 423return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_HSCROLL); 429return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.SBS_VERT); 441if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 455if (Misc.GetScrollBarInfo(hwnd, idObject, ref sbi)) 528if (_sbFlag != NativeMethods.SB_CTL || Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_CLIENT, ref sbi)) 562string classname = Misc.GetClassName(_hwnd); 579if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 590if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent._hwnd))) 630if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 668string classname = Misc.GetClassName(_hwnd); 691Misc.SetScrollPos(_hwnd, _sbFlag, val, true); 702Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 704Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 719if (Misc.GetScrollBarInfo(hwnd, idObject, ref sbi)) 741if (!Misc.GetScrollBarInfo(_hwnd, idObject, ref sbi)) 746return !Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE);
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (9)
220if (!Misc.GetScrollInfo(hwnd, sbFlag, ref si)) 229if (!Misc.GetScrollBarInfo(hwnd, idObject, ref sbi)) 239if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(parent._parent._hwnd))) 301if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 393if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 420if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(hwnd))) 520IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(_hwnd) : _hwnd; 546if (!Misc.GetScrollInfo(_hwnd, _sbFlag, ref si)) 567Misc.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd == _hwnd ? IntPtr.Zero : _hwnd));
MS\Internal\AutomationProxies\WindowsSlider.cs (17)
143if (Misc.PtInRect(ref rc, x, y)) 171IntPtr parent = Misc.GetParent(_hwnd); 182Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 259return (Misc.IsBitSet(WindowStyle, NativeMethods.TBS_VERT)); 264int value = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 269int maxValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 287Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val)); 294return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero); 302return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero); 310return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 318return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero); 412IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 413return Misc.GetItemToolTipText(_hwnd, hwndToolTip, 0); 443Misc.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero); 466if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcChannel, 2)) 478if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcThumb, 2)) 486if (Misc.IsLayoutRTL(hwnd))
MS\Internal\AutomationProxies\WindowsSpinner.cs (7)
64hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 70if (Misc.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) == -1) 276IntPtr hwndParent = Misc.GetParent(hwnd); 280IntPtr hwndChild = Misc.GetWindow(hwndParent, NativeMethods.GW_CHILD); 283string className = Misc.ProxyGetClassName(hwndChild); 286IntPtr hwndBuddy = Misc.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 292hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
MS\Internal\AutomationProxies\WindowsStatic.cs (6)
72string className = Misc.GetClassName(hwnd).ToLower(System.Globalization.CultureInfo.InvariantCulture); 92style = Misc.GetWindowStyle(hwnd) & NativeMethods.SS_TYPEMASK; 137return Misc.AccessKey(Misc.ProxyGetText(_hwnd)); 156return Misc.StripMnemonic(Misc.ProxyGetText(_hwnd));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (11)
145return Misc.ProxyGetText(_hwnd); 229if (Misc.PtInRect(ref rc, x, y)) 239if (Misc.PtInRect(ref rc, x, y)) 340return Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero); 359Misc.EnumChildWindows(hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindChildFromRect), (void*)&info); 367if (!Misc.GetClientRectInScreenCoordinates(hwnd, ref rc)) 599int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero); 800if (!Misc.GetClientRectInScreenCoordinates(hwnd, ref client)) 809if (Misc.IsLayoutRTL(hwnd)) 835int style = Misc.GetWindowStyle(hwnd); 836return Misc.IsBitSet(style, SBARS_SIZEGRIP) || WindowsGrip.IsGripPresent(hwnd, true);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (29)
83if (Misc.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0) 164if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 184int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 200return Misc.IsBitSet(WindowStyle, NativeMethods.HDS_VERT) ? OrientationType.Vertical : OrientationType.Horizontal; 254if (Misc.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0) 291Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 299return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.HDS_HIDDEN); 305return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 310return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 425return Misc.AccessKey(Text); 436IntPtr hwndParent = Misc.GetParent(_hwnd); 440if (Misc.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty) 442if (!Misc.IsItemVisible(ref parentRect, ref itemRect)) 458return Misc.StripMnemonic(Text); 491Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 492Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 533if (Misc.IsComctrlV6OnOsVerV6orHigher(_hwnd)) 535int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 583if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2)) 596if (Misc.IsLayoutRTL(_hwnd)) 658return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_BUTTONS)); 664return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_FILTERBAR)); 678return Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1); 703int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 737Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 738Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 747if (Misc.GetFocusedWindow().Equals(_hwnd)) 750IntPtr hwndDropDown = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "DropDown", null);
MS\Internal\AutomationProxies\WindowsTab.cs (51)
264if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref hti.pt, 1)) 273if (updownHwnd != IntPtr.Zero && Misc.PtInWindowRect(updownHwnd, x, y)) 295int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero); 364string sTitle = Misc.ProxyGetText(hwnd); 446return !Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS); 513int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 521Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 522Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 542int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 545int posResult = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 581if (!Misc.GetWindowRect(_hwnd, ref viewable)) 600if (!Misc.GetWindowRect(updownHwnd, ref rectW32)) 653int count = Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 695int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 699Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 700Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 732&& Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32")) 758IntPtr childHwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 767className = Misc.ProxyGetClassName(childHwnd); 774childHwnd = Misc.GetWindow(childHwnd, NativeMethods.GW_HWNDLAST); 789return Misc.IsBitSet(style, NativeMethods.TCS_MULTILINE) && 790(Misc.IsBitSet(style, NativeMethods.TCS_RIGHT) || 791Misc.IsBitSet(style, NativeMethods.TCS_VERTICAL)); 816int newPos = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 817int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 856Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 857Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 869return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_MULTISELECT)); 959return Misc.AccessKey(WindowsTabItem.GetItemText(_hwnd, _item)); 974IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 975return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 1001if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_FOCUSNEVER)) 1011Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1111Misc.MouseClick(pt.x, pt.y); 1147Misc.MouseClick(pt.x, pt.y); 1155else if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS)) 1157Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero); 1189return Misc.IsBitSet(TCItem.dwState, NativeMethods.TCIS_BUTTONPRESSED); 1242return !fIsWinform ? Misc.StripMnemonic(sName) : sName; 1247return Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 1263return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item; 1285return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty; 1296if (Misc.IsBitSet(WindowStyle, (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_FOCUSNEVER))) 1305if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1307Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1308Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1314Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1327hwndParent = Misc.GetParent(hwndParent); 1338return Misc.FindWindowEx(hwndParent, IntPtr.Zero, null, sName); 1352tcitem.cchTextMax = Misc.MaxLengthNameProperty;
MS\Internal\AutomationProxies\WindowsTitleBar.cs (21)
62return Misc.GetTitleBarRect(_hwnd); 78return Misc.ProxyGetText(_hwnd); 116int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y)); 203Misc.ProxyGetTitleBarInfo(_hwnd, out ti); 210if (!Misc.IsBitSet(ti.rgstate[i], NativeMethods.STATE_SYSTEM_INVISIBLE) || i == _systemMenu) 224if (Misc.ProxyGetTitleBarInfo(hwnd, out ti)) 226return !Misc.IsBitSet(ti.rgstate[0], NativeMethods.STATE_SYSTEM_INVISIBLE); 291if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 301if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 322if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_DISABLED)) 327return Misc.IsBitSet(WindowExStyle, NativeMethods.WS_EX_CONTEXTHELP); 333if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 338return Misc.IsBitSet(style, NativeMethods.WS_MINIMIZEBOX); 345if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 350return Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZEBOX); 363Rect[] rects = Misc.GetTitlebarRects(_hwnd); 376if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 385if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 436Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero); 447Misc.ClearMenuMode(); 450Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (26)
219if (Misc.PtInRect(ref rc, x, y)) 235int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero); 264string name = Misc.ProxyGetText(_hwnd); 306if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 336return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero); 375bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0; 376int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero); 382if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_SEP)) 384else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_CHECK)) 387IntPtr hwndParent = Misc.GetParent(_hwnd); 388if(Misc.GetClassName(hwndParent) != "MSTaskSwWClass") 393else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_DROPDOWN) 394&& Misc.IsBitSet(exStyle, NativeMethods.TBSTYLE_EX_DRAWDDARROWS)) 435if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 467return Misc.AccessKey(Text); 475return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 499return Misc.StripMnemonic(Text); 521Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 583return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item; 605int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 642IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 643return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _idCommand); 650|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 657if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 675Misc.MouseClick(((int)boundingRectangle.Left + (int)boundingRectangle.Right) / 2, ((int)boundingRectangle.Top + (int)boundingRectangle.Bottom) / 2); 684if (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)
181string className = Misc.ProxyGetClassName(hwnd); 190string className = Misc.ProxyGetClassName(_hwnd); 203return Misc.ProxyGetText(_hwnd); 242if (!Misc.GetCursorPos(ref pt)) 255Rect[] rects = Misc.GetTitlebarRects(hwnd); 273if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 282if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 291return Misc.ProxyGetText(hwnd); 301if (!Misc.GetCursorPos(ref pt)) 312int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 317if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MINIMIZE)) 323if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MAXIMIZE)) 342return Misc.ProxyGetText(hwnd);
MS\Internal\AutomationProxies\WindowsTreeView.cs (34)
413return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0; 419return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0; 427return (Misc.IsBitSet(expanded, NativeMethods.TVIS_EXPANDED)); 438if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0) 444fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0; 525return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem); 531return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask)); 571return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty; 591treeItem.cchTextMax = Misc.MaxLengthNameProperty; 602IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item); 613if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1) 616Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero); 624Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero); 650IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 661int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 819if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 && Misc.IsWindowInGivenProcess(_hwnd, "explorer")) 854if (!Misc.IsItemVisible(_hwnd, ref itemRect)) 870IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 871return Misc.GetItemToolTipText(_hwnd, hwndToolTip, _item); 907if (!parentRect.IsEmpty && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 1231Misc.SetFocus(_hwnd); 1235Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem); 1288int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED)); 1290return Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED); 1404state = Misc.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked; 1452state = Misc.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked; 1472if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1481return Misc.IsBitSet(WindowStyle, NativeMethods.TVS_EDITLABELS); 1489if (Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED)) 1501bool isCheckbox = Misc.IsBitSet(WindowStyle, NativeMethods.TVS_CHECKBOXES); 1544Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1545Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1607if (!Misc.ReadProcessMemory(hProcess, pAddress, new IntPtr(&ent), new IntPtr(readSize), out count)) 1643int childId = Misc.ProxySendMessageInt(_hwnd, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (19)
194if (Misc.PtInRect(ref rc, x, y)) 231Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0)); 234Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 302return Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32"); 348int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 361IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 366hwndBuddy = Misc.GetParent(hwnd); 376return hwndBuddy != IntPtr.Zero && Misc.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) != -1; 385int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 399int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 531if (IsHorizontal(_hwnd) && Misc.IsLayoutRTL(_hwnd)) 540if (!Misc.GetWindowRect(_hwnd, ref updownRect)) 550Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center); 551Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center); 568if (!Misc.GetWindowRect(hwnd, ref updownRect)) 577if (fHorz && Misc.IsLayoutRTL(hwnd)) 633hwndParent = Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero; 641return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.UDS_HORZ);
MS\Internal\AutomationProxies\WinEventTracker.cs (9)
171if (Misc.IsCriticalException(e)) 181hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); 190Misc.UnhookWinEvent(hp._winEventHook); 274if (Misc.IsCriticalException(e)) 319if (Misc.IsCriticalException(e)) 334if (Misc.IsCriticalException(e)) 372if (Misc.GetWindowThreadProcessId(hwnd, out processId) == 0) 488return Misc.ProxyGetClassName(Process.GetProcessById(processId).MainWindowHandle).Equals("ConsoleWindowClass"); 492if (Misc.IsCriticalException(e))
MS\Internal\AutomationProxies\WinFormsSpinner.cs (6)
40text = Misc.ProxyGetText(hwndEdit); 132IntPtr hwndFirstChild = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 139IntPtr hwndLastChild = Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDLAST); 146if (Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDNEXT) != hwndLastChild) 157if (Misc.ProxyGetClassName(hwndLastChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1) 165if (Misc.ProxyGetClassName(hwndFirstChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1)