830 references to Misc
UIAutomationClientSideProviders (830)
MS\Internal\AutomationProxies\Accessible.cs (5)
163
IntPtr lResult =
Misc
.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject));
698
return
Misc
.IsBitSet((int)state, (int)testState);
1098
if (
Misc
.IsCriticalException(e) && ! (e is NullReferenceException))
1273
if (
Misc
.IsCriticalException(e) && ! (e is NullReferenceException))
1308
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)
43
SetHandle(
Misc
.VirtualAllocEx(_processHandle, IntPtr.Zero, new UIntPtr((uint)cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE));
55
return
Misc
.VirtualFreeEx(_processHandle, handle, UIntPtr.Zero, UnsafeNativeMethods.MEM_RELEASE);
79
Misc
.WriteProcessMemory(_processHandle, handle, sourceAddress, cbSize, out count);
85
Misc
.ReadProcessMemory(_processHandle, remoteAddress, destAddress, cbSize, out count);
91
Misc
.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count);
96
Misc
.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count);
MS\Internal\AutomationProxies\CommonXSendMessage.cs (14)
107
IntPtr result =
Misc
.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address);
196
if (
Misc
.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address) == IntPtr.Zero)
237
IntPtr res =
Misc
.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address);
284
IntPtr res =
Misc
.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam));
340
IntPtr res =
Misc
.ProxySendMessage(hwnd, uMsg, rmem1.Address, rmem2.Address);
381
int res =
Misc
.ProxySendMessageInt(hwnd, uMsg, wParam, rmem.Address);
984
if (
Misc
.MapWindowPoints(IntPtr.Zero, hwnd, ref clientPoint, 1))
1188
if (
Misc
.ProxySendMessageInt(hwnd, msg, new IntPtr(index), remoteMem.Address) != 0)
1191
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2);
1257
if (
Misc
.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero)
1367
if (
Misc
.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count))
1415
if (
Misc
.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count))
1463
if (
Misc
.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count))
1494
if (!
Misc
.IsWow64Process(hProcess, out isWOW64Process))
MS\Internal\AutomationProxies\EventManager.cs (3)
449
int style =
Misc
.GetWindowStyle(hwnd);
452
if (
Misc
.IsBitSet(style, NativeMethods.WS_MAXIMIZE))
456
else if (
Misc
.IsBitSet(style, NativeMethods.WS_MINIMIZE))
MS\Internal\AutomationProxies\Input.cs (1)
171
Misc
.SendInput(1, ref ki, Marshal.SizeOf(ki));
MS\Internal\AutomationProxies\Misc.cs (10)
378
IntPtr hwndParent =
Misc
.GetParent(hwnd);
392
int code =
Misc
.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero);
1223
if (!
Misc
.ProxyGetTitleBarInfo(hwnd, out ti) || ti.rcTitleBar.IsEmpty)
1233
if(
Misc
.IsControlRTL(hwnd))
1856
int commonControlVersion =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero);
1909
tool.hwnd =
Misc
.GetParent(lParam.hwnd);
1974
if (!
Misc
.ProxyGetTitleBarInfo(hwnd, out tiDL))
1998
if (
Misc
.IsLayoutRTL(hwnd))
2006
leftEdge = (int)(
Misc
.GetTitleBarRect(hwnd).Left);
2045
if (!
Misc
.ProxyGetTitleBarInfoEx(hwnd, out ti))
MS\Internal\AutomationProxies\MSAANativeProvider.cs (10)
158
int index =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true);
364
string className =
Misc
.GetClassName(_hwnd);
456
Misc
.SetFocus(_hwnd);
620
Misc
.SetFocus(_hwnd);
634
Misc
.SetFocus(_hwnd);
648
Misc
.SetFocus(_hwnd);
923
Misc
.GetWindowThreadProcessId(_hwnd, out pid);
1060
string className =
Misc
.GetClassName(hwnd);
1198
Misc
.SetFocus(_hwnd);
1206
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\MSAAWinEventWrap.cs (4)
80
_hHooks[0] =
Misc
.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc, 0, 0, _fFlags);
100
Misc
.UnhookWinEvent(_hHooks[i]);
139
if (
Misc
.IsCriticalException(e))
156
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\NonClientArea.cs (14)
109
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));
118
Misc
.GetClientRectInScreenCoordinates(hwnd, ref clientRect)
119
&&
Misc
.GetWindowRect(hwnd, ref windowRect)
209
int hit =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
465
if (
Misc
.ProxyGetClassName(_hwnd) == "SysListView32")
477
if (
Misc
.ProxyGetClassName(_hwnd) == "SysListView32")
502
if (
Misc
.IsBitSet(style, NativeMethods.WS_VSCROLL) &&
Misc
.IsBitSet(style, NativeMethods.WS_HSCROLL))
524
if (!
Misc
.IsBitSet(style, NativeMethods.WS_CHILD))
579
if (
Misc
.IsLayoutRTL(_hwnd))
652
if (
Misc
.GetClassName(hwnd) == "ComboLBox")
715
if (
Misc
.GetClassName(hwnd) == "ComboLBox")
729
int style =
Misc
.GetWindowStyle(hwnd);
730
if (
Misc
.IsBitSet(style, NativeMethods.WS_CHILD))
MS\Internal\AutomationProxies\ProxyFragment.cs (1)
219
if (fragment == fromPoint ||
Misc
.Compare(fragment, fromPoint))
MS\Internal\AutomationProxies\ProxyHwnd.cs (15)
182
IntPtr label =
Misc
.GetLabelhwnd(_hwnd);
183
name =
Misc
.GetControlName(label, true);
191
name =
Misc
.ProxyGetText(_hwnd);
216
_controlLabel =
Misc
.GetLabelhwnd(_hwnd);
234
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
241
if (
Misc
.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty)
245
if (!itemRect.IsEmpty && !
Misc
.IsItemVisible(ref parentRect, ref itemRect))
261
int idChild =
Misc
.GetWindowId(_hwnd);
262
string text =
Misc
.GetItemToolTipText(_hwnd, IntPtr.Zero, idChild);
265
text =
Misc
.GetItemToolTipText(_hwnd, IntPtr.Zero, 0);
474
if (!
Misc
.GetClientRect(hwnd, ref rc))
479
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2))
501
IntPtr label =
Misc
.GetLabelhwnd(hwnd);
504
string labelText =
Misc
.ProxyGetText(label);
507
accessKey =
Misc
.AccessKey(labelText);
MS\Internal\AutomationProxies\ProxySimple.cs (14)
99
if (!
Misc
.GetWindowRect(_hwnd, ref controlRectangle))
130
return
Misc
.AppendToRuntimeId(GetParent().GetRuntimeId(), _item);
206
return
Misc
.IsEnabled(_hwnd);
217
Misc
.GetWindowThreadProcessId(_hwnd, out pid);
239
return
Misc
.GetFocusedWindow() == _hwnd ? IsFocused() : false;
268
if (
Misc
.GetFocusedWindow() == _hwnd && IsFocused())
283
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_TABSTOP))
322
if (!parentRect.IsEmpty && !
Misc
.IsItemVisible(ref parentRect, ref itemRect))
340
string sRawName =
Misc
.GetControlName(_hwnd, false);
342
return string.IsNullOrEmpty(sRawName) ? null :
Misc
.AccessKey(sRawName);
579
Misc
.GetClientRectInScreenCoordinates(_hwnd, ref rcOutside);
581
if (!
Misc
.IntersectRect(ref rcItem, ref rcOutside, ref rcItem))
664
return
Misc
.GetWindowStyle(_hwnd);
673
return
Misc
.GetWindowExStyle(_hwnd);
MS\Internal\AutomationProxies\QueueProcessor.cs (3)
109
Misc
.DispatchMessage(ref msg);
125
int result =
Misc
.MsgWaitForMultipleObjects(handle, false, NativeMethods.INFINITE, NativeMethods.QS_ALLINPUT);
134
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\SafeProcessHandle.cs (3)
29
Misc
.GetWindowThreadProcessId(hwnd, out processId);
33
SetHandle(
Misc
.OpenProcess(NativeMethods.PROCESS_QUERY_INFORMATION | NativeMethods.PROCESS_VM_OPERATION | NativeMethods.PROCESS_VM_READ | NativeMethods.PROCESS_VM_WRITE, false, processId, hwnd));
45
return
Misc
.CloseHandle(handle);
MS\Internal\AutomationProxies\WindowsAltTab.cs (6)
127
if (
Misc
.MapWindowPoints(System.IntPtr.Zero, _hwnd, ref pt, 1))
131
if(
Misc
.GetClientRect(_hwnd, ref clientRect))
133
if (
Misc
.PtInRect(ref clientRect, pt.x, pt.y))
250
Misc
.ThrowWin32ExceptionsIfError(lastWin32Error);
342
return GetBoundingRect().ToRect(
Misc
.IsControlRTL(_hwnd));
387
if(!
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (30)
105
style =
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK;
191
int state =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero);
192
if (
Misc
.IsBitSet(state, NativeMethods.BST_PUSHED)
258
return
Misc
.AccessKey(
Misc
.ProxyGetText(_hwnd));
332
new WindowsButton(hwndRadioButton, null, ButtonType.RadioButton,
Misc
.GetWindowStyle(hwndRadioButton) & NativeMethods.BS_TYPEMASK, accRadioButton)
393
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
404
return new WindowsButton(hwndParent, null, ButtonType.GroupBox,
Misc
.GetWindowStyle(hwndParent) & NativeMethods.BS_TYPEMASK, accParent);
474
Misc
.SetFocus(_hwnd);
498
Misc
.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero);
512
Misc
.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true);
519
Misc
.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true);
541
IntPtr hwndShell =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null);
553
if (!
Misc
.GetClassName(_hwnd).Equals("Button"))
561
return
Misc
.InTheShellProcess(_hwnd) && UnsafeNativeMethods.GetProp(_hwnd, "StartButtonTag") == new IntPtr(304);
565
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
568
if (
Misc
.GetClassName(hwndParent).Equals("Shell_TrayWnd"))
579
if (!
Misc
.GetClassName(_hwnd).Equals("Button"))
584
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
587
if (
Misc
.GetClassName(hwndParent).Equals("Desktop More Programs Pane"))
605
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_CHILD))
607
hwndParent =
Misc
.GetParent(hwndRoot);
611
hwndParent =
Misc
.GetWindow(hwndRoot, NativeMethods.GW_OWNER);
644
int state =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero);
645
if (
Misc
.IsBitSet(state, NativeMethods.BST_CHECKED))
649
else if (
Misc
.IsBitSet(state, NativeMethods.BST_INDETERMINATE))
669
Misc
.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound);
698
return
Misc
.StripMnemonic(
Misc
.ProxyGetText(_hwnd));
707
Misc
.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton);
MS\Internal\AutomationProxies\WindowsComboBox.cs (35)
130
if (!
Misc
.GetWindowRect(cbInfo.hwndList, ref rcList))
134
if (!
Misc
.UnionRect(out rcCombo, ref rcCombo, ref rcList))
141
return rcCombo.ToRect(
Misc
.IsControlRTL(_hwnd));
150
if (
Misc
.GetClassName(_hwnd).Equals("Internet Explorer_TridentCmboBx"))
192
return
Misc
.GetControlName(
Misc
.GetLabelhwnd(_hwndEx), true);
255
if (
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2))
257
if (
Misc
.PtInRect(ref cbInfo.rcButton, x, y))
268
if (
Misc
.GetWindowRect(cbInfo.hwndList, ref rcList) &&
269
Misc
.PtInRect(ref rcList, x, y))
372
Misc
.CheckEnabled(_hwnd);
387
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
390
int id =
Misc
.GetWindowId(_hwnd);
393
Misc
.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam, _hwnd);
440
Misc
.CheckEnabled(_hwnd);
454
Misc
.CheckEnabled(_hwnd);
521
bool result =
Misc
.GetComboBoxInfo(hwnd, ref cbInfo);
538
cbInfo.hwndItem =
Misc
.FindWindowEx(hwnd, IntPtr.Zero, "EDIT", null);
541
result =
Misc
.GetWindowRect(cbInfo.hwndItem, ref cbInfo.rcItem);
544
result =
Misc
.MapWindowPoints(_hwndDesktop, hwnd, ref cbInfo.rcItem, 2);
560
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0;
565
IntPtr hwndFocused =
Misc
.GetFocusedWindow();
573
Misc
.SetFocus(hwnd);
575
Misc
.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero);
580
Misc
.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero);
628
return
Misc
.ProxyGetText(IsComboBoxEx32() ? _hwndEx : _hwnd);
636
return (
Misc
.GetWindowStyle(hwnd) & NativeMethods.CBS_COMBOTYPEMASK);
677
return string.Equals(
Misc
.GetClassName(hwndEx), ComboboxEx32, StringComparison.OrdinalIgnoreCase);
696
index =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
703
int len =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero);
710
if (
Misc
.GetClassName(hwnd).Equals("Internet Explorer_TridentCmboBx"))
721
return
Misc
.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len);
765
if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) &&
Misc
.IsBitSet(NativeMethods.STATE_SYSTEM_PRESSED, cbInfo.stateButton))
921
if (!
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2))
948
Misc
.CheckEnabled(_hwnd);
MS\Internal\AutomationProxies\WindowsContainer.cs (11)
28
string className =
Misc
.ProxyGetClassName(hwnd);
128
return
Misc
.IsBitSet(style, NativeMethods.WS_CAPTION) ||
129
Misc
.IsBitSet(style, NativeMethods.WS_POPUP);
134
int style =
Misc
.GetWindowStyle(hwnd);
135
int exstyle =
Misc
.GetWindowExStyle(hwnd);
137
return
Misc
.IsBitSet(style, NativeMethods.DS_CONTROL) &&
138
Misc
.IsBitSet(style, NativeMethods.WS_CHILD) &&
139
Misc
.IsBitSet(exstyle, NativeMethods.WS_EX_CONTROLPARENT);
166
string dlgName =
Misc
.ProxyGetText(hwnd);
173
IntPtr hwndParent =
Misc
.GetParent(hwnd);
179
hwndTab =
Misc
.FindWindowEx(hwndParent, IntPtr.Zero, "SysTabControl32", null);
MS\Internal\AutomationProxies\WindowsEditBox.cs (40)
151
hwnd =
Misc
.GetParent(hwnd))
266
Misc
.CheckEnabled(_hwnd);
270
if (
Misc
.IsBitSet(styles, NativeMethods.ES_READONLY))
276
if (
Misc
.IsBitSet(styles, NativeMethods.ES_NUMBER))
290
int result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
298
result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
352
if (!
Misc
.MapWindowPoints(IntPtr.Zero, WindowHandle, ref clientLocation, 1))
361
if (!
Misc
.GetClientRect(WindowHandle, ref clientRect))
444
int result =
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam);
493
int style =
Misc
.GetWindowStyle(hwnd);
496
if (
Misc
.IsBitSet(style, NativeMethods.ES_PASSWORD))
500
else if (
Misc
.IsBitSet(style, NativeMethods.ES_MULTILINE))
504
else if (
Misc
.IsBitSet(style, NativeMethods.ES_AUTOHSCROLL))
516
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero);
523
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero);
529
IntPtr result =
Misc
.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero);
546
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero);
555
if (
Misc
.GetObjectW(hfont, cb, ref logfont) != cb)
566
Misc
.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect);
574
Misc
.ProxySendMessage(WindowHandle, NativeMethods.EM_GETSEL, out start, out end);
580
return
Misc
.ProxyGetText(_hwnd, GetTextLength());
586
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero);
596
if (
Misc
.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty)
672
return (!SafeNativeMethods.IsWindowEnabled(WindowHandle) ||
Misc
.IsBitSet(WindowStyle, NativeMethods.ES_READONLY));
681
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero);
687
int index =
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero);
694
return 0 !=
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical);
702
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_VSCROLL))
710
bool ok =
Misc
.GetScrollInfo(WindowHandle, NativeMethods.SB_VERT, ref si);
721
if (
Misc
.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty)
743
int result =
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero);
804
Misc
.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end);
812
return
Misc
.ProxyGetText(hwnd);
853
IntPtr hdc =
Misc
.GetDC(_hwnd);
863
oldFont =
Misc
.SelectObject(hdc, hfont);
864
return
Misc
.GetTextExtentPoint32(hdc, text, text.Length, out size);
870
Misc
.SelectObject(hdc, oldFont);
873
Misc
.ReleaseDC(_hwnd, hdc);
931
string classname =
Misc
.GetClassName(hwndParent);
947
string classname =
Misc
.GetClassName(hwndParent);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (15)
80
Misc
.SetFocus(_provider._hwnd);
242
if (!
Misc
.MapWindowPoints(_provider.WindowHandle, IntPtr.Zero, ref w32point, 1))
282
return
Misc
.RectArrayToDoubleArray(rectArray);
301
Misc
.SetFocus(_provider._hwnd);
355
Misc
.SetFocus(_provider._hwnd);
419
Misc
.SetFocus(_provider._hwnd);
438
Misc
.SetFocus(_provider._hwnd);
455
Misc
.SetFocus(_provider._hwnd);
478
Misc
.SetFocus(_provider._hwnd);
484
if (
Misc
.IsReadingRTL(_provider._hwnd))
725
if (
Misc
.IsBitSet(style, NativeMethods.ES_CENTER))
729
else if (
Misc
.IsBitSet(style, NativeMethods.ES_RIGHT))
742
return
Misc
.IsBitSet(style, NativeMethods.ES_UPPERCASE) ? CapStyle.AllCap : CapStyle.None;
770
IntPtr hdc =
Misc
.GetDC(IntPtr.Zero);
776
Misc
.ReleaseDC(IntPtr.Zero, hdc);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (9)
51
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
85
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.CheckBox,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
88
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
91
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.PushButton,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
94
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.RadioButton,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
131
return IsWindowsFormsControl(
Misc
.GetClassName(hwnd));
155
if (XSendMessage.XSend(hwnd, WM_GETCONTROLNAME, new IntPtr(
Misc
.MaxLengthNameProperty), ref winFormsID,
Misc
.MaxLengthNameProperty))
196
private static int WM_GETCONTROLNAME =
Misc
.RegisterWindowMessage("WM_GETCONTROLNAME");
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (3)
96
Misc
.SetFocus(_hwnd);
123
Misc
.SetFocus(_hwnd);
128
Misc
.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsGrip.cs (6)
51
if (
Misc
.GetClientRectInScreenCoordinates(_hwnd, ref client))
55
if (
Misc
.IsLayoutRTL(_hwnd))
84
if (!
Misc
.GetClientRectInScreenCoordinates(hwnd, ref client))
104
if (
Misc
.IsLayoutRTL(hwnd))
108
int hit =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
116
int hit =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsHyperlink.cs (7)
116
return
Misc
.StripMnemonic(RemoveHTMLAnchorTag(
Misc
.ProxyGetText(_hwnd)));
201
if (!
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1))
239
if (
Misc
.IsBitSet(_linkItem.state, NativeMethods.LIS_FOCUSED))
441
if (!
Misc
.GetWindowRect(_hwnd, ref BoundingRect))
509
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
510
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (10)
138
Misc
.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4));
153
return
Misc
.ProxyGetText(_hwnd, IP_ADDRESS_STRING_LENGTH);
161
return !
Misc
.IsEnabled(_hwnd);
243
IntPtr hwndChild =
Misc
.GetWindow(_hwnd, NativeMethods.GW_CHILD);
252
hwndChild =
Misc
.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
260
IntPtr hwndChild =
Misc
.GetWindow(_hwnd, NativeMethods.GW_CHILD);
263
hwndChild =
Misc
.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
351
return
Misc
.ProxyGetText(_hwnd);
381
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
476
return WindowsIPAddress.Create(
Misc
.GetParent(_hwnd), 0, 0);
MS\Internal\AutomationProxies\WindowsListBox.cs (36)
66
int style =
Misc
.GetWindowStyle(hwnd);
73
if (
Misc
.IsBitSet(style, NativeMethods.LBS_COMBOBOX))
288
Misc
.GetClientRectInScreenCoordinates(_hwnd, ref listboxrect);
289
if (
Misc
.PtInRect(ref listboxrect, x, y))
291
int ret =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top));
306
int index =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero);
381
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0;
431
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero);
518
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LBS_COMBOBOX))
556
int result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero);
597
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR;
720
int iTextLen =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero);
724
if (
Misc
.GetClassName(_hwnd).Equals("Internet Explorer_TridentLstBox"))
735
string text =
Misc
.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen);
933
Misc
.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero);
979
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0;
988
SendMessageResult =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item));
992
SendMessageResult =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero);
1007
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR;
1032
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item;
1036
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0;
1053
Misc
.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect);
1054
return
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty;
1108
Misc
.MouseClick(pt.x, pt.y);
1122
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item));
1127
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1137
int listBoxStyle =
Misc
.GetWindowStyle(_hwnd);
1138
if (
Misc
.IsBitSet(listBoxStyle, NativeMethods.LBS_NOTIFY))
1141
int idListBox =
Misc
.GetWindowId(_hwnd);
1145
IntPtr hwndListBoxParent =
Misc
.GetParent(_hwnd);
1148
Misc
.ProxySendMessageInt(
1157
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1161
int id =
Misc
.GetWindowId(_hwnd);
1165
Misc
.ProxySendMessageInt(combo._hwnd, NativeMethods.WM_COMMAND, wParam, _hwnd);
1181
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (42)
413
if (
Misc
.PtInRect(ref rc, x, y))
887
return (
Misc
.IsBitSet(state, NativeMethods.LVIS_FOCUSED));
1178
return ((
Misc
.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_REPORT);
1208
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
1236
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags));
1247
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero);
1253
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1));
1259
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_SCROLL, dx, dy) != 0;
1272
return
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2);
1282
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0;
1306
return
Misc
.IsBitSet(GetItemState(hwnd, listItem, NativeMethods.LVIS_SELECTED), NativeMethods.LVIS_SELECTED);
1312
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LVS_EDITLABELS);
1346
return
Misc
.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero);
1352
return
Misc
.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_ONECLICKACTIVATE);
1358
return !
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LVS_SINGLESEL);
1364
return !
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LVS_NOSCROLL);
1372
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0;
1378
return
Misc
.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero);
1384
item.cchTextMax =
Misc
.MaxLengthNameProperty;
1411
if (
Misc
.MapWindowPoints(IntPtr.Zero, hwnd, ref hitTest.pt, 1))
1418
if (
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd))
1449
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
1455
return
Misc
.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_CHECKBOXES);
1469
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LVS_AUTOARRANGE);
1475
return
Misc
.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_FULLROWSELECT);
1481
return
Misc
.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_JUSTIFYCOLUMNS);
1496
return
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2);
1505
IntPtr hwndToolTip =
Misc
.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
1507
return
Misc
.GetItemToolTipText(hwnd, hwndToolTip, 0);
1644
string className =
Misc
.GetClassName(
Misc
.GetParent(_hwnd));
1668
if (!
Misc
.GetScrollBarInfo(_hwnd, scrollBar, ref scrollBarInfo) ||
1684
if (!
Misc
.GetScrollInfo(_hwnd, sbFlag, ref si) ||
1784
return ((
Misc
.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_LIST);
1797
return
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref pt, 1);
1807
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero);
1813
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask));
1836
if (
Misc
.PtInWindowRect(hwndHeader, x, y))
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (6)
36
_isComctrlV6OnOsVerV6orHigher =
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd);
100
group.cchHeader =
Misc
.MaxLengthNameProperty;
111
group.cchHeader =
Misc
.MaxLengthNameProperty;
329
int groupIndex = (int)
Misc
.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
485
if (
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd))
487
int groupIndex = (int)
Misc
.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (6)
241
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0;
367
bool isComctrlV6OnOsVerV6orHigher =
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd);
706
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2);
715
if (!
Misc
.GetWindowRect(_hwnd, ref rcLv))
749
if (
Misc
.IsControlRTL(_hwnd))
817
if (
Misc
.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_VSCROLL, ref sbi))
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (3)
79
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2);
109
group.cchSubsetTitle=
Misc
.MaxLengthNameProperty;
124
Misc
.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (12)
44
_isComctrlV6OnOsVerV6orHigher =
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd);
136
if (
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRectangle, 2))
341
if (!checkboxRectangle.IsEmpty &&
Misc
.PtInRect(ref checkboxRectangle, x, y))
366
int column = (int)
Misc
.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
755
Misc
.SetFocus(hwnd);
855
if (
Misc
.GetWindowRect(hwndHeader, ref headerRect)
856
&&
Misc
.GetClientRectInScreenCoordinates(_hwnd, ref listViewRect))
864
&& !
Misc
.IsItemVisible(ref listViewRect, ref itemRect))
930
if (!
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1))
954
Misc
.MouseClick(clickPoint.x, clickPoint.y, !WindowsListView.ListViewSingleClickActivate(_hwnd));
973
Misc
.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode));
974
Misc
.ProxySendMessage(hwnd, NativeMethods.WM_KEYUP, key, keyUpLParam);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (10)
80
if (
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) && !
Misc
.IsItemVisible(ref parentRect, ref itemRect))
111
return name.Length <
Misc
.MaxLengthNameProperty ? name : name.Substring(0,
Misc
.MaxLengthNameProperty);
153
if (!
Misc
.GetWindowRect(hwnd, ref controlRectangle))
187
if(
Misc
.IsControlRTL(hwnd))
245
Misc
.SetFocus(_hwnd);
250
if (
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1))
253
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
254
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewItemStartMenu.cs (1)
98
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (3)
59
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
81
Misc
.SetScrollPos(_hwnd, _sbFlag, pos, true);
110
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (9)
99
if (
Misc
.IsControlRTL(_hwnd))
114
if (
Misc
.IsControlRTL(_hwnd))
143
if (!
Misc
.IsItemVisible(ref parentRect, ref itemRect))
173
if (
Misc
.GetClassName(ancestor) == "Desktop Search Open View")
177
ancestor =
Misc
.GetParent(ancestor);
200
return name.Length <
Misc
.MaxLengthNameProperty ? name : name.Substring(0,
Misc
.MaxLengthNameProperty);
373
if (
Misc
.IsComctrlV6OnOsVerV6orHigher(_hwnd))
375
int column = (int)
Misc
.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (78)
211
if (!
Misc
.ProxyGetGUIThreadInfo(0, out gui))
228
if (!
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE))
234
hwndPopup =
Misc
.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null);
290
if (
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE))
299
else if (
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_POPUPMENUMODE))
305
else if (
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE))
506
bool result =
Misc
.GetMenuBarInfo(hwnd, idObject, idItem, ref mbi);
591
if (!
Misc
.ProxyGetGUIThreadInfo(0, out gui))
614
for (IntPtr hwndPossibleParent =
Misc
.FindWindowEx(IntPtr.Zero, hwndMenu, WindowsMenu.MenuClassName, null);
616
hwndPossibleParent =
Misc
.FindWindowEx(IntPtr.Zero, hwndPossibleParent, WindowsMenu.MenuClassName, null))
642
for (IntPtr hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null);
644
hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, hwndSubMenu, MenuClassName, null))
669
if (IntPtr.Zero !=
Misc
.GetWindow(hwnd, NativeMethods.GW_OWNER))
682
int count =
Misc
.GetMenuItemCount(hmenuPossibleParent);
707
return
Misc
.GetMenuItemCount(_hmenu);
717
return
Misc
.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero);
730
if (
Misc
.ProxyGetGUIThreadInfo(0, out gui))
732
return
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE);
813
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(_hwnd)))
818
if (!
Misc
.ProxyGetTitleBarInfo(_hwnd, out ti))
880
Misc
.IsBitSet(mbi.focusFlags, 3))
898
if (
Misc
.ProxyGetGUIThreadInfo(0, out gui))
912
return string.Equals(
Misc
.ProxyGetClassName(hwnd), WindowsMenu.MenuClassName, StringComparison.OrdinalIgnoreCase);
917
int count =
Misc
.GetMenuItemCount(hmenu);
921
if (
Misc
.IsBitSet(state, NativeMethods.MF_HILITE))
934
hwndPopup =
Misc
.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null);
1085
if (!
Misc
.ProxyGetGUIThreadInfo(0, out gui))
1257
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(_hwnd)))
1262
if (!
Misc
.ProxyGetTitleBarInfo(_hwnd, out ti))
1275
if (
Misc
.GetMenuItemRect(_hwnd, _hmenu, _item, out rc))
1307
menuRawText =
Misc
.StripMnemonic(menuRawText);
1384
if (!
Misc
.IsEnabled(_hwnd))
1439
if (
Misc
.InMenuMode())
1441
IntPtr hwndFocus =
Misc
.GetFocusedWindow();
1454
if (!
Misc
.InMenuMode() && !MenuMode(true))
1461
if (!
Misc
.InMenuMode())
1508
while (!
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
1540
return
Misc
.AccessKey(Text);
1648
if (
Misc
.PtInRect(ref rc, x, y))
1866
return
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE);
1881
return
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED);
1890
if (!
Misc
.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo))
1895
return (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero);
1905
if (!
Misc
.GetMenuItemInfo(hmenu, position, true, ref menuItemInfo))
1910
return (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) ||
1911
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) ||
1912
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK));
1949
if (
Misc
.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo))
1956
if (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) ||
1957
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) ||
1958
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK))
1978
IntPtr hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null);
2088
for (IntPtr hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowsMenu.MenuClassName, null);
2090
hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, hwndSubMenu, WindowsMenu.MenuClassName, null))
2119
Misc
.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' '));
2146
int childIndex = (returnFirstChild) ? 0 :
Misc
.GetMenuItemCount(hSubmenu) - 1;
2194
int cItems =
Misc
.GetMenuItemCount(_hmenu);
2197
for (item = 0; item < cItems && !
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++)
2241
if (
Misc
.ProxyGetGUIThreadInfo(0, out gui) && _hwnd == gui.hwndActive)
2246
if (gui.hwndCapture != IntPtr.Zero &&
Misc
.ProxyGetClassName(gui.hwndCapture) == "ListBox")
2257
return
Misc
.SetFocus(_hwnd);
2267
while (
Misc
.InMenuMode() != fInMenuMode && (dwDelta = SubtractTicks(SafeNativeMethods.GetTickCount(), dwTicks)) < WindowsMenu.TimeOut)
2279
if (
Misc
.InMenuMode() == fSet)
2332
while (!
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
2352
int c =
Misc
.GetMenuItemCount(_hmenu);
2363
if (
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE))
2398
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP))
2557
if (
Misc
.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo))
2559
if (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) ||
2560
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) ||
2561
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK))
2565
else if (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_OWNERDRAW))
2597
if (!
Misc
.ReadProcessMemory(hProcess, dwItemData, new IntPtr(&msaaMenuInfo), new IntPtr(readSize), out count))
2620
if (
Misc
.ReadProcessMemory(hProcess, msaaMenuInfo.pszWText, new IntPtr(text), new IntPtr(readSize), out count))
2651
return !(
Misc
.IsBitSet(state, NativeMethods.MF_DISABLED) |
Misc
.IsBitSet(state, NativeMethods.MF_GRAYED));
2675
if (nextItem <
Misc
.GetMenuItemCount(_hmenu))
2732
menuRawText =
Misc
.StripMnemonic(Text);
MS\Internal\AutomationProxies\WindowsProgressbar.cs (3)
155
int cur =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
156
int min =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero);
157
int max =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (10)
124
if (!
Misc
.GetWindowRect(_hwnd, ref rebarRect))
194
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero);
289
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
290
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, _item);
347
if (hwndBand != IntPtr.Zero &&
Misc
.PtInWindowRect(hwndBand, x, y))
380
Misc
.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero);
406
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2))
413
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), (int)CommonControlStyles.CCS_VERT))
419
return rectW32.ToRect(
Misc
.IsControlRTL(hwnd));
MS\Internal\AutomationProxies\WindowsRichEdit.cs (11)
168
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.ES_READONLY))
174
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(_hwnd))
189
int result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
196
result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
359
while (!gotPoint || !
Misc
.PtInRect(ref rect, x, y))
373
while (gotPoint &&
Misc
.PtInRect(ref rect, x, y) && rangeAdjust.Start != rangeAdjust.End)
387
while (!gotPoint || !
Misc
.PtInRect(ref rect, x, y))
407
} while (gotPoint &&
Misc
.PtInRect(ref rect, x, y));
461
Misc
.IsBitSet(WindowStyle, NativeMethods.ES_READONLY));
561
return
Misc
.ProxyGetText(_hwnd);
685
return
Misc
.GetClassName(hwndParent).Equals("MsoCommandBar");
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (8)
65
Misc
.SetFocus(_pattern._hwnd);
171
Misc
.GetClientRectInScreenCoordinates(_pattern.WindowHandle, ref w32rect);
206
return
Misc
.RectArrayToDoubleArray(rectArray);
251
Misc
.SetFocus(_pattern._hwnd);
269
Misc
.SetFocus(_pattern._hwnd);
301
Misc
.SetFocus(_pattern._hwnd);
323
Misc
.SetFocus(_pattern._hwnd);
347
Misc
.SetFocus(_pattern._hwnd);
MS\Internal\AutomationProxies\WindowsScroll.cs (21)
112
int style =
Misc
.GetWindowStyle(hwnd);
114
if ((sbFlag == NativeMethods.SB_HORZ && !
Misc
.IsBitSet(style, NativeMethods.WS_HSCROLL)) ||
115
(sbFlag == NativeMethods.SB_VERT && !
Misc
.IsBitSet(style, NativeMethods.WS_VSCROLL)))
120
if (!
Misc
.IsEnabled(hwnd))
131
if (
Misc
.GetScrollBarInfo(hwnd, scrollBarObjectId, ref sbi))
134
!
Misc
.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE);
147
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si))
157
int style =
Misc
.GetWindowStyle(hwnd);
159
bool hasScrollableStyle =
Misc
.IsBitSet(style, NativeMethods.WS_HSCROLL) ||
Misc
.IsBitSet(style, NativeMethods.WS_VSCROLL);
161
string className =
Misc
.ProxyGetClassName(hwnd);
166
hasScrollableStyle =
Misc
.IsBitSet(style, NativeMethods.ES_MULTILINE);
198
if (
Misc
.GetScrollInfo(hwnd, sbFlag, ref si))
230
string classname =
Misc
.GetClassName(hwnd);
254
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) || (si.nMax == si.nMin))
297
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) ||
320
bool fRet =
Misc
.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero) == 0;
322
if (fRet &&
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos)
343
} while (fRet &&
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos);
373
if ((!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) ||
434
int result =
Misc
.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (25)
140
if (!
Misc
.GetScrollBarInfo(_hwnd, idObject, ref sbi))
160
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(_parent._hwnd)))
215
return IsEnabled() &&
Misc
.IsEnabled(_hwnd);
332
if (
Misc
.PtInRect(ref rc, x, y))
364
return !
Misc
.IsEnabled(_hwnd) || !HasValuePattern(_hwnd, _sbFlag);
412
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.WS_VSCROLL);
417
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.WS_HSCROLL);
423
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.SBS_VERT);
435
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si))
449
if (
Misc
.GetScrollBarInfo(hwnd, idObject, ref sbi))
522
if (_sbFlag != NativeMethods.SB_CTL ||
Misc
.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_CLIENT, ref sbi))
556
string classname =
Misc
.GetClassName(_hwnd);
575
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
586
if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (
Misc
.IsControlRTL(_parent._hwnd)))
628
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
666
string classname =
Misc
.GetClassName(_hwnd);
689
Misc
.SetScrollPos(_hwnd, _sbFlag, val, true);
700
Misc
.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero);
702
Misc
.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero);
717
if (
Misc
.GetScrollBarInfo(hwnd, idObject, ref sbi))
739
if (!
Misc
.GetScrollBarInfo(_hwnd, idObject, ref sbi))
744
return !
Misc
.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE);
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (9)
217
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si))
226
if (!
Misc
.GetScrollBarInfo(hwnd, idObject, ref sbi))
236
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(parent._parent._hwnd)))
298
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2))
390
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2))
417
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(hwnd)))
517
IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ?
Misc
.GetWindowParent(_hwnd) : _hwnd;
545
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
566
Misc
.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd == _hwnd ? IntPtr.Zero : _hwnd));
MS\Internal\AutomationProxies\WindowsSlider.cs (17)
140
if (
Misc
.PtInRect(ref rc, x, y))
168
IntPtr parent =
Misc
.GetParent(_hwnd);
179
Misc
.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero);
256
return (
Misc
.IsBitSet(WindowStyle, NativeMethods.TBS_VERT));
261
int value =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
266
int maxValue =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
284
Misc
.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val));
291
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero);
299
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero);
307
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
315
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero);
409
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
410
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, 0);
440
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero);
463
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rcChannel, 2))
475
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rcThumb, 2))
483
if (
Misc
.IsLayoutRTL(hwnd))
MS\Internal\AutomationProxies\WindowsSpinner.cs (7)
61
hwndBuddy =
Misc
.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero);
67
if (
Misc
.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) == -1)
273
IntPtr hwndParent =
Misc
.GetParent(hwnd);
277
IntPtr hwndChild =
Misc
.GetWindow(hwndParent, NativeMethods.GW_CHILD);
280
string className =
Misc
.ProxyGetClassName(hwndChild);
283
IntPtr hwndBuddy =
Misc
.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero);
289
hwndChild =
Misc
.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
MS\Internal\AutomationProxies\WindowsStatic.cs (6)
69
string className =
Misc
.GetClassName(hwnd).ToLower(System.Globalization.CultureInfo.InvariantCulture);
89
style =
Misc
.GetWindowStyle(hwnd) & NativeMethods.SS_TYPEMASK;
133
return
Misc
.AccessKey(
Misc
.ProxyGetText(_hwnd));
152
return
Misc
.StripMnemonic(
Misc
.ProxyGetText(_hwnd));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (11)
142
return
Misc
.ProxyGetText(_hwnd);
226
if (
Misc
.PtInRect(ref rc, x, y))
236
if (
Misc
.PtInRect(ref rc, x, y))
337
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero);
357
Misc
.EnumChildWindows(hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindChildFromRect), (void*)&info);
365
if (!
Misc
.GetClientRectInScreenCoordinates(hwnd, ref rc))
597
int retValue =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
798
if (!
Misc
.GetClientRectInScreenCoordinates(hwnd, ref client))
807
if (
Misc
.IsLayoutRTL(hwnd))
833
int style =
Misc
.GetWindowStyle(hwnd);
834
return
Misc
.IsBitSet(style, SBARS_SIZEGRIP) || WindowsGrip.IsGripPresent(hwnd, true);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (29)
79
if (
Misc
.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0)
158
if (
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1))
178
int item =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
194
return
Misc
.IsBitSet(WindowStyle, NativeMethods.HDS_VERT) ? OrientationType.Vertical : OrientationType.Horizontal;
248
if (
Misc
.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0)
285
Misc
.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero);
293
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.HDS_HIDDEN);
299
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero);
304
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
419
return
Misc
.AccessKey(Text);
430
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
434
if (
Misc
.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty)
436
if (!
Misc
.IsItemVisible(ref parentRect, ref itemRect))
452
return
Misc
.StripMnemonic(Text);
482
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
483
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
524
if (
Misc
.IsComctrlV6OnOsVerV6orHigher(_hwnd))
526
int item =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
574
if (!
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2))
587
if (
Misc
.IsLayoutRTL(_hwnd))
649
return (
Misc
.IsBitSet(WindowStyle, NativeMethods.HDS_BUTTONS));
655
return (
Misc
.IsBitSet(WindowStyle, NativeMethods.HDS_FILTERBAR));
669
return
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1);
694
int item =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
725
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
726
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
735
if (
Misc
.GetFocusedWindow().Equals(_hwnd))
738
IntPtr hwndDropDown =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "DropDown", null);
MS\Internal\AutomationProxies\WindowsTab.cs (51)
260
if (!
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref hti.pt, 1))
269
if (updownHwnd != IntPtr.Zero &&
Misc
.PtInWindowRect(updownHwnd, x, y))
291
int focusIndex =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero);
360
string sTitle =
Misc
.ProxyGetText(hwnd);
442
return !
Misc
.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS);
509
int range =
Misc
.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
517
Misc
.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos);
518
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
538
int range =
Misc
.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
541
int posResult =
Misc
.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
578
if (!
Misc
.GetWindowRect(_hwnd, ref viewable))
597
if (!
Misc
.GetWindowRect(updownHwnd, ref rectW32))
650
int count =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
692
int range =
Misc
.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
696
Misc
.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos);
697
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
729
&&
Misc
.ProxyGetClassName(hwndParent).Contains("SysTabControl32"))
755
IntPtr childHwnd =
Misc
.GetWindow(hwnd, NativeMethods.GW_CHILD);
764
className =
Misc
.ProxyGetClassName(childHwnd);
771
childHwnd =
Misc
.GetWindow(childHwnd, NativeMethods.GW_HWNDLAST);
786
return
Misc
.IsBitSet(style, NativeMethods.TCS_MULTILINE) &&
787
(
Misc
.IsBitSet(style, NativeMethods.TCS_RIGHT) ||
788
Misc
.IsBitSet(style, NativeMethods.TCS_VERTICAL));
813
int newPos =
Misc
.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
814
int range =
Misc
.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
853
Misc
.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos);
854
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
866
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_MULTISELECT));
956
return
Misc
.AccessKey(WindowsTabItem.GetItemText(_hwnd, _item));
971
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
972
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, _item);
998
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.TCS_FOCUSNEVER))
1008
Misc
.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
1108
Misc
.MouseClick(pt.x, pt.y);
1144
Misc
.MouseClick(pt.x, pt.y);
1152
else if (
Misc
.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS))
1154
Misc
.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero);
1186
return
Misc
.IsBitSet(TCItem.dwState, NativeMethods.TCIS_BUTTONPRESSED);
1239
return !fIsWinform ?
Misc
.StripMnemonic(sName) : sName;
1244
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
1260
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item;
1282
return
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty;
1293
if (
Misc
.IsBitSet(WindowStyle, (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_FOCUSNEVER)))
1302
if (
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1))
1304
Misc
.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1305
Misc
.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1311
Misc
.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
1324
hwndParent =
Misc
.GetParent(hwndParent);
1335
return
Misc
.FindWindowEx(hwndParent, IntPtr.Zero, null, sName);
1349
tcitem.cchTextMax =
Misc
.MaxLengthNameProperty;
MS\Internal\AutomationProxies\WindowsTitleBar.cs (21)
58
return
Misc
.GetTitleBarRect(_hwnd);
74
return
Misc
.ProxyGetText(_hwnd);
112
int hit =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y));
199
Misc
.ProxyGetTitleBarInfo(_hwnd, out ti);
206
if (!
Misc
.IsBitSet(ti.rgstate[i], NativeMethods.STATE_SYSTEM_INVISIBLE) || i == _systemMenu)
220
if (
Misc
.ProxyGetTitleBarInfo(hwnd, out ti))
222
return !
Misc
.IsBitSet(ti.rgstate[0], NativeMethods.STATE_SYSTEM_INVISIBLE);
287
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE))
297
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE))
318
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_DISABLED))
323
return
Misc
.IsBitSet(WindowExStyle, NativeMethods.WS_EX_CONTEXTHELP);
329
if (
Misc
.IsBitSet(style, NativeMethods.WS_DISABLED))
334
return
Misc
.IsBitSet(style, NativeMethods.WS_MINIMIZEBOX);
341
if (
Misc
.IsBitSet(style, NativeMethods.WS_DISABLED))
346
return
Misc
.IsBitSet(style, NativeMethods.WS_MAXIMIZEBOX);
359
Rect[] rects =
Misc
.GetTitlebarRects(_hwnd);
372
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE))
381
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE))
432
Misc
.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero);
443
Misc
.ClearMenuMode();
446
Misc
.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (26)
213
if (
Misc
.PtInRect(ref rc, x, y))
229
int focusIndex =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero);
258
string name =
Misc
.ProxyGetText(_hwnd);
300
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0)
330
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero);
369
bool hasImageList =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0;
370
int exStyle =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero);
376
if (
Misc
.IsBitSet(buttonStyle, NativeMethods.BTNS_SEP))
378
else if (
Misc
.IsBitSet(buttonStyle, NativeMethods.BTNS_CHECK))
381
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
382
if(
Misc
.GetClassName(hwndParent) != "MSTaskSwWClass")
387
else if (
Misc
.IsBitSet(buttonStyle, NativeMethods.BTNS_DROPDOWN)
388
&&
Misc
.IsBitSet(exStyle, NativeMethods.TBSTYLE_EX_DRAWDDARROWS))
429
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
461
return
Misc
.AccessKey(Text);
469
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0;
493
return
Misc
.StripMnemonic(Text);
515
Misc
.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero);
577
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item;
599
int len =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero);
636
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
637
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, _idCommand);
644
||
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
651
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
669
Misc
.MouseClick(((int)boundingRectangle.Left + (int)boundingRectangle.Right) / 2, ((int)boundingRectangle.Top + (int)boundingRectangle.Bottom) / 2);
678
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
74
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
80
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (15)
174
string className =
Misc
.ProxyGetClassName(hwnd);
183
string className =
Misc
.ProxyGetClassName(_hwnd);
196
return
Misc
.ProxyGetText(_hwnd);
235
if (!
Misc
.GetCursorPos(ref pt))
248
Rect[] rects =
Misc
.GetTitlebarRects(hwnd);
266
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE))
275
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE))
284
return
Misc
.ProxyGetText(hwnd);
294
if (!
Misc
.GetCursorPos(ref pt))
305
int hit =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
310
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.WS_MINIMIZE))
316
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.WS_MAXIMIZE))
335
return
Misc
.ProxyGetText(hwnd);
MS\Internal\AutomationProxies\WindowsTreeView.cs (34)
408
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0;
414
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0;
422
return (
Misc
.IsBitSet(expanded, NativeMethods.TVIS_EXPANDED));
433
if (
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0)
439
fRet =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0;
520
return
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem);
526
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask));
566
return
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty;
586
treeItem.cchTextMax =
Misc
.MaxLengthNameProperty;
597
IntPtr hwndEdit =
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item);
608
if (
Misc
.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1)
611
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero);
619
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero);
645
IntPtr hItem =
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero);
656
int lCommonControlVersion =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero);
814
if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 &&
Misc
.IsWindowInGivenProcess(_hwnd, "explorer"))
849
if (!
Misc
.IsItemVisible(_hwnd, ref itemRect))
865
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
866
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, _item);
902
if (!parentRect.IsEmpty && !
Misc
.IsItemVisible(ref parentRect, ref itemRect))
1226
Misc
.SetFocus(_hwnd);
1230
Misc
.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem);
1283
int selected =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED));
1285
return
Misc
.IsBitSet(selected, NativeMethods.TVIS_SELECTED);
1399
state =
Misc
.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked;
1447
state =
Misc
.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked;
1467
if (
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1))
1476
return
Misc
.IsBitSet(WindowStyle, NativeMethods.TVS_EDITLABELS);
1484
if (
Misc
.IsBitSet(selected, NativeMethods.TVIS_SELECTED))
1496
bool isCheckbox =
Misc
.IsBitSet(WindowStyle, NativeMethods.TVS_CHECKBOXES);
1539
Misc
.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1540
Misc
.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1602
if (!
Misc
.ReadProcessMemory(hProcess, pAddress, new IntPtr(&ent), new IntPtr(readSize), out count))
1638
int childId =
Misc
.ProxySendMessageInt(_hwnd, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (19)
187
if (
Misc
.PtInRect(ref rc, x, y))
224
Misc
.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0));
227
Misc
.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
295
return
Misc
.ProxyGetClassName(hwndParent).Contains("SysTabControl32");
341
int pos =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
354
IntPtr hwndBuddy =
Misc
.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero);
359
hwndBuddy =
Misc
.GetParent(hwnd);
369
return hwndBuddy != IntPtr.Zero &&
Misc
.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) != -1;
378
int range =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
392
int range =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
524
if (IsHorizontal(_hwnd) &&
Misc
.IsLayoutRTL(_hwnd))
533
if (!
Misc
.GetWindowRect(_hwnd, ref updownRect))
543
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center);
544
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center);
561
if (!
Misc
.GetWindowRect(hwnd, ref updownRect))
570
if (fHorz &&
Misc
.IsLayoutRTL(hwnd))
626
hwndParent =
Misc
.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero;
634
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.UDS_HORZ);
MS\Internal\AutomationProxies\WinEventTracker.cs (9)
166
if (
Misc
.IsCriticalException(e))
176
hp._winEventHook =
Misc
.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT);
185
Misc
.UnhookWinEvent(hp._winEventHook);
268
if (
Misc
.IsCriticalException(e))
313
if (
Misc
.IsCriticalException(e))
328
if (
Misc
.IsCriticalException(e))
366
if (
Misc
.GetWindowThreadProcessId(hwnd, out processId) == 0)
484
return
Misc
.ProxyGetClassName(Process.GetProcessById(processId).MainWindowHandle).Equals("ConsoleWindowClass");
488
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\WinFormsSpinner.cs (6)
38
text =
Misc
.ProxyGetText(hwndEdit);
130
IntPtr hwndFirstChild =
Misc
.GetWindow(hwnd, NativeMethods.GW_CHILD);
137
IntPtr hwndLastChild =
Misc
.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDLAST);
144
if (
Misc
.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDNEXT) != hwndLastChild)
155
if (
Misc
.ProxyGetClassName(hwndLastChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1)
163
if (
Misc
.ProxyGetClassName(hwndFirstChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1)