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