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