830 references to Misc
UIAutomationClientsideProviders (830)
MS\Internal\AutomationProxies\Accessible.cs (5)
177
IntPtr lResult =
Misc
.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject));
727
return
Misc
.IsBitSet((int)state, (int)testState);
1161
if (
Misc
.IsCriticalException(e) && ! (e is NullReferenceException))
1337
if (
Misc
.IsCriticalException(e) && ! (e is NullReferenceException))
1372
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\ClickablePoint.cs (9)
24
_hwndProgman =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null);
64
for (hwnd =
Misc
.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd =
Misc
.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT))
78
hwnd =
Misc
.GetWindow(hwnd, NativeMethods.GW_HWNDPREV);
88
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwndCurrent), NativeMethods.WS_POPUP))
95
hwnd =
Misc
.GetParent(hwndCurrent);
245
if (!
Misc
.GetWindowRect(hwnd, ref rc))
263
int lr =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (6)
54
SetHandle(
Misc
.VirtualAllocEx(_processHandle, IntPtr.Zero, new UIntPtr((uint)cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE));
70
return
Misc
.VirtualFreeEx(_processHandle, handle, UIntPtr.Zero, UnsafeNativeMethods.MEM_RELEASE);
94
Misc
.WriteProcessMemory(_processHandle, handle, sourceAddress, cbSize, out count);
100
Misc
.ReadProcessMemory(_processHandle, remoteAddress, destAddress, cbSize, out count);
106
Misc
.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count);
111
Misc
.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count);
MS\Internal\AutomationProxies\CommonXSendMessage.cs (14)
115
IntPtr result =
Misc
.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address);
204
if (
Misc
.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address) == IntPtr.Zero)
245
IntPtr res =
Misc
.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address);
292
IntPtr res =
Misc
.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam));
348
IntPtr res =
Misc
.ProxySendMessage(hwnd, uMsg, rmem1.Address, rmem2.Address);
389
int res =
Misc
.ProxySendMessageInt(hwnd, uMsg, wParam, rmem.Address);
992
if (
Misc
.MapWindowPoints(IntPtr.Zero, hwnd, ref clientPoint, 1))
1196
if (
Misc
.ProxySendMessageInt(hwnd, msg, new IntPtr(index), remoteMem.Address) != 0)
1199
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2);
1265
if (
Misc
.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero)
1375
if (
Misc
.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count))
1423
if (
Misc
.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count))
1471
if (
Misc
.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count))
1502
if (!
Misc
.IsWow64Process(hProcess, out isWOW64Process))
MS\Internal\AutomationProxies\EventManager.cs (3)
462
int style =
Misc
.GetWindowStyle(hwnd);
465
if (
Misc
.IsBitSet(style, NativeMethods.WS_MAXIMIZE))
469
else if (
Misc
.IsBitSet(style, NativeMethods.WS_MINIMIZE))
MS\Internal\AutomationProxies\Input.cs (1)
173
Misc
.SendInput(1, ref ki, Marshal.SizeOf(ki));
MS\Internal\AutomationProxies\Misc.cs (10)
392
IntPtr hwndParent =
Misc
.GetParent(hwnd);
407
int code =
Misc
.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero);
1243
if (!
Misc
.ProxyGetTitleBarInfo(hwnd, out ti) || ti.rcTitleBar.IsEmpty)
1253
if(
Misc
.IsControlRTL(hwnd))
1889
int commonControlVersion =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero);
1942
tool.hwnd =
Misc
.GetParent(lParam.hwnd);
2007
if (!
Misc
.ProxyGetTitleBarInfo(hwnd, out tiDL))
2031
if (
Misc
.IsLayoutRTL(hwnd))
2039
leftEdge = (int)(
Misc
.GetTitleBarRect(hwnd).Left);
2078
if (!
Misc
.ProxyGetTitleBarInfoEx(hwnd, out ti))
MS\Internal\AutomationProxies\MSAANativeProvider.cs (10)
171
int index =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true);
377
string className =
Misc
.GetClassName(_hwnd);
481
Misc
.SetFocus(_hwnd);
645
Misc
.SetFocus(_hwnd);
659
Misc
.SetFocus(_hwnd);
673
Misc
.SetFocus(_hwnd);
948
Misc
.GetWindowThreadProcessId(_hwnd, out pid);
1092
string className =
Misc
.GetClassName(hwnd);
1232
Misc
.SetFocus(_hwnd);
1240
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\MSAAWinEventWrap.cs (4)
88
_hHooks[0] =
Misc
.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc, 0, 0, _fFlags);
108
Misc
.UnhookWinEvent(_hHooks[i]);
150
if (
Misc
.IsCriticalException(e))
167
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\NonClientArea.cs (14)
116
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));
125
Misc
.GetClientRectInScreenCoordinates(hwnd, ref clientRect)
126
&&
Misc
.GetWindowRect(hwnd, ref windowRect)
216
int hit =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
472
if (
Misc
.ProxyGetClassName(_hwnd) == "SysListView32")
484
if (
Misc
.ProxyGetClassName(_hwnd) == "SysListView32")
509
if (
Misc
.IsBitSet(style, NativeMethods.WS_VSCROLL) &&
Misc
.IsBitSet(style, NativeMethods.WS_HSCROLL))
531
if (!
Misc
.IsBitSet(style, NativeMethods.WS_CHILD))
586
if (
Misc
.IsLayoutRTL(_hwnd))
662
if (
Misc
.GetClassName(hwnd) == "ComboLBox")
731
if (
Misc
.GetClassName(hwnd) == "ComboLBox")
748
int style =
Misc
.GetWindowStyle(hwnd);
749
if (
Misc
.IsBitSet(style, NativeMethods.WS_CHILD))
MS\Internal\AutomationProxies\ProxyFragment.cs (1)
228
if (fragment == fromPoint ||
Misc
.Compare(fragment, fromPoint))
MS\Internal\AutomationProxies\ProxyHwnd.cs (15)
203
IntPtr label =
Misc
.GetLabelhwnd(_hwnd);
204
name =
Misc
.GetControlName(label, true);
212
name =
Misc
.ProxyGetText(_hwnd);
237
_controlLabel =
Misc
.GetLabelhwnd(_hwnd);
255
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
262
if (
Misc
.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty)
266
if (!itemRect.IsEmpty && !
Misc
.IsItemVisible(ref parentRect, ref itemRect))
282
int idChild =
Misc
.GetWindowId(_hwnd);
283
string text =
Misc
.GetItemToolTipText(_hwnd, IntPtr.Zero, idChild);
286
text =
Misc
.GetItemToolTipText(_hwnd, IntPtr.Zero, 0);
495
if (!
Misc
.GetClientRect(hwnd, ref rc))
500
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2))
522
IntPtr label =
Misc
.GetLabelhwnd(hwnd);
525
string labelText =
Misc
.ProxyGetText(label);
528
accessKey =
Misc
.AccessKey(labelText);
MS\Internal\AutomationProxies\ProxySimple.cs (14)
114
if (!
Misc
.GetWindowRect(_hwnd, ref controlRectangle))
145
return
Misc
.AppendToRuntimeId(GetParent().GetRuntimeId(), _item);
221
return
Misc
.IsEnabled(_hwnd);
232
Misc
.GetWindowThreadProcessId(_hwnd, out pid);
254
return
Misc
.GetFocusedWindow() == _hwnd ? IsFocused() : false;
285
if (
Misc
.GetFocusedWindow() == _hwnd && IsFocused())
300
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_TABSTOP))
339
if (!parentRect.IsEmpty && !
Misc
.IsItemVisible(ref parentRect, ref itemRect))
357
string sRawName =
Misc
.GetControlName(_hwnd, false);
359
return string.IsNullOrEmpty(sRawName) ? null :
Misc
.AccessKey(sRawName);
596
Misc
.GetClientRectInScreenCoordinates(_hwnd, ref rcOutside);
598
if (!
Misc
.IntersectRect(ref rcItem, ref rcOutside, ref rcItem))
681
return
Misc
.GetWindowStyle(_hwnd);
690
return
Misc
.GetWindowExStyle(_hwnd);
MS\Internal\AutomationProxies\QueueProcessor.cs (3)
116
Misc
.DispatchMessage(ref msg);
132
int result =
Misc
.MsgWaitForMultipleObjects(handle, false, NativeMethods.INFINITE, NativeMethods.QS_ALLINPUT);
141
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\SafeProcessHandle.cs (3)
42
Misc
.GetWindowThreadProcessId(hwnd, out processId);
46
SetHandle(
Misc
.OpenProcess(NativeMethods.PROCESS_QUERY_INFORMATION | NativeMethods.PROCESS_VM_OPERATION | NativeMethods.PROCESS_VM_READ | NativeMethods.PROCESS_VM_WRITE, false, processId, hwnd));
62
return
Misc
.CloseHandle(handle);
MS\Internal\AutomationProxies\WindowsAltTab.cs (6)
146
if (
Misc
.MapWindowPoints(System.IntPtr.Zero, _hwnd, ref pt, 1))
150
if(
Misc
.GetClientRect(_hwnd, ref clientRect))
152
if (
Misc
.PtInRect(ref clientRect, pt.x, pt.y))
269
Misc
.ThrowWin32ExceptionsIfError(lastWin32Error);
361
return GetBoundingRect().ToRect(
Misc
.IsControlRTL(_hwnd));
406
if(!
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (30)
121
style =
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK;
207
int state =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero);
208
if (
Misc
.IsBitSet(state, NativeMethods.BST_PUSHED)
274
return
Misc
.AccessKey(
Misc
.ProxyGetText(_hwnd));
348
new WindowsButton(hwndRadioButton, null, ButtonType.RadioButton,
Misc
.GetWindowStyle(hwndRadioButton) & NativeMethods.BS_TYPEMASK, accRadioButton)
409
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
420
return new WindowsButton(hwndParent, null, ButtonType.GroupBox,
Misc
.GetWindowStyle(hwndParent) & NativeMethods.BS_TYPEMASK, accParent);
490
Misc
.SetFocus(_hwnd);
514
Misc
.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero);
528
Misc
.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true);
535
Misc
.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true);
557
IntPtr hwndShell =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null);
569
if (!
Misc
.GetClassName(_hwnd).Equals("Button"))
577
return
Misc
.InTheShellProcess(_hwnd) && UnsafeNativeMethods.GetProp(_hwnd, "StartButtonTag") == new IntPtr(304);
581
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
584
if (
Misc
.GetClassName(hwndParent).Equals("Shell_TrayWnd"))
595
if (!
Misc
.GetClassName(_hwnd).Equals("Button"))
600
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
603
if (
Misc
.GetClassName(hwndParent).Equals("Desktop More Programs Pane"))
621
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_CHILD))
623
hwndParent =
Misc
.GetParent(hwndRoot);
627
hwndParent =
Misc
.GetWindow(hwndRoot, NativeMethods.GW_OWNER);
660
int state =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero);
661
if (
Misc
.IsBitSet(state, NativeMethods.BST_CHECKED))
665
else if (
Misc
.IsBitSet(state, NativeMethods.BST_INDETERMINATE))
685
Misc
.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound);
714
return
Misc
.StripMnemonic(
Misc
.ProxyGetText(_hwnd));
723
Misc
.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton);
MS\Internal\AutomationProxies\WindowsComboBox.cs (35)
147
if (!
Misc
.GetWindowRect(cbInfo.hwndList, ref rcList))
151
if (!
Misc
.UnionRect(out rcCombo, ref rcCombo, ref rcList))
158
return rcCombo.ToRect(
Misc
.IsControlRTL(_hwnd));
167
if (
Misc
.GetClassName(_hwnd).Equals("Internet Explorer_TridentCmboBx"))
209
return
Misc
.GetControlName(
Misc
.GetLabelhwnd(_hwndEx), true);
272
if (
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2))
274
if (
Misc
.PtInRect(ref cbInfo.rcButton, x, y))
285
if (
Misc
.GetWindowRect(cbInfo.hwndList, ref rcList) &&
286
Misc
.PtInRect(ref rcList, x, y))
389
Misc
.CheckEnabled(_hwnd);
404
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
407
int id =
Misc
.GetWindowId(_hwnd);
410
Misc
.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam, _hwnd);
457
Misc
.CheckEnabled(_hwnd);
471
Misc
.CheckEnabled(_hwnd);
538
bool result =
Misc
.GetComboBoxInfo(hwnd, ref cbInfo);
555
cbInfo.hwndItem =
Misc
.FindWindowEx(hwnd, IntPtr.Zero, "EDIT", null);
558
result =
Misc
.GetWindowRect(cbInfo.hwndItem, ref cbInfo.rcItem);
561
result =
Misc
.MapWindowPoints(_hwndDesktop, hwnd, ref cbInfo.rcItem, 2);
577
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0;
582
IntPtr hwndFocused =
Misc
.GetFocusedWindow();
590
Misc
.SetFocus(hwnd);
592
Misc
.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero);
597
Misc
.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero);
645
return
Misc
.ProxyGetText(IsComboBoxEx32() ? _hwndEx : _hwnd);
653
return (
Misc
.GetWindowStyle(hwnd) & NativeMethods.CBS_COMBOTYPEMASK);
694
return (0 == String.Compare(
Misc
.GetClassName(hwndEx), ComboboxEx32, StringComparison.OrdinalIgnoreCase));
713
index =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
720
int len =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero);
727
if (
Misc
.GetClassName(hwnd).Equals("Internet Explorer_TridentCmboBx"))
738
return
Misc
.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len);
782
if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) &&
Misc
.IsBitSet(NativeMethods.STATE_SYSTEM_PRESSED, cbInfo.stateButton))
941
if (!
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2))
968
Misc
.CheckEnabled(_hwnd);
MS\Internal\AutomationProxies\WindowsContainer.cs (11)
41
string className =
Misc
.ProxyGetClassName(hwnd);
145
return
Misc
.IsBitSet(style, NativeMethods.WS_CAPTION) ||
146
Misc
.IsBitSet(style, NativeMethods.WS_POPUP);
151
int style =
Misc
.GetWindowStyle(hwnd);
152
int exstyle =
Misc
.GetWindowExStyle(hwnd);
154
return
Misc
.IsBitSet(style, NativeMethods.DS_CONTROL) &&
155
Misc
.IsBitSet(style, NativeMethods.WS_CHILD) &&
156
Misc
.IsBitSet(exstyle, NativeMethods.WS_EX_CONTROLPARENT);
183
string dlgName =
Misc
.ProxyGetText(hwnd);
190
IntPtr hwndParent =
Misc
.GetParent(hwnd);
196
hwndTab =
Misc
.FindWindowEx(hwndParent, IntPtr.Zero, "SysTabControl32", null);
MS\Internal\AutomationProxies\WindowsEditBox.cs (40)
169
hwnd =
Misc
.GetParent(hwnd))
304
Misc
.CheckEnabled(_hwnd);
308
if (
Misc
.IsBitSet(styles, NativeMethods.ES_READONLY))
314
if (
Misc
.IsBitSet(styles, NativeMethods.ES_NUMBER))
329
int result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
337
result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
391
if (!
Misc
.MapWindowPoints(IntPtr.Zero, WindowHandle, ref clientLocation, 1))
400
if (!
Misc
.GetClientRect(WindowHandle, ref clientRect))
509
int result =
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam);
558
int style =
Misc
.GetWindowStyle(hwnd);
561
if (
Misc
.IsBitSet(style, NativeMethods.ES_PASSWORD))
565
else if (
Misc
.IsBitSet(style, NativeMethods.ES_MULTILINE))
569
else if (
Misc
.IsBitSet(style, NativeMethods.ES_AUTOHSCROLL))
581
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero);
588
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero);
594
IntPtr result =
Misc
.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero);
611
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero);
620
if (
Misc
.GetObjectW(hfont, cb, ref logfont) != cb)
631
Misc
.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect);
639
Misc
.ProxySendMessage(WindowHandle, NativeMethods.EM_GETSEL, out start, out end);
645
return
Misc
.ProxyGetText(_hwnd, GetTextLength());
651
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero);
661
if (
Misc
.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty)
737
return (!SafeNativeMethods.IsWindowEnabled(WindowHandle) ||
Misc
.IsBitSet(WindowStyle, NativeMethods.ES_READONLY));
746
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero);
752
int index =
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero);
759
return 0 !=
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical);
767
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_VSCROLL))
773
bool ok =
Misc
.GetScrollInfo(WindowHandle, NativeMethods.SB_VERT, ref si);
784
if (
Misc
.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty)
806
int result =
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero);
867
Misc
.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end);
875
return
Misc
.ProxyGetText(hwnd);
916
IntPtr hdc =
Misc
.GetDC(_hwnd);
926
oldFont =
Misc
.SelectObject(hdc, hfont);
927
return
Misc
.GetTextExtentPoint32(hdc, text, text.Length, out size);
933
Misc
.SelectObject(hdc, oldFont);
936
Misc
.ReleaseDC(_hwnd, hdc);
994
string classname =
Misc
.GetClassName(hwndParent);
1010
string classname =
Misc
.GetClassName(hwndParent);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (15)
93
Misc
.SetFocus(_provider._hwnd);
267
if (!
Misc
.MapWindowPoints(_provider.WindowHandle, IntPtr.Zero, ref w32point, 1))
307
return
Misc
.RectArrayToDoubleArray(rectArray);
326
Misc
.SetFocus(_provider._hwnd);
380
Misc
.SetFocus(_provider._hwnd);
444
Misc
.SetFocus(_provider._hwnd);
463
Misc
.SetFocus(_provider._hwnd);
480
Misc
.SetFocus(_provider._hwnd);
503
Misc
.SetFocus(_provider._hwnd);
509
if (
Misc
.IsReadingRTL(_provider._hwnd))
750
if (
Misc
.IsBitSet(style, NativeMethods.ES_CENTER))
754
else if (
Misc
.IsBitSet(style, NativeMethods.ES_RIGHT))
767
return
Misc
.IsBitSet(style, NativeMethods.ES_UPPERCASE) ? CapStyle.AllCap : CapStyle.None;
795
IntPtr hdc =
Misc
.GetDC(IntPtr.Zero);
801
Misc
.ReleaseDC(IntPtr.Zero, hdc);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (9)
61
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
95
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.CheckBox,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
98
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
101
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.PushButton,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
104
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.RadioButton,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
141
return IsWindowsFormsControl(
Misc
.GetClassName(hwnd));
165
if (XSendMessage.XSend(hwnd, WM_GETCONTROLNAME, new IntPtr(
Misc
.MaxLengthNameProperty), ref winFormsID,
Misc
.MaxLengthNameProperty))
206
private static int WM_GETCONTROLNAME =
Misc
.RegisterWindowMessage("WM_GETCONTROLNAME");
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (3)
116
Misc
.SetFocus(_hwnd);
143
Misc
.SetFocus(_hwnd);
148
Misc
.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsGrip.cs (6)
65
if (
Misc
.GetClientRectInScreenCoordinates(_hwnd, ref client))
69
if (
Misc
.IsLayoutRTL(_hwnd))
98
if (!
Misc
.GetClientRectInScreenCoordinates(hwnd, ref client))
118
if (
Misc
.IsLayoutRTL(hwnd))
122
int hit =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
130
int hit =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsHyperlink.cs (7)
126
return
Misc
.StripMnemonic(RemoveHTMLAnchorTag(
Misc
.ProxyGetText(_hwnd)));
212
if (!
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1))
251
if (
Misc
.IsBitSet(_linkItem.state, NativeMethods.LIS_FOCUSED))
454
if (!
Misc
.GetWindowRect(_hwnd, ref BoundingRect))
523
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
524
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (10)
152
Misc
.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4));
167
return
Misc
.ProxyGetText(_hwnd, IP_ADDRESS_STRING_LENGTH);
175
return !
Misc
.IsEnabled(_hwnd);
257
IntPtr hwndChild =
Misc
.GetWindow(_hwnd, NativeMethods.GW_CHILD);
266
hwndChild =
Misc
.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
274
IntPtr hwndChild =
Misc
.GetWindow(_hwnd, NativeMethods.GW_CHILD);
277
hwndChild =
Misc
.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
368
return
Misc
.ProxyGetText(_hwnd);
398
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
493
return WindowsIPAddress.Create(
Misc
.GetParent(_hwnd), 0, 0);
MS\Internal\AutomationProxies\WindowsListBox.cs (36)
78
int style =
Misc
.GetWindowStyle(hwnd);
85
if (
Misc
.IsBitSet(style, NativeMethods.LBS_COMBOBOX))
303
Misc
.GetClientRectInScreenCoordinates(_hwnd, ref listboxrect);
304
if (
Misc
.PtInRect(ref listboxrect, x, y))
306
int ret =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top));
321
int index =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero);
396
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0;
446
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero);
536
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LBS_COMBOBOX))
577
int result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero);
618
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR;
741
int iTextLen =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero);
745
if (
Misc
.GetClassName(_hwnd).Equals("Internet Explorer_TridentLstBox"))
756
string text =
Misc
.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen);
954
Misc
.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero);
1000
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0;
1009
SendMessageResult =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item));
1013
SendMessageResult =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero);
1028
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR;
1053
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item;
1057
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0;
1074
Misc
.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect);
1075
return
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty;
1129
Misc
.MouseClick(pt.x, pt.y);
1143
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item));
1148
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1158
int listBoxStyle =
Misc
.GetWindowStyle(_hwnd);
1159
if (
Misc
.IsBitSet(listBoxStyle, NativeMethods.LBS_NOTIFY))
1162
int idListBox =
Misc
.GetWindowId(_hwnd);
1166
IntPtr hwndListBoxParent =
Misc
.GetParent(_hwnd);
1169
Misc
.ProxySendMessageInt(
1178
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1182
int id =
Misc
.GetWindowId(_hwnd);
1186
Misc
.ProxySendMessageInt(combo._hwnd, NativeMethods.WM_COMMAND, wParam, _hwnd);
1202
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (42)
426
if (
Misc
.PtInRect(ref rc, x, y))
901
return (
Misc
.IsBitSet(state, NativeMethods.LVIS_FOCUSED));
1192
return ((
Misc
.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_REPORT);
1222
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
1250
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags));
1261
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero);
1267
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1));
1273
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_SCROLL, dx, dy) != 0;
1286
return
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2);
1296
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0;
1320
return
Misc
.IsBitSet(GetItemState(hwnd, listItem, NativeMethods.LVIS_SELECTED), NativeMethods.LVIS_SELECTED);
1326
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LVS_EDITLABELS);
1360
return
Misc
.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero);
1366
return
Misc
.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_ONECLICKACTIVATE);
1372
return !
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LVS_SINGLESEL);
1378
return !
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LVS_NOSCROLL);
1386
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0;
1392
return
Misc
.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero);
1398
item.cchTextMax =
Misc
.MaxLengthNameProperty;
1424
if (
Misc
.MapWindowPoints(IntPtr.Zero, hwnd, ref hitTest.pt, 1))
1431
if (
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd))
1460
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
1466
return
Misc
.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_CHECKBOXES);
1480
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LVS_AUTOARRANGE);
1486
return
Misc
.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_FULLROWSELECT);
1492
return
Misc
.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_JUSTIFYCOLUMNS);
1507
return
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2);
1516
IntPtr hwndToolTip =
Misc
.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
1518
return
Misc
.GetItemToolTipText(hwnd, hwndToolTip, 0);
1655
string className =
Misc
.GetClassName(
Misc
.GetParent(_hwnd));
1679
if (!
Misc
.GetScrollBarInfo(_hwnd, scrollBar, ref scrollBarInfo) ||
1695
if (!
Misc
.GetScrollInfo(_hwnd, sbFlag, ref si) ||
1795
return ((
Misc
.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_LIST);
1808
return
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref pt, 1);
1818
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero);
1824
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask));
1846
if (
Misc
.PtInWindowRect(hwndHeader, x, y))
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (6)
45
_isComctrlV6OnOsVerV6orHigher =
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd);
109
group.cchHeader =
Misc
.MaxLengthNameProperty;
120
group.cchHeader =
Misc
.MaxLengthNameProperty;
338
int groupIndex = (int)
Misc
.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
493
if (
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd))
495
int groupIndex = (int)
Misc
.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (6)
253
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0;
380
bool isComctrlV6OnOsVerV6orHigher =
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd);
719
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2);
728
if (!
Misc
.GetWindowRect(_hwnd, ref rcLv))
762
if (
Misc
.IsControlRTL(_hwnd))
830
if (
Misc
.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_VSCROLL, ref sbi))
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (3)
80
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2);
110
group.cchSubsetTitle=
Misc
.MaxLengthNameProperty;
125
Misc
.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (12)
56
_isComctrlV6OnOsVerV6orHigher =
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd);
146
if (
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRectangle, 2))
351
if (!checkboxRectangle.IsEmpty &&
Misc
.PtInRect(ref checkboxRectangle, x, y))
376
int column = (int)
Misc
.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
769
Misc
.SetFocus(hwnd);
869
if (
Misc
.GetWindowRect(hwndHeader, ref headerRect)
870
&&
Misc
.GetClientRectInScreenCoordinates(_hwnd, ref listViewRect))
878
&& !
Misc
.IsItemVisible(ref listViewRect, ref itemRect))
944
if (!
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1))
968
Misc
.MouseClick(clickPoint.x, clickPoint.y, !WindowsListView.ListViewSingleClickActivate(_hwnd));
987
Misc
.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode));
988
Misc
.ProxySendMessage(hwnd, NativeMethods.WM_KEYUP, key, keyUpLParam);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (10)
87
if (
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) && !
Misc
.IsItemVisible(ref parentRect, ref itemRect))
118
return name.Length <
Misc
.MaxLengthNameProperty ? name : name.Substring(0,
Misc
.MaxLengthNameProperty);
160
if (!
Misc
.GetWindowRect(hwnd, ref controlRectangle))
194
if(
Misc
.IsControlRTL(hwnd))
252
Misc
.SetFocus(_hwnd);
257
if (
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1))
260
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
261
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewItemStartMenu.cs (1)
111
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (3)
68
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
90
Misc
.SetScrollPos(_hwnd, _sbFlag, pos, true);
119
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (9)
107
if (
Misc
.IsControlRTL(_hwnd))
122
if (
Misc
.IsControlRTL(_hwnd))
151
if (!
Misc
.IsItemVisible(ref parentRect, ref itemRect))
181
if (
Misc
.GetClassName(ancestor) == "Desktop Search Open View")
185
ancestor =
Misc
.GetParent(ancestor);
208
return name.Length <
Misc
.MaxLengthNameProperty ? name : name.Substring(0,
Misc
.MaxLengthNameProperty);
381
if (
Misc
.IsComctrlV6OnOsVerV6orHigher(_hwnd))
383
int column = (int)
Misc
.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (78)
227
if (!
Misc
.ProxyGetGUIThreadInfo(0, out gui))
244
if (!
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE))
250
hwndPopup =
Misc
.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null);
306
if (
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE))
315
else if (
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_POPUPMENUMODE))
321
else if (
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE))
522
bool result =
Misc
.GetMenuBarInfo(hwnd, idObject, idItem, ref mbi);
607
if (!
Misc
.ProxyGetGUIThreadInfo(0, out gui))
630
for (IntPtr hwndPossibleParent =
Misc
.FindWindowEx(IntPtr.Zero, hwndMenu, WindowsMenu.MenuClassName, null);
632
hwndPossibleParent =
Misc
.FindWindowEx(IntPtr.Zero, hwndPossibleParent, WindowsMenu.MenuClassName, null))
658
for (IntPtr hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null);
660
hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, hwndSubMenu, MenuClassName, null))
685
if (IntPtr.Zero !=
Misc
.GetWindow(hwnd, NativeMethods.GW_OWNER))
698
int count =
Misc
.GetMenuItemCount(hmenuPossibleParent);
723
return
Misc
.GetMenuItemCount(_hmenu);
733
return
Misc
.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero);
746
if (
Misc
.ProxyGetGUIThreadInfo(0, out gui))
748
return
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE);
829
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(_hwnd)))
834
if (!
Misc
.ProxyGetTitleBarInfo(_hwnd, out ti))
896
Misc
.IsBitSet(mbi.focusFlags, 3))
914
if (
Misc
.ProxyGetGUIThreadInfo(0, out gui))
928
return (String.Compare(
Misc
.ProxyGetClassName(hwnd), WindowsMenu.MenuClassName, StringComparison.OrdinalIgnoreCase) == 0);
934
int count =
Misc
.GetMenuItemCount(hmenu);
938
if (
Misc
.IsBitSet(state, NativeMethods.MF_HILITE))
951
hwndPopup =
Misc
.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null);
1103
if (!
Misc
.ProxyGetGUIThreadInfo(0, out gui))
1275
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(_hwnd)))
1280
if (!
Misc
.ProxyGetTitleBarInfo(_hwnd, out ti))
1295
if (
Misc
.GetMenuItemRect(_hwnd, _hmenu, _item, out rc))
1327
menuRawText =
Misc
.StripMnemonic(menuRawText);
1404
if (!
Misc
.IsEnabled(_hwnd))
1459
if (
Misc
.InMenuMode())
1461
IntPtr hwndFocus =
Misc
.GetFocusedWindow();
1474
if (!
Misc
.InMenuMode() && !MenuMode(true))
1481
if (!
Misc
.InMenuMode())
1528
while (!
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
1560
return
Misc
.AccessKey(Text);
1668
if (
Misc
.PtInRect(ref rc, x, y))
1886
return
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE);
1901
return
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED);
1910
if (!
Misc
.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo))
1915
return (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero);
1925
if (!
Misc
.GetMenuItemInfo(hmenu, position, true, ref menuItemInfo))
1930
return (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) ||
1931
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) ||
1932
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK));
1969
if (
Misc
.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo))
1976
if (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) ||
1977
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) ||
1978
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK))
1998
IntPtr hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null);
2108
for (IntPtr hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowsMenu.MenuClassName, null);
2110
hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, hwndSubMenu, WindowsMenu.MenuClassName, null))
2139
Misc
.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' '));
2166
int childIndex = (returnFirstChild) ? 0 :
Misc
.GetMenuItemCount(hSubmenu) - 1;
2214
int cItems =
Misc
.GetMenuItemCount(_hmenu);
2217
for (item = 0; item < cItems && !
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++)
2261
if (
Misc
.ProxyGetGUIThreadInfo(0, out gui) && _hwnd == gui.hwndActive)
2266
if (gui.hwndCapture != IntPtr.Zero &&
Misc
.ProxyGetClassName(gui.hwndCapture) == "ListBox")
2277
return
Misc
.SetFocus(_hwnd);
2287
while (
Misc
.InMenuMode() != fInMenuMode && (dwDelta = SubtractTicks(SafeNativeMethods.GetTickCount(), dwTicks)) < WindowsMenu.TimeOut)
2299
if (
Misc
.InMenuMode() == fSet)
2352
while (!
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
2372
int c =
Misc
.GetMenuItemCount(_hmenu);
2383
if (
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE))
2418
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP))
2577
if (
Misc
.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo))
2579
if (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) ||
2580
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) ||
2581
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK))
2585
else if (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_OWNERDRAW))
2617
if (!
Misc
.ReadProcessMemory(hProcess, dwItemData, new IntPtr(&msaaMenuInfo), new IntPtr(readSize), out count))
2640
if (
Misc
.ReadProcessMemory(hProcess, msaaMenuInfo.pszWText, new IntPtr(text), new IntPtr(readSize), out count))
2671
return !(
Misc
.IsBitSet(state, NativeMethods.MF_DISABLED) |
Misc
.IsBitSet(state, NativeMethods.MF_GRAYED));
2695
if (nextItem <
Misc
.GetMenuItemCount(_hmenu))
2752
menuRawText =
Misc
.StripMnemonic(Text);
MS\Internal\AutomationProxies\WindowsProgressbar.cs (3)
171
int cur =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
172
int min =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero);
173
int max =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (10)
142
if (!
Misc
.GetWindowRect(_hwnd, ref rebarRect))
212
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero);
305
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
306
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, _item);
363
if (hwndBand != IntPtr.Zero &&
Misc
.PtInWindowRect(hwndBand, x, y))
396
Misc
.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero);
422
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2))
429
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), (int)CommonControlStyles.CCS_VERT))
435
return rectW32.ToRect(
Misc
.IsControlRTL(hwnd));
MS\Internal\AutomationProxies\WindowsRichEdit.cs (11)
184
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.ES_READONLY))
190
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(_hwnd))
205
int result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
212
result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
403
while (!gotPoint || !
Misc
.PtInRect(ref rect, x, y))
417
while (gotPoint &&
Misc
.PtInRect(ref rect, x, y) && rangeAdjust.Start != rangeAdjust.End)
431
while (!gotPoint || !
Misc
.PtInRect(ref rect, x, y))
451
} while (gotPoint &&
Misc
.PtInRect(ref rect, x, y));
505
Misc
.IsBitSet(WindowStyle, NativeMethods.ES_READONLY));
607
return
Misc
.ProxyGetText(_hwnd);
727
return
Misc
.GetClassName(hwndParent).Equals("MsoCommandBar");
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (8)
76
Misc
.SetFocus(_pattern._hwnd);
194
Misc
.GetClientRectInScreenCoordinates(_pattern.WindowHandle, ref w32rect);
229
return
Misc
.RectArrayToDoubleArray(rectArray);
277
Misc
.SetFocus(_pattern._hwnd);
295
Misc
.SetFocus(_pattern._hwnd);
327
Misc
.SetFocus(_pattern._hwnd);
349
Misc
.SetFocus(_pattern._hwnd);
373
Misc
.SetFocus(_pattern._hwnd);
MS\Internal\AutomationProxies\WindowsScroll.cs (21)
122
int style =
Misc
.GetWindowStyle(hwnd);
124
if ((sbFlag == NativeMethods.SB_HORZ && !
Misc
.IsBitSet(style, NativeMethods.WS_HSCROLL)) ||
125
(sbFlag == NativeMethods.SB_VERT && !
Misc
.IsBitSet(style, NativeMethods.WS_VSCROLL)))
130
if (!
Misc
.IsEnabled(hwnd))
141
if (
Misc
.GetScrollBarInfo(hwnd, scrollBarObjectId, ref sbi))
144
!
Misc
.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE);
157
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si))
167
int style =
Misc
.GetWindowStyle(hwnd);
169
bool hasScrollableStyle =
Misc
.IsBitSet(style, NativeMethods.WS_HSCROLL) ||
Misc
.IsBitSet(style, NativeMethods.WS_VSCROLL);
171
string className =
Misc
.ProxyGetClassName(hwnd);
176
hasScrollableStyle =
Misc
.IsBitSet(style, NativeMethods.ES_MULTILINE);
207
if (
Misc
.GetScrollInfo(hwnd, sbFlag, ref si))
239
string classname =
Misc
.GetClassName(hwnd);
263
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) || (si.nMax == si.nMin))
304
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) ||
327
bool fRet =
Misc
.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero) == 0;
329
if (fRet &&
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos)
350
} while (fRet &&
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos);
378
if ((!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) ||
439
int result =
Misc
.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (25)
157
if (!
Misc
.GetScrollBarInfo(_hwnd, idObject, ref sbi))
177
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(_parent._hwnd)))
232
return IsEnabled() &&
Misc
.IsEnabled(_hwnd);
350
if (
Misc
.PtInRect(ref rc, x, y))
382
return !
Misc
.IsEnabled(_hwnd) || !HasValuePattern(_hwnd, _sbFlag);
430
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.WS_VSCROLL);
435
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.WS_HSCROLL);
441
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.SBS_VERT);
453
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si))
467
if (
Misc
.GetScrollBarInfo(hwnd, idObject, ref sbi))
540
if (_sbFlag != NativeMethods.SB_CTL ||
Misc
.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_CLIENT, ref sbi))
574
string classname =
Misc
.GetClassName(_hwnd);
591
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
602
if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (
Misc
.IsControlRTL(_parent._hwnd)))
642
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
680
string classname =
Misc
.GetClassName(_hwnd);
703
Misc
.SetScrollPos(_hwnd, _sbFlag, val, true);
714
Misc
.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero);
716
Misc
.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero);
731
if (
Misc
.GetScrollBarInfo(hwnd, idObject, ref sbi))
753
if (!
Misc
.GetScrollBarInfo(_hwnd, idObject, ref sbi))
758
return !
Misc
.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE);
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (9)
226
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si))
235
if (!
Misc
.GetScrollBarInfo(hwnd, idObject, ref sbi))
245
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(parent._parent._hwnd)))
307
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2))
399
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2))
426
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(hwnd)))
526
IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ?
Misc
.GetWindowParent(_hwnd) : _hwnd;
552
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
573
Misc
.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd == _hwnd ? IntPtr.Zero : _hwnd));
MS\Internal\AutomationProxies\WindowsSlider.cs (17)
156
if (
Misc
.PtInRect(ref rc, x, y))
184
IntPtr parent =
Misc
.GetParent(_hwnd);
195
Misc
.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero);
272
return (
Misc
.IsBitSet(WindowStyle, NativeMethods.TBS_VERT));
277
int value =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
282
int maxValue =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
300
Misc
.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val));
307
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero);
315
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero);
323
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
331
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero);
425
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
426
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, 0);
456
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero);
479
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rcChannel, 2))
491
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rcThumb, 2))
499
if (
Misc
.IsLayoutRTL(hwnd))
MS\Internal\AutomationProxies\WindowsSpinner.cs (7)
78
hwndBuddy =
Misc
.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero);
84
if (
Misc
.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) == -1)
290
IntPtr hwndParent =
Misc
.GetParent(hwnd);
294
IntPtr hwndChild =
Misc
.GetWindow(hwndParent, NativeMethods.GW_CHILD);
297
string className =
Misc
.ProxyGetClassName(hwndChild);
300
IntPtr hwndBuddy =
Misc
.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero);
306
hwndChild =
Misc
.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
MS\Internal\AutomationProxies\WindowsStatic.cs (6)
80
string className =
Misc
.GetClassName(hwnd).ToLower(System.Globalization.CultureInfo.InvariantCulture);
100
style =
Misc
.GetWindowStyle(hwnd) & NativeMethods.SS_TYPEMASK;
145
return
Misc
.AccessKey(
Misc
.ProxyGetText(_hwnd));
164
return
Misc
.StripMnemonic(
Misc
.ProxyGetText(_hwnd));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (11)
156
return
Misc
.ProxyGetText(_hwnd);
240
if (
Misc
.PtInRect(ref rc, x, y))
250
if (
Misc
.PtInRect(ref rc, x, y))
351
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero);
370
Misc
.EnumChildWindows(hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindChildFromRect), (void*)&info);
378
if (!
Misc
.GetClientRectInScreenCoordinates(hwnd, ref rc))
610
int retValue =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
811
if (!
Misc
.GetClientRectInScreenCoordinates(hwnd, ref client))
820
if (
Misc
.IsLayoutRTL(hwnd))
846
int style =
Misc
.GetWindowStyle(hwnd);
847
return
Misc
.IsBitSet(style, SBARS_SIZEGRIP) || WindowsGrip.IsGripPresent(hwnd, true);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (29)
92
if (
Misc
.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0)
173
if (
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1))
193
int item =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
209
return
Misc
.IsBitSet(WindowStyle, NativeMethods.HDS_VERT) ? OrientationType.Vertical : OrientationType.Horizontal;
263
if (
Misc
.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0)
300
Misc
.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero);
308
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.HDS_HIDDEN);
314
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero);
319
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
434
return
Misc
.AccessKey(Text);
445
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
449
if (
Misc
.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty)
451
if (!
Misc
.IsItemVisible(ref parentRect, ref itemRect))
467
return
Misc
.StripMnemonic(Text);
500
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
501
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
542
if (
Misc
.IsComctrlV6OnOsVerV6orHigher(_hwnd))
544
int item =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
592
if (!
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2))
605
if (
Misc
.IsLayoutRTL(_hwnd))
667
return (
Misc
.IsBitSet(WindowStyle, NativeMethods.HDS_BUTTONS));
673
return (
Misc
.IsBitSet(WindowStyle, NativeMethods.HDS_FILTERBAR));
687
return
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1);
712
int item =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
746
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
747
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
756
if (
Misc
.GetFocusedWindow().Equals(_hwnd))
759
IntPtr hwndDropDown =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "DropDown", null);
MS\Internal\AutomationProxies\WindowsTab.cs (51)
262
if (!
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref hti.pt, 1))
271
if (updownHwnd != IntPtr.Zero &&
Misc
.PtInWindowRect(updownHwnd, x, y))
293
int focusIndex =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero);
362
string sTitle =
Misc
.ProxyGetText(hwnd);
444
return !
Misc
.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS);
511
int range =
Misc
.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
519
Misc
.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos);
520
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
540
int range =
Misc
.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
543
int posResult =
Misc
.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
579
if (!
Misc
.GetWindowRect(_hwnd, ref viewable))
598
if (!
Misc
.GetWindowRect(updownHwnd, ref rectW32))
651
int count =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
693
int range =
Misc
.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
697
Misc
.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos);
698
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
730
&&
Misc
.ProxyGetClassName(hwndParent).Contains("SysTabControl32"))
756
IntPtr childHwnd =
Misc
.GetWindow(hwnd, NativeMethods.GW_CHILD);
765
className =
Misc
.ProxyGetClassName(childHwnd);
772
childHwnd =
Misc
.GetWindow(childHwnd, NativeMethods.GW_HWNDLAST);
787
return
Misc
.IsBitSet(style, NativeMethods.TCS_MULTILINE) &&
788
(
Misc
.IsBitSet(style, NativeMethods.TCS_RIGHT) ||
789
Misc
.IsBitSet(style, NativeMethods.TCS_VERTICAL));
814
int newPos =
Misc
.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
815
int range =
Misc
.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
854
Misc
.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos);
855
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
867
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_MULTISELECT));
957
return
Misc
.AccessKey(WindowsTabItem.GetItemText(_hwnd, _item));
972
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
973
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, _item);
999
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.TCS_FOCUSNEVER))
1009
Misc
.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
1109
Misc
.MouseClick(pt.x, pt.y);
1145
Misc
.MouseClick(pt.x, pt.y);
1153
else if (
Misc
.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS))
1155
Misc
.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero);
1187
return
Misc
.IsBitSet(TCItem.dwState, NativeMethods.TCIS_BUTTONPRESSED);
1240
return !fIsWinform ?
Misc
.StripMnemonic(sName) : sName;
1245
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
1261
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item;
1283
return
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty;
1294
if (
Misc
.IsBitSet(WindowStyle, (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_FOCUSNEVER)))
1303
if (
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1))
1305
Misc
.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1306
Misc
.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1312
Misc
.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
1325
hwndParent =
Misc
.GetParent(hwndParent);
1336
return
Misc
.FindWindowEx(hwndParent, IntPtr.Zero, null, sName);
1350
tcitem.cchTextMax =
Misc
.MaxLengthNameProperty;
MS\Internal\AutomationProxies\WindowsTitleBar.cs (21)
70
return
Misc
.GetTitleBarRect(_hwnd);
86
return
Misc
.ProxyGetText(_hwnd);
124
int hit =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y));
211
Misc
.ProxyGetTitleBarInfo(_hwnd, out ti);
218
if (!
Misc
.IsBitSet(ti.rgstate[i], NativeMethods.STATE_SYSTEM_INVISIBLE) || i == _systemMenu)
232
if (
Misc
.ProxyGetTitleBarInfo(hwnd, out ti))
234
return !
Misc
.IsBitSet(ti.rgstate[0], NativeMethods.STATE_SYSTEM_INVISIBLE);
299
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE))
309
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE))
330
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_DISABLED))
335
return
Misc
.IsBitSet(WindowExStyle, NativeMethods.WS_EX_CONTEXTHELP);
341
if (
Misc
.IsBitSet(style, NativeMethods.WS_DISABLED))
346
return
Misc
.IsBitSet(style, NativeMethods.WS_MINIMIZEBOX);
353
if (
Misc
.IsBitSet(style, NativeMethods.WS_DISABLED))
358
return
Misc
.IsBitSet(style, NativeMethods.WS_MAXIMIZEBOX);
371
Rect[] rects =
Misc
.GetTitlebarRects(_hwnd);
384
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE))
393
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE))
444
Misc
.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero);
455
Misc
.ClearMenuMode();
458
Misc
.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (26)
226
if (
Misc
.PtInRect(ref rc, x, y))
242
int focusIndex =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero);
271
string name =
Misc
.ProxyGetText(_hwnd);
313
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0)
343
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero);
383
bool hasImageList =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0;
384
int exStyle =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero);
390
if (
Misc
.IsBitSet(buttonStyle, NativeMethods.BTNS_SEP))
392
else if (
Misc
.IsBitSet(buttonStyle, NativeMethods.BTNS_CHECK))
395
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
396
if(
Misc
.GetClassName(hwndParent) != "MSTaskSwWClass")
401
else if (
Misc
.IsBitSet(buttonStyle, NativeMethods.BTNS_DROPDOWN)
402
&&
Misc
.IsBitSet(exStyle, NativeMethods.TBSTYLE_EX_DRAWDDARROWS))
443
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
475
return
Misc
.AccessKey(Text);
483
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0;
507
return
Misc
.StripMnemonic(Text);
529
Misc
.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero);
591
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item;
613
int len =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero);
650
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
651
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, _idCommand);
658
||
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
665
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
683
Misc
.MouseClick(((int)boundingRectangle.Left + (int)boundingRectangle.Right) / 2, ((int)boundingRectangle.Top + (int)boundingRectangle.Bottom) / 2);
692
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
80
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
86
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (15)
192
string className =
Misc
.ProxyGetClassName(hwnd);
201
string className =
Misc
.ProxyGetClassName(_hwnd);
214
return
Misc
.ProxyGetText(_hwnd);
254
if (!
Misc
.GetCursorPos(ref pt))
267
Rect[] rects =
Misc
.GetTitlebarRects(hwnd);
285
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE))
294
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE))
303
return
Misc
.ProxyGetText(hwnd);
313
if (!
Misc
.GetCursorPos(ref pt))
324
int hit =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
329
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.WS_MINIMIZE))
335
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.WS_MAXIMIZE))
354
return
Misc
.ProxyGetText(hwnd);
MS\Internal\AutomationProxies\WindowsTreeView.cs (34)
422
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0;
428
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0;
436
return (
Misc
.IsBitSet(expanded, NativeMethods.TVIS_EXPANDED));
447
if (
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0)
453
fRet =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0;
534
return
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem);
540
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask));
580
return
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty;
600
treeItem.cchTextMax =
Misc
.MaxLengthNameProperty;
611
IntPtr hwndEdit =
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item);
622
if (
Misc
.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1)
625
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero);
633
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero);
659
IntPtr hItem =
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero);
670
int lCommonControlVersion =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero);
828
if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 &&
Misc
.IsWindowInGivenProcess(_hwnd, "explorer"))
863
if (!
Misc
.IsItemVisible(_hwnd, ref itemRect))
879
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
880
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, _item);
916
if (!parentRect.IsEmpty && !
Misc
.IsItemVisible(ref parentRect, ref itemRect))
1240
Misc
.SetFocus(_hwnd);
1244
Misc
.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem);
1297
int selected =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED));
1299
return
Misc
.IsBitSet(selected, NativeMethods.TVIS_SELECTED);
1413
state =
Misc
.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked;
1461
state =
Misc
.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked;
1481
if (
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1))
1490
return
Misc
.IsBitSet(WindowStyle, NativeMethods.TVS_EDITLABELS);
1498
if (
Misc
.IsBitSet(selected, NativeMethods.TVIS_SELECTED))
1510
bool isCheckbox =
Misc
.IsBitSet(WindowStyle, NativeMethods.TVS_CHECKBOXES);
1553
Misc
.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1554
Misc
.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1616
if (!
Misc
.ReadProcessMemory(hProcess, pAddress, new IntPtr(&ent), new IntPtr(readSize), out count))
1652
int childId =
Misc
.ProxySendMessageInt(_hwnd, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (19)
207
if (
Misc
.PtInRect(ref rc, x, y))
244
Misc
.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0));
247
Misc
.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
315
return
Misc
.ProxyGetClassName(hwndParent).Contains("SysTabControl32");
361
int pos =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
374
IntPtr hwndBuddy =
Misc
.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero);
379
hwndBuddy =
Misc
.GetParent(hwnd);
389
return hwndBuddy != IntPtr.Zero &&
Misc
.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) != -1;
398
int range =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
412
int range =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
544
if (IsHorizontal(_hwnd) &&
Misc
.IsLayoutRTL(_hwnd))
553
if (!
Misc
.GetWindowRect(_hwnd, ref updownRect))
563
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center);
564
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center);
581
if (!
Misc
.GetWindowRect(hwnd, ref updownRect))
590
if (fHorz &&
Misc
.IsLayoutRTL(hwnd))
646
hwndParent =
Misc
.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero;
654
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.UDS_HORZ);
MS\Internal\AutomationProxies\WinEventTracker.cs (9)
178
if (
Misc
.IsCriticalException(e))
188
hp._winEventHook =
Misc
.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT);
197
Misc
.UnhookWinEvent(hp._winEventHook);
281
if (
Misc
.IsCriticalException(e))
326
if (
Misc
.IsCriticalException(e))
341
if (
Misc
.IsCriticalException(e))
379
if (
Misc
.GetWindowThreadProcessId(hwnd, out processId) == 0)
495
return
Misc
.ProxyGetClassName(Process.GetProcessById(processId).MainWindowHandle).Equals("ConsoleWindowClass");
499
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\WinFormsSpinner.cs (6)
48
text =
Misc
.ProxyGetText(hwndEdit);
140
IntPtr hwndFirstChild =
Misc
.GetWindow(hwnd, NativeMethods.GW_CHILD);
147
IntPtr hwndLastChild =
Misc
.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDLAST);
154
if (
Misc
.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDNEXT) != hwndLastChild)
165
if (
Misc
.ProxyGetClassName(hwndLastChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1)
173
if (
Misc
.ProxyGetClassName(hwndFirstChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1)