830 references to Misc
UIAutomationClientSideProviders (830)
MS\Internal\AutomationProxies\Accessible.cs (5)
167
IntPtr lResult =
Misc
.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject));
715
return
Misc
.IsBitSet((int)state, (int)testState);
1123
if (
Misc
.IsCriticalException(e) && ! (e is NullReferenceException))
1298
if (
Misc
.IsCriticalException(e) && ! (e is NullReferenceException))
1333
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\ClickablePoint.cs (9)
23
_hwndProgman =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null);
63
for (hwnd =
Misc
.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd =
Misc
.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT))
77
hwnd =
Misc
.GetWindow(hwnd, NativeMethods.GW_HWNDPREV);
87
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwndCurrent), NativeMethods.WS_POPUP))
94
hwnd =
Misc
.GetParent(hwndCurrent);
244
if (!
Misc
.GetWindowRect(hwnd, ref rc))
262
int lr =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (6)
43
SetHandle(
Misc
.VirtualAllocEx(_processHandle, IntPtr.Zero, new UIntPtr((uint)cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE));
55
return
Misc
.VirtualFreeEx(_processHandle, handle, UIntPtr.Zero, UnsafeNativeMethods.MEM_RELEASE);
79
Misc
.WriteProcessMemory(_processHandle, handle, sourceAddress, cbSize, out count);
85
Misc
.ReadProcessMemory(_processHandle, remoteAddress, destAddress, cbSize, out count);
91
Misc
.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count);
96
Misc
.ReadProcessMemory(_processHandle, handle, destAddress, cbSize, out count);
MS\Internal\AutomationProxies\CommonXSendMessage.cs (14)
107
IntPtr result =
Misc
.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address);
196
if (
Misc
.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address) == IntPtr.Zero)
237
IntPtr res =
Misc
.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address);
284
IntPtr res =
Misc
.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam));
340
IntPtr res =
Misc
.ProxySendMessage(hwnd, uMsg, rmem1.Address, rmem2.Address);
381
int res =
Misc
.ProxySendMessageInt(hwnd, uMsg, wParam, rmem.Address);
984
if (
Misc
.MapWindowPoints(IntPtr.Zero, hwnd, ref clientPoint, 1))
1188
if (
Misc
.ProxySendMessageInt(hwnd, msg, new IntPtr(index), remoteMem.Address) != 0)
1191
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2);
1257
if (
Misc
.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero)
1367
if (
Misc
.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count))
1415
if (
Misc
.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count))
1463
if (
Misc
.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count))
1494
if (!
Misc
.IsWow64Process(hProcess, out isWOW64Process))
MS\Internal\AutomationProxies\EventManager.cs (3)
449
int style =
Misc
.GetWindowStyle(hwnd);
452
if (
Misc
.IsBitSet(style, NativeMethods.WS_MAXIMIZE))
456
else if (
Misc
.IsBitSet(style, NativeMethods.WS_MINIMIZE))
MS\Internal\AutomationProxies\Input.cs (1)
166
Misc
.SendInput(1, ref ki, Marshal.SizeOf(ki));
MS\Internal\AutomationProxies\Misc.cs (10)
381
IntPtr hwndParent =
Misc
.GetParent(hwnd);
396
int code =
Misc
.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero);
1230
if (!
Misc
.ProxyGetTitleBarInfo(hwnd, out ti) || ti.rcTitleBar.IsEmpty)
1240
if(
Misc
.IsControlRTL(hwnd))
1876
int commonControlVersion =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero);
1929
tool.hwnd =
Misc
.GetParent(lParam.hwnd);
1994
if (!
Misc
.ProxyGetTitleBarInfo(hwnd, out tiDL))
2018
if (
Misc
.IsLayoutRTL(hwnd))
2026
leftEdge = (int)(
Misc
.GetTitleBarRect(hwnd).Left);
2065
if (!
Misc
.ProxyGetTitleBarInfoEx(hwnd, out ti))
MS\Internal\AutomationProxies\MSAANativeProvider.cs (10)
161
int index =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true);
367
string className =
Misc
.GetClassName(_hwnd);
459
Misc
.SetFocus(_hwnd);
623
Misc
.SetFocus(_hwnd);
637
Misc
.SetFocus(_hwnd);
651
Misc
.SetFocus(_hwnd);
926
Misc
.GetWindowThreadProcessId(_hwnd, out pid);
1063
string className =
Misc
.GetClassName(hwnd);
1203
Misc
.SetFocus(_hwnd);
1211
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)
115
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));
124
Misc
.GetClientRectInScreenCoordinates(hwnd, ref clientRect)
125
&&
Misc
.GetWindowRect(hwnd, ref windowRect)
215
int hit =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
471
if (
Misc
.ProxyGetClassName(_hwnd) == "SysListView32")
483
if (
Misc
.ProxyGetClassName(_hwnd) == "SysListView32")
508
if (
Misc
.IsBitSet(style, NativeMethods.WS_VSCROLL) &&
Misc
.IsBitSet(style, NativeMethods.WS_HSCROLL))
530
if (!
Misc
.IsBitSet(style, NativeMethods.WS_CHILD))
585
if (
Misc
.IsLayoutRTL(_hwnd))
661
if (
Misc
.GetClassName(hwnd) == "ComboLBox")
730
if (
Misc
.GetClassName(hwnd) == "ComboLBox")
747
int style =
Misc
.GetWindowStyle(hwnd);
748
if (
Misc
.IsBitSet(style, NativeMethods.WS_CHILD))
MS\Internal\AutomationProxies\ProxyFragment.cs (1)
219
if (fragment == fromPoint ||
Misc
.Compare(fragment, fromPoint))
MS\Internal\AutomationProxies\ProxyHwnd.cs (15)
187
IntPtr label =
Misc
.GetLabelhwnd(_hwnd);
188
name =
Misc
.GetControlName(label, true);
196
name =
Misc
.ProxyGetText(_hwnd);
221
_controlLabel =
Misc
.GetLabelhwnd(_hwnd);
239
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
246
if (
Misc
.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty)
250
if (!itemRect.IsEmpty && !
Misc
.IsItemVisible(ref parentRect, ref itemRect))
266
int idChild =
Misc
.GetWindowId(_hwnd);
267
string text =
Misc
.GetItemToolTipText(_hwnd, IntPtr.Zero, idChild);
270
text =
Misc
.GetItemToolTipText(_hwnd, IntPtr.Zero, 0);
479
if (!
Misc
.GetClientRect(hwnd, ref rc))
484
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2))
506
IntPtr label =
Misc
.GetLabelhwnd(hwnd);
509
string labelText =
Misc
.ProxyGetText(label);
512
accessKey =
Misc
.AccessKey(labelText);
MS\Internal\AutomationProxies\ProxySimple.cs (14)
103
if (!
Misc
.GetWindowRect(_hwnd, ref controlRectangle))
134
return
Misc
.AppendToRuntimeId(GetParent().GetRuntimeId(), _item);
210
return
Misc
.IsEnabled(_hwnd);
221
Misc
.GetWindowThreadProcessId(_hwnd, out pid);
243
return
Misc
.GetFocusedWindow() == _hwnd ? IsFocused() : false;
274
if (
Misc
.GetFocusedWindow() == _hwnd && IsFocused())
289
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_TABSTOP))
328
if (!parentRect.IsEmpty && !
Misc
.IsItemVisible(ref parentRect, ref itemRect))
346
string sRawName =
Misc
.GetControlName(_hwnd, false);
348
return string.IsNullOrEmpty(sRawName) ? null :
Misc
.AccessKey(sRawName);
585
Misc
.GetClientRectInScreenCoordinates(_hwnd, ref rcOutside);
587
if (!
Misc
.IntersectRect(ref rcItem, ref rcOutside, ref rcItem))
670
return
Misc
.GetWindowStyle(_hwnd);
679
return
Misc
.GetWindowExStyle(_hwnd);
MS\Internal\AutomationProxies\QueueProcessor.cs (3)
107
Misc
.DispatchMessage(ref msg);
123
int result =
Misc
.MsgWaitForMultipleObjects(handle, false, NativeMethods.INFINITE, NativeMethods.QS_ALLINPUT);
132
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\SafeProcessHandle.cs (3)
29
Misc
.GetWindowThreadProcessId(hwnd, out processId);
33
SetHandle(
Misc
.OpenProcess(NativeMethods.PROCESS_QUERY_INFORMATION | NativeMethods.PROCESS_VM_OPERATION | NativeMethods.PROCESS_VM_READ | NativeMethods.PROCESS_VM_WRITE, false, processId, hwnd));
45
return
Misc
.CloseHandle(handle);
MS\Internal\AutomationProxies\WindowsAltTab.cs (6)
133
if (
Misc
.MapWindowPoints(System.IntPtr.Zero, _hwnd, ref pt, 1))
137
if(
Misc
.GetClientRect(_hwnd, ref clientRect))
139
if (
Misc
.PtInRect(ref clientRect, pt.x, pt.y))
256
Misc
.ThrowWin32ExceptionsIfError(lastWin32Error);
348
return GetBoundingRect().ToRect(
Misc
.IsControlRTL(_hwnd));
393
if(!
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (30)
105
style =
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK;
191
int state =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero);
192
if (
Misc
.IsBitSet(state, NativeMethods.BST_PUSHED)
258
return
Misc
.AccessKey(
Misc
.ProxyGetText(_hwnd));
332
new WindowsButton(hwndRadioButton, null, ButtonType.RadioButton,
Misc
.GetWindowStyle(hwndRadioButton) & NativeMethods.BS_TYPEMASK, accRadioButton)
393
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
404
return new WindowsButton(hwndParent, null, ButtonType.GroupBox,
Misc
.GetWindowStyle(hwndParent) & NativeMethods.BS_TYPEMASK, accParent);
474
Misc
.SetFocus(_hwnd);
498
Misc
.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero);
512
Misc
.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true);
519
Misc
.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true);
541
IntPtr hwndShell =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null);
553
if (!
Misc
.GetClassName(_hwnd).Equals("Button"))
561
return
Misc
.InTheShellProcess(_hwnd) && UnsafeNativeMethods.GetProp(_hwnd, "StartButtonTag") == new IntPtr(304);
565
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
568
if (
Misc
.GetClassName(hwndParent).Equals("Shell_TrayWnd"))
579
if (!
Misc
.GetClassName(_hwnd).Equals("Button"))
584
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
587
if (
Misc
.GetClassName(hwndParent).Equals("Desktop More Programs Pane"))
605
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_CHILD))
607
hwndParent =
Misc
.GetParent(hwndRoot);
611
hwndParent =
Misc
.GetWindow(hwndRoot, NativeMethods.GW_OWNER);
644
int state =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero);
645
if (
Misc
.IsBitSet(state, NativeMethods.BST_CHECKED))
649
else if (
Misc
.IsBitSet(state, NativeMethods.BST_INDETERMINATE))
669
Misc
.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound);
698
return
Misc
.StripMnemonic(
Misc
.ProxyGetText(_hwnd));
707
Misc
.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton);
MS\Internal\AutomationProxies\WindowsComboBox.cs (35)
130
if (!
Misc
.GetWindowRect(cbInfo.hwndList, ref rcList))
134
if (!
Misc
.UnionRect(out rcCombo, ref rcCombo, ref rcList))
141
return rcCombo.ToRect(
Misc
.IsControlRTL(_hwnd));
150
if (
Misc
.GetClassName(_hwnd).Equals("Internet Explorer_TridentCmboBx"))
192
return
Misc
.GetControlName(
Misc
.GetLabelhwnd(_hwndEx), true);
255
if (
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2))
257
if (
Misc
.PtInRect(ref cbInfo.rcButton, x, y))
268
if (
Misc
.GetWindowRect(cbInfo.hwndList, ref rcList) &&
269
Misc
.PtInRect(ref rcList, x, y))
372
Misc
.CheckEnabled(_hwnd);
387
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
390
int id =
Misc
.GetWindowId(_hwnd);
393
Misc
.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam, _hwnd);
440
Misc
.CheckEnabled(_hwnd);
454
Misc
.CheckEnabled(_hwnd);
521
bool result =
Misc
.GetComboBoxInfo(hwnd, ref cbInfo);
538
cbInfo.hwndItem =
Misc
.FindWindowEx(hwnd, IntPtr.Zero, "EDIT", null);
541
result =
Misc
.GetWindowRect(cbInfo.hwndItem, ref cbInfo.rcItem);
544
result =
Misc
.MapWindowPoints(_hwndDesktop, hwnd, ref cbInfo.rcItem, 2);
560
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0;
565
IntPtr hwndFocused =
Misc
.GetFocusedWindow();
573
Misc
.SetFocus(hwnd);
575
Misc
.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero);
580
Misc
.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero);
628
return
Misc
.ProxyGetText(IsComboBoxEx32() ? _hwndEx : _hwnd);
636
return (
Misc
.GetWindowStyle(hwnd) & NativeMethods.CBS_COMBOTYPEMASK);
677
return string.Equals(
Misc
.GetClassName(hwndEx), ComboboxEx32, StringComparison.OrdinalIgnoreCase);
696
index =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
703
int len =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero);
710
if (
Misc
.GetClassName(hwnd).Equals("Internet Explorer_TridentCmboBx"))
721
return
Misc
.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len);
765
if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) &&
Misc
.IsBitSet(NativeMethods.STATE_SYSTEM_PRESSED, cbInfo.stateButton))
924
if (!
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2))
951
Misc
.CheckEnabled(_hwnd);
MS\Internal\AutomationProxies\WindowsContainer.cs (11)
28
string className =
Misc
.ProxyGetClassName(hwnd);
128
return
Misc
.IsBitSet(style, NativeMethods.WS_CAPTION) ||
129
Misc
.IsBitSet(style, NativeMethods.WS_POPUP);
134
int style =
Misc
.GetWindowStyle(hwnd);
135
int exstyle =
Misc
.GetWindowExStyle(hwnd);
137
return
Misc
.IsBitSet(style, NativeMethods.DS_CONTROL) &&
138
Misc
.IsBitSet(style, NativeMethods.WS_CHILD) &&
139
Misc
.IsBitSet(exstyle, NativeMethods.WS_EX_CONTROLPARENT);
166
string dlgName =
Misc
.ProxyGetText(hwnd);
173
IntPtr hwndParent =
Misc
.GetParent(hwnd);
179
hwndTab =
Misc
.FindWindowEx(hwndParent, IntPtr.Zero, "SysTabControl32", null);
MS\Internal\AutomationProxies\WindowsEditBox.cs (40)
151
hwnd =
Misc
.GetParent(hwnd))
266
Misc
.CheckEnabled(_hwnd);
270
if (
Misc
.IsBitSet(styles, NativeMethods.ES_READONLY))
276
if (
Misc
.IsBitSet(styles, NativeMethods.ES_NUMBER))
290
int result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
298
result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
352
if (!
Misc
.MapWindowPoints(IntPtr.Zero, WindowHandle, ref clientLocation, 1))
361
if (!
Misc
.GetClientRect(WindowHandle, ref clientRect))
444
int result =
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam);
493
int style =
Misc
.GetWindowStyle(hwnd);
496
if (
Misc
.IsBitSet(style, NativeMethods.ES_PASSWORD))
500
else if (
Misc
.IsBitSet(style, NativeMethods.ES_MULTILINE))
504
else if (
Misc
.IsBitSet(style, NativeMethods.ES_AUTOHSCROLL))
516
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero);
523
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero);
529
IntPtr result =
Misc
.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero);
546
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero);
555
if (
Misc
.GetObjectW(hfont, cb, ref logfont) != cb)
566
Misc
.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect);
574
Misc
.ProxySendMessage(WindowHandle, NativeMethods.EM_GETSEL, out start, out end);
580
return
Misc
.ProxyGetText(_hwnd, GetTextLength());
586
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero);
596
if (
Misc
.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty)
672
return (!SafeNativeMethods.IsWindowEnabled(WindowHandle) ||
Misc
.IsBitSet(WindowStyle, NativeMethods.ES_READONLY));
681
return
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero);
687
int index =
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero);
694
return 0 !=
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical);
702
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_VSCROLL))
708
bool ok =
Misc
.GetScrollInfo(WindowHandle, NativeMethods.SB_VERT, ref si);
719
if (
Misc
.GetClientRect(_hwnd, ref rect) && !rect.IsEmpty)
741
int result =
Misc
.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero);
802
Misc
.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end);
810
return
Misc
.ProxyGetText(hwnd);
851
IntPtr hdc =
Misc
.GetDC(_hwnd);
861
oldFont =
Misc
.SelectObject(hdc, hfont);
862
return
Misc
.GetTextExtentPoint32(hdc, text, text.Length, out size);
868
Misc
.SelectObject(hdc, oldFont);
871
Misc
.ReleaseDC(_hwnd, hdc);
929
string classname =
Misc
.GetClassName(hwndParent);
945
string classname =
Misc
.GetClassName(hwndParent);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (15)
83
Misc
.SetFocus(_provider._hwnd);
245
if (!
Misc
.MapWindowPoints(_provider.WindowHandle, IntPtr.Zero, ref w32point, 1))
285
return
Misc
.RectArrayToDoubleArray(rectArray);
304
Misc
.SetFocus(_provider._hwnd);
358
Misc
.SetFocus(_provider._hwnd);
422
Misc
.SetFocus(_provider._hwnd);
441
Misc
.SetFocus(_provider._hwnd);
458
Misc
.SetFocus(_provider._hwnd);
481
Misc
.SetFocus(_provider._hwnd);
487
if (
Misc
.IsReadingRTL(_provider._hwnd))
728
if (
Misc
.IsBitSet(style, NativeMethods.ES_CENTER))
732
else if (
Misc
.IsBitSet(style, NativeMethods.ES_RIGHT))
745
return
Misc
.IsBitSet(style, NativeMethods.ES_UPPERCASE) ? CapStyle.AllCap : CapStyle.None;
773
IntPtr hdc =
Misc
.GetDC(IntPtr.Zero);
779
Misc
.ReleaseDC(IntPtr.Zero, hdc);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (9)
51
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
85
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.CheckBox,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
88
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
91
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.PushButton,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
94
return new WindowsButton(hwnd, null, WindowsButton.ButtonType.RadioButton,
Misc
.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
131
return IsWindowsFormsControl(
Misc
.GetClassName(hwnd));
155
if (XSendMessage.XSend(hwnd, WM_GETCONTROLNAME, new IntPtr(
Misc
.MaxLengthNameProperty), ref winFormsID,
Misc
.MaxLengthNameProperty))
196
private static int WM_GETCONTROLNAME =
Misc
.RegisterWindowMessage("WM_GETCONTROLNAME");
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (3)
99
Misc
.SetFocus(_hwnd);
126
Misc
.SetFocus(_hwnd);
131
Misc
.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsGrip.cs (6)
51
if (
Misc
.GetClientRectInScreenCoordinates(_hwnd, ref client))
55
if (
Misc
.IsLayoutRTL(_hwnd))
84
if (!
Misc
.GetClientRectInScreenCoordinates(hwnd, ref client))
104
if (
Misc
.IsLayoutRTL(hwnd))
108
int hit =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
116
int hit =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsHyperlink.cs (7)
116
return
Misc
.StripMnemonic(RemoveHTMLAnchorTag(
Misc
.ProxyGetText(_hwnd)));
201
if (!
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1))
239
if (
Misc
.IsBitSet(_linkItem.state, NativeMethods.LIS_FOCUSED))
440
if (!
Misc
.GetWindowRect(_hwnd, ref BoundingRect))
508
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
509
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (10)
138
Misc
.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4));
153
return
Misc
.ProxyGetText(_hwnd, IP_ADDRESS_STRING_LENGTH);
161
return !
Misc
.IsEnabled(_hwnd);
243
IntPtr hwndChild =
Misc
.GetWindow(_hwnd, NativeMethods.GW_CHILD);
252
hwndChild =
Misc
.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
260
IntPtr hwndChild =
Misc
.GetWindow(_hwnd, NativeMethods.GW_CHILD);
263
hwndChild =
Misc
.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
351
return
Misc
.ProxyGetText(_hwnd);
381
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
476
return WindowsIPAddress.Create(
Misc
.GetParent(_hwnd), 0, 0);
MS\Internal\AutomationProxies\WindowsListBox.cs (36)
66
int style =
Misc
.GetWindowStyle(hwnd);
73
if (
Misc
.IsBitSet(style, NativeMethods.LBS_COMBOBOX))
291
Misc
.GetClientRectInScreenCoordinates(_hwnd, ref listboxrect);
292
if (
Misc
.PtInRect(ref listboxrect, x, y))
294
int ret =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top));
309
int index =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero);
384
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0;
434
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero);
524
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LBS_COMBOBOX))
565
int result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero);
606
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR;
729
int iTextLen =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero);
733
if (
Misc
.GetClassName(_hwnd).Equals("Internet Explorer_TridentLstBox"))
744
string text =
Misc
.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen);
942
Misc
.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero);
988
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0;
997
SendMessageResult =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item));
1001
SendMessageResult =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero);
1016
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR;
1041
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item;
1045
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0;
1062
Misc
.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect);
1063
return
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty;
1117
Misc
.MouseClick(pt.x, pt.y);
1131
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item));
1136
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1146
int listBoxStyle =
Misc
.GetWindowStyle(_hwnd);
1147
if (
Misc
.IsBitSet(listBoxStyle, NativeMethods.LBS_NOTIFY))
1150
int idListBox =
Misc
.GetWindowId(_hwnd);
1154
IntPtr hwndListBoxParent =
Misc
.GetParent(_hwnd);
1157
Misc
.ProxySendMessageInt(
1166
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1170
int id =
Misc
.GetWindowId(_hwnd);
1174
Misc
.ProxySendMessageInt(combo._hwnd, NativeMethods.WM_COMMAND, wParam, _hwnd);
1190
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (42)
416
if (
Misc
.PtInRect(ref rc, x, y))
890
return (
Misc
.IsBitSet(state, NativeMethods.LVIS_FOCUSED));
1181
return ((
Misc
.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_REPORT);
1211
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
1239
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags));
1250
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero);
1256
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1));
1262
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_SCROLL, dx, dy) != 0;
1275
return
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2);
1285
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0;
1309
return
Misc
.IsBitSet(GetItemState(hwnd, listItem, NativeMethods.LVIS_SELECTED), NativeMethods.LVIS_SELECTED);
1315
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LVS_EDITLABELS);
1349
return
Misc
.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero);
1355
return
Misc
.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_ONECLICKACTIVATE);
1361
return !
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LVS_SINGLESEL);
1367
return !
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LVS_NOSCROLL);
1375
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0;
1381
return
Misc
.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero);
1387
item.cchTextMax =
Misc
.MaxLengthNameProperty;
1413
if (
Misc
.MapWindowPoints(IntPtr.Zero, hwnd, ref hitTest.pt, 1))
1420
if (
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd))
1451
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
1457
return
Misc
.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_CHECKBOXES);
1471
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.LVS_AUTOARRANGE);
1477
return
Misc
.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_FULLROWSELECT);
1483
return
Misc
.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_JUSTIFYCOLUMNS);
1498
return
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2);
1507
IntPtr hwndToolTip =
Misc
.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
1509
return
Misc
.GetItemToolTipText(hwnd, hwndToolTip, 0);
1646
string className =
Misc
.GetClassName(
Misc
.GetParent(_hwnd));
1670
if (!
Misc
.GetScrollBarInfo(_hwnd, scrollBar, ref scrollBarInfo) ||
1686
if (!
Misc
.GetScrollInfo(_hwnd, sbFlag, ref si) ||
1786
return ((
Misc
.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_LIST);
1799
return
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref pt, 1);
1809
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero);
1815
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask));
1837
if (
Misc
.PtInWindowRect(hwndHeader, x, y))
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (6)
36
_isComctrlV6OnOsVerV6orHigher =
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd);
100
group.cchHeader =
Misc
.MaxLengthNameProperty;
111
group.cchHeader =
Misc
.MaxLengthNameProperty;
329
int groupIndex = (int)
Misc
.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
484
if (
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd))
486
int groupIndex = (int)
Misc
.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (6)
240
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0;
366
bool isComctrlV6OnOsVerV6orHigher =
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd);
703
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2);
712
if (!
Misc
.GetWindowRect(_hwnd, ref rcLv))
746
if (
Misc
.IsControlRTL(_hwnd))
814
if (
Misc
.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_VSCROLL, ref sbi))
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (3)
77
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2);
107
group.cchSubsetTitle=
Misc
.MaxLengthNameProperty;
122
Misc
.MouseClick(pt.x, pt.y);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (12)
48
_isComctrlV6OnOsVerV6orHigher =
Misc
.IsComctrlV6OnOsVerV6orHigher(hwnd);
138
if (
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRectangle, 2))
343
if (!checkboxRectangle.IsEmpty &&
Misc
.PtInRect(ref checkboxRectangle, x, y))
368
int column = (int)
Misc
.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
758
Misc
.SetFocus(hwnd);
858
if (
Misc
.GetWindowRect(hwndHeader, ref headerRect)
859
&&
Misc
.GetClientRectInScreenCoordinates(_hwnd, ref listViewRect))
867
&& !
Misc
.IsItemVisible(ref listViewRect, ref itemRect))
933
if (!
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1))
957
Misc
.MouseClick(clickPoint.x, clickPoint.y, !WindowsListView.ListViewSingleClickActivate(_hwnd));
976
Misc
.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode));
977
Misc
.ProxySendMessage(hwnd, NativeMethods.WM_KEYUP, key, keyUpLParam);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (10)
80
if (
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) && !
Misc
.IsItemVisible(ref parentRect, ref itemRect))
111
return name.Length <
Misc
.MaxLengthNameProperty ? name : name.Substring(0,
Misc
.MaxLengthNameProperty);
153
if (!
Misc
.GetWindowRect(hwnd, ref controlRectangle))
187
if(
Misc
.IsControlRTL(hwnd))
245
Misc
.SetFocus(_hwnd);
250
if (
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1))
253
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
254
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewItemStartMenu.cs (1)
98
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (3)
57
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
79
Misc
.SetScrollPos(_hwnd, _sbFlag, pos, true);
108
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (9)
99
if (
Misc
.IsControlRTL(_hwnd))
114
if (
Misc
.IsControlRTL(_hwnd))
143
if (!
Misc
.IsItemVisible(ref parentRect, ref itemRect))
173
if (
Misc
.GetClassName(ancestor) == "Desktop Search Open View")
177
ancestor =
Misc
.GetParent(ancestor);
200
return name.Length <
Misc
.MaxLengthNameProperty ? name : name.Substring(0,
Misc
.MaxLengthNameProperty);
373
if (
Misc
.IsComctrlV6OnOsVerV6orHigher(_hwnd))
375
int column = (int)
Misc
.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (78)
214
if (!
Misc
.ProxyGetGUIThreadInfo(0, out gui))
231
if (!
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE))
237
hwndPopup =
Misc
.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null);
293
if (
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE))
302
else if (
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_POPUPMENUMODE))
308
else if (
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE))
509
bool result =
Misc
.GetMenuBarInfo(hwnd, idObject, idItem, ref mbi);
594
if (!
Misc
.ProxyGetGUIThreadInfo(0, out gui))
617
for (IntPtr hwndPossibleParent =
Misc
.FindWindowEx(IntPtr.Zero, hwndMenu, WindowsMenu.MenuClassName, null);
619
hwndPossibleParent =
Misc
.FindWindowEx(IntPtr.Zero, hwndPossibleParent, WindowsMenu.MenuClassName, null))
645
for (IntPtr hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null);
647
hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, hwndSubMenu, MenuClassName, null))
672
if (IntPtr.Zero !=
Misc
.GetWindow(hwnd, NativeMethods.GW_OWNER))
685
int count =
Misc
.GetMenuItemCount(hmenuPossibleParent);
710
return
Misc
.GetMenuItemCount(_hmenu);
720
return
Misc
.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero);
733
if (
Misc
.ProxyGetGUIThreadInfo(0, out gui))
735
return
Misc
.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE);
816
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(_hwnd)))
821
if (!
Misc
.ProxyGetTitleBarInfo(_hwnd, out ti))
883
Misc
.IsBitSet(mbi.focusFlags, 3))
901
if (
Misc
.ProxyGetGUIThreadInfo(0, out gui))
915
return string.Equals(
Misc
.ProxyGetClassName(hwnd), WindowsMenu.MenuClassName, StringComparison.OrdinalIgnoreCase);
920
int count =
Misc
.GetMenuItemCount(hmenu);
924
if (
Misc
.IsBitSet(state, NativeMethods.MF_HILITE))
937
hwndPopup =
Misc
.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null);
1088
if (!
Misc
.ProxyGetGUIThreadInfo(0, out gui))
1260
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(_hwnd)))
1265
if (!
Misc
.ProxyGetTitleBarInfo(_hwnd, out ti))
1280
if (
Misc
.GetMenuItemRect(_hwnd, _hmenu, _item, out rc))
1312
menuRawText =
Misc
.StripMnemonic(menuRawText);
1389
if (!
Misc
.IsEnabled(_hwnd))
1444
if (
Misc
.InMenuMode())
1446
IntPtr hwndFocus =
Misc
.GetFocusedWindow();
1459
if (!
Misc
.InMenuMode() && !MenuMode(true))
1466
if (!
Misc
.InMenuMode())
1513
while (!
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
1545
return
Misc
.AccessKey(Text);
1653
if (
Misc
.PtInRect(ref rc, x, y))
1871
return
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE);
1886
return
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED);
1895
if (!
Misc
.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo))
1900
return (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero);
1910
if (!
Misc
.GetMenuItemInfo(hmenu, position, true, ref menuItemInfo))
1915
return (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) ||
1916
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) ||
1917
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK));
1954
if (
Misc
.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo))
1961
if (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) ||
1962
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) ||
1963
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK))
1983
IntPtr hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null);
2093
for (IntPtr hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowsMenu.MenuClassName, null);
2095
hwndSubMenu =
Misc
.FindWindowEx(IntPtr.Zero, hwndSubMenu, WindowsMenu.MenuClassName, null))
2124
Misc
.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' '));
2151
int childIndex = (returnFirstChild) ? 0 :
Misc
.GetMenuItemCount(hSubmenu) - 1;
2199
int cItems =
Misc
.GetMenuItemCount(_hmenu);
2202
for (item = 0; item < cItems && !
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++)
2246
if (
Misc
.ProxyGetGUIThreadInfo(0, out gui) && _hwnd == gui.hwndActive)
2251
if (gui.hwndCapture != IntPtr.Zero &&
Misc
.ProxyGetClassName(gui.hwndCapture) == "ListBox")
2262
return
Misc
.SetFocus(_hwnd);
2272
while (
Misc
.InMenuMode() != fInMenuMode && (dwDelta = SubtractTicks(SafeNativeMethods.GetTickCount(), dwTicks)) < WindowsMenu.TimeOut)
2284
if (
Misc
.InMenuMode() == fSet)
2337
while (!
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
2357
int c =
Misc
.GetMenuItemCount(_hmenu);
2368
if (
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE))
2403
Misc
.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP))
2562
if (
Misc
.GetMenuItemInfo(_hmenu, _item, true, ref menuItemInfo))
2564
if (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) ||
2565
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) ||
2566
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK))
2570
else if (
Misc
.IsBitSet(menuItemInfo.fType, NativeMethods.MF_OWNERDRAW))
2602
if (!
Misc
.ReadProcessMemory(hProcess, dwItemData, new IntPtr(&msaaMenuInfo), new IntPtr(readSize), out count))
2625
if (
Misc
.ReadProcessMemory(hProcess, msaaMenuInfo.pszWText, new IntPtr(text), new IntPtr(readSize), out count))
2656
return !(
Misc
.IsBitSet(state, NativeMethods.MF_DISABLED) |
Misc
.IsBitSet(state, NativeMethods.MF_GRAYED));
2680
if (nextItem <
Misc
.GetMenuItemCount(_hmenu))
2737
menuRawText =
Misc
.StripMnemonic(Text);
MS\Internal\AutomationProxies\WindowsProgressbar.cs (3)
155
int cur =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
156
int min =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero);
157
int max =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (10)
124
if (!
Misc
.GetWindowRect(_hwnd, ref rebarRect))
194
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero);
287
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
288
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, _item);
345
if (hwndBand != IntPtr.Zero &&
Misc
.PtInWindowRect(hwndBand, x, y))
378
Misc
.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero);
404
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2))
411
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), (int)CommonControlStyles.CCS_VERT))
417
return rectW32.ToRect(
Misc
.IsControlRTL(hwnd));
MS\Internal\AutomationProxies\WindowsRichEdit.cs (11)
168
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.ES_READONLY))
174
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(_hwnd))
189
int result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
196
result =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
359
while (!gotPoint || !
Misc
.PtInRect(ref rect, x, y))
373
while (gotPoint &&
Misc
.PtInRect(ref rect, x, y) && rangeAdjust.Start != rangeAdjust.End)
387
while (!gotPoint || !
Misc
.PtInRect(ref rect, x, y))
407
} while (gotPoint &&
Misc
.PtInRect(ref rect, x, y));
461
Misc
.IsBitSet(WindowStyle, NativeMethods.ES_READONLY));
561
return
Misc
.ProxyGetText(_hwnd);
681
return
Misc
.GetClassName(hwndParent).Equals("MsoCommandBar");
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (8)
68
Misc
.SetFocus(_pattern._hwnd);
174
Misc
.GetClientRectInScreenCoordinates(_pattern.WindowHandle, ref w32rect);
209
return
Misc
.RectArrayToDoubleArray(rectArray);
257
Misc
.SetFocus(_pattern._hwnd);
275
Misc
.SetFocus(_pattern._hwnd);
307
Misc
.SetFocus(_pattern._hwnd);
329
Misc
.SetFocus(_pattern._hwnd);
353
Misc
.SetFocus(_pattern._hwnd);
MS\Internal\AutomationProxies\WindowsScroll.cs (21)
112
int style =
Misc
.GetWindowStyle(hwnd);
114
if ((sbFlag == NativeMethods.SB_HORZ && !
Misc
.IsBitSet(style, NativeMethods.WS_HSCROLL)) ||
115
(sbFlag == NativeMethods.SB_VERT && !
Misc
.IsBitSet(style, NativeMethods.WS_VSCROLL)))
120
if (!
Misc
.IsEnabled(hwnd))
131
if (
Misc
.GetScrollBarInfo(hwnd, scrollBarObjectId, ref sbi))
134
!
Misc
.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE);
147
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si))
157
int style =
Misc
.GetWindowStyle(hwnd);
159
bool hasScrollableStyle =
Misc
.IsBitSet(style, NativeMethods.WS_HSCROLL) ||
Misc
.IsBitSet(style, NativeMethods.WS_VSCROLL);
161
string className =
Misc
.ProxyGetClassName(hwnd);
166
hasScrollableStyle =
Misc
.IsBitSet(style, NativeMethods.ES_MULTILINE);
197
if (
Misc
.GetScrollInfo(hwnd, sbFlag, ref si))
229
string classname =
Misc
.GetClassName(hwnd);
253
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) || (si.nMax == si.nMin))
294
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) ||
317
bool fRet =
Misc
.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero) == 0;
319
if (fRet &&
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos)
340
} while (fRet &&
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) && si.nPos != newPos);
368
if ((!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si) ||
429
int result =
Misc
.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (25)
143
if (!
Misc
.GetScrollBarInfo(_hwnd, idObject, ref sbi))
163
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(_parent._hwnd)))
218
return IsEnabled() &&
Misc
.IsEnabled(_hwnd);
335
if (
Misc
.PtInRect(ref rc, x, y))
367
return !
Misc
.IsEnabled(_hwnd) || !HasValuePattern(_hwnd, _sbFlag);
415
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.WS_VSCROLL);
420
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.WS_HSCROLL);
426
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.SBS_VERT);
438
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si))
452
if (
Misc
.GetScrollBarInfo(hwnd, idObject, ref sbi))
525
if (_sbFlag != NativeMethods.SB_CTL ||
Misc
.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_CLIENT, ref sbi))
559
string classname =
Misc
.GetClassName(_hwnd);
576
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
587
if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (
Misc
.IsControlRTL(_parent._hwnd)))
627
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
665
string classname =
Misc
.GetClassName(_hwnd);
688
Misc
.SetScrollPos(_hwnd, _sbFlag, val, true);
699
Misc
.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero);
701
Misc
.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero);
716
if (
Misc
.GetScrollBarInfo(hwnd, idObject, ref sbi))
738
if (!
Misc
.GetScrollBarInfo(_hwnd, idObject, ref sbi))
743
return !
Misc
.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE);
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (9)
217
if (!
Misc
.GetScrollInfo(hwnd, sbFlag, ref si))
226
if (!
Misc
.GetScrollBarInfo(hwnd, idObject, ref sbi))
236
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(parent._parent._hwnd)))
298
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2))
390
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2))
417
if ((Environment.OSVersion.Version.Major < 6) && (
Misc
.IsLayoutRTL(hwnd)))
517
IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ?
Misc
.GetWindowParent(_hwnd) : _hwnd;
543
if (!
Misc
.GetScrollInfo(_hwnd, _sbFlag, ref si))
564
Misc
.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd == _hwnd ? IntPtr.Zero : _hwnd));
MS\Internal\AutomationProxies\WindowsSlider.cs (17)
140
if (
Misc
.PtInRect(ref rc, x, y))
168
IntPtr parent =
Misc
.GetParent(_hwnd);
179
Misc
.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero);
256
return (
Misc
.IsBitSet(WindowStyle, NativeMethods.TBS_VERT));
261
int value =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
266
int maxValue =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
284
Misc
.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val));
291
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero);
299
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero);
307
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
315
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero);
409
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
410
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, 0);
440
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero);
463
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rcChannel, 2))
475
if (!
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rcThumb, 2))
483
if (
Misc
.IsLayoutRTL(hwnd))
MS\Internal\AutomationProxies\WindowsSpinner.cs (7)
61
hwndBuddy =
Misc
.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero);
67
if (
Misc
.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) == -1)
273
IntPtr hwndParent =
Misc
.GetParent(hwnd);
277
IntPtr hwndChild =
Misc
.GetWindow(hwndParent, NativeMethods.GW_CHILD);
280
string className =
Misc
.ProxyGetClassName(hwndChild);
283
IntPtr hwndBuddy =
Misc
.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero);
289
hwndChild =
Misc
.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
MS\Internal\AutomationProxies\WindowsStatic.cs (6)
69
string className =
Misc
.GetClassName(hwnd).ToLower(System.Globalization.CultureInfo.InvariantCulture);
89
style =
Misc
.GetWindowStyle(hwnd) & NativeMethods.SS_TYPEMASK;
134
return
Misc
.AccessKey(
Misc
.ProxyGetText(_hwnd));
153
return
Misc
.StripMnemonic(
Misc
.ProxyGetText(_hwnd));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (11)
142
return
Misc
.ProxyGetText(_hwnd);
226
if (
Misc
.PtInRect(ref rc, x, y))
236
if (
Misc
.PtInRect(ref rc, x, y))
337
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero);
356
Misc
.EnumChildWindows(hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindChildFromRect), (void*)&info);
364
if (!
Misc
.GetClientRectInScreenCoordinates(hwnd, ref rc))
596
int retValue =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
797
if (!
Misc
.GetClientRectInScreenCoordinates(hwnd, ref client))
806
if (
Misc
.IsLayoutRTL(hwnd))
832
int style =
Misc
.GetWindowStyle(hwnd);
833
return
Misc
.IsBitSet(style, SBARS_SIZEGRIP) || WindowsGrip.IsGripPresent(hwnd, true);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (29)
79
if (
Misc
.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0)
160
if (
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1))
180
int item =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
196
return
Misc
.IsBitSet(WindowStyle, NativeMethods.HDS_VERT) ? OrientationType.Vertical : OrientationType.Horizontal;
250
if (
Misc
.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0)
287
Misc
.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero);
295
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.HDS_HIDDEN);
301
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero);
306
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
421
return
Misc
.AccessKey(Text);
432
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
436
if (
Misc
.GetClientRectInScreenCoordinates(hwndParent, ref parentRect) && !parentRect.IsEmpty)
438
if (!
Misc
.IsItemVisible(ref parentRect, ref itemRect))
454
return
Misc
.StripMnemonic(Text);
487
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
488
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
529
if (
Misc
.IsComctrlV6OnOsVerV6orHigher(_hwnd))
531
int item =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
579
if (!
Misc
.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2))
592
if (
Misc
.IsLayoutRTL(_hwnd))
654
return (
Misc
.IsBitSet(WindowStyle, NativeMethods.HDS_BUTTONS));
660
return (
Misc
.IsBitSet(WindowStyle, NativeMethods.HDS_FILTERBAR));
674
return
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1);
699
int item =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
733
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
734
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
743
if (
Misc
.GetFocusedWindow().Equals(_hwnd))
746
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)
58
return
Misc
.GetTitleBarRect(_hwnd);
74
return
Misc
.ProxyGetText(_hwnd);
112
int hit =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y));
199
Misc
.ProxyGetTitleBarInfo(_hwnd, out ti);
206
if (!
Misc
.IsBitSet(ti.rgstate[i], NativeMethods.STATE_SYSTEM_INVISIBLE) || i == _systemMenu)
220
if (
Misc
.ProxyGetTitleBarInfo(hwnd, out ti))
222
return !
Misc
.IsBitSet(ti.rgstate[0], NativeMethods.STATE_SYSTEM_INVISIBLE);
287
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE))
297
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE))
318
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_DISABLED))
323
return
Misc
.IsBitSet(WindowExStyle, NativeMethods.WS_EX_CONTEXTHELP);
329
if (
Misc
.IsBitSet(style, NativeMethods.WS_DISABLED))
334
return
Misc
.IsBitSet(style, NativeMethods.WS_MINIMIZEBOX);
341
if (
Misc
.IsBitSet(style, NativeMethods.WS_DISABLED))
346
return
Misc
.IsBitSet(style, NativeMethods.WS_MAXIMIZEBOX);
359
Rect[] rects =
Misc
.GetTitlebarRects(_hwnd);
372
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE))
381
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE))
432
Misc
.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero);
443
Misc
.ClearMenuMode();
446
Misc
.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (26)
216
if (
Misc
.PtInRect(ref rc, x, y))
232
int focusIndex =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero);
261
string name =
Misc
.ProxyGetText(_hwnd);
303
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0)
333
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero);
372
bool hasImageList =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0;
373
int exStyle =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero);
379
if (
Misc
.IsBitSet(buttonStyle, NativeMethods.BTNS_SEP))
381
else if (
Misc
.IsBitSet(buttonStyle, NativeMethods.BTNS_CHECK))
384
IntPtr hwndParent =
Misc
.GetParent(_hwnd);
385
if(
Misc
.GetClassName(hwndParent) != "MSTaskSwWClass")
390
else if (
Misc
.IsBitSet(buttonStyle, NativeMethods.BTNS_DROPDOWN)
391
&&
Misc
.IsBitSet(exStyle, NativeMethods.TBSTYLE_EX_DRAWDDARROWS))
432
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
464
return
Misc
.AccessKey(Text);
472
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0;
496
return
Misc
.StripMnemonic(Text);
518
Misc
.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero);
580
return
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item;
602
int len =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero);
639
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
640
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, _idCommand);
647
||
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
654
if (
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
672
Misc
.MouseClick(((int)boundingRectangle.Left + (int)boundingRectangle.Right) / 2, ((int)boundingRectangle.Top + (int)boundingRectangle.Bottom) / 2);
681
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)
177
string className =
Misc
.ProxyGetClassName(hwnd);
186
string className =
Misc
.ProxyGetClassName(_hwnd);
199
return
Misc
.ProxyGetText(_hwnd);
238
if (!
Misc
.GetCursorPos(ref pt))
251
Rect[] rects =
Misc
.GetTitlebarRects(hwnd);
269
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE))
278
if (
Misc
.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE))
287
return
Misc
.ProxyGetText(hwnd);
297
if (!
Misc
.GetCursorPos(ref pt))
308
int hit =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
313
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.WS_MINIMIZE))
319
if (
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.WS_MAXIMIZE))
338
return
Misc
.ProxyGetText(hwnd);
MS\Internal\AutomationProxies\WindowsTreeView.cs (34)
411
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0;
417
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0;
425
return (
Misc
.IsBitSet(expanded, NativeMethods.TVIS_EXPANDED));
436
if (
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0)
442
fRet =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0;
523
return
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem);
529
return
Misc
.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask));
569
return
Misc
.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty;
589
treeItem.cchTextMax =
Misc
.MaxLengthNameProperty;
600
IntPtr hwndEdit =
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item);
611
if (
Misc
.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1)
614
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero);
622
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero);
648
IntPtr hItem =
Misc
.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero);
659
int lCommonControlVersion =
Misc
.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero);
817
if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 &&
Misc
.IsWindowInGivenProcess(_hwnd, "explorer"))
852
if (!
Misc
.IsItemVisible(_hwnd, ref itemRect))
868
IntPtr hwndToolTip =
Misc
.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
869
return
Misc
.GetItemToolTipText(_hwnd, hwndToolTip, _item);
905
if (!parentRect.IsEmpty && !
Misc
.IsItemVisible(ref parentRect, ref itemRect))
1229
Misc
.SetFocus(_hwnd);
1233
Misc
.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem);
1286
int selected =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED));
1288
return
Misc
.IsBitSet(selected, NativeMethods.TVIS_SELECTED);
1402
state =
Misc
.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked;
1450
state =
Misc
.IsBitSet((int)stateMSAA, (int)AccessibleState.Checked) ? WindowsTreeView.CheckState.Checked : WindowsTreeView.CheckState.Unchecked;
1470
if (
Misc
.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1))
1479
return
Misc
.IsBitSet(WindowStyle, NativeMethods.TVS_EDITLABELS);
1487
if (
Misc
.IsBitSet(selected, NativeMethods.TVIS_SELECTED))
1499
bool isCheckbox =
Misc
.IsBitSet(WindowStyle, NativeMethods.TVS_CHECKBOXES);
1542
Misc
.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1543
Misc
.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1605
if (!
Misc
.ReadProcessMemory(hProcess, pAddress, new IntPtr(&ent), new IntPtr(readSize), out count))
1641
int childId =
Misc
.ProxySendMessageInt(_hwnd, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (19)
190
if (
Misc
.PtInRect(ref rc, x, y))
227
Misc
.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0));
230
Misc
.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
298
return
Misc
.ProxyGetClassName(hwndParent).Contains("SysTabControl32");
344
int pos =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
357
IntPtr hwndBuddy =
Misc
.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero);
362
hwndBuddy =
Misc
.GetParent(hwnd);
372
return hwndBuddy != IntPtr.Zero &&
Misc
.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) != -1;
381
int range =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
395
int range =
Misc
.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
527
if (IsHorizontal(_hwnd) &&
Misc
.IsLayoutRTL(_hwnd))
536
if (!
Misc
.GetWindowRect(_hwnd, ref updownRect))
546
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center);
547
Misc
.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center);
564
if (!
Misc
.GetWindowRect(hwnd, ref updownRect))
573
if (fHorz &&
Misc
.IsLayoutRTL(hwnd))
629
hwndParent =
Misc
.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero;
637
return
Misc
.IsBitSet(
Misc
.GetWindowStyle(hwnd), NativeMethods.UDS_HORZ);
MS\Internal\AutomationProxies\WinEventTracker.cs (9)
169
if (
Misc
.IsCriticalException(e))
179
hp._winEventHook =
Misc
.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT);
188
Misc
.UnhookWinEvent(hp._winEventHook);
272
if (
Misc
.IsCriticalException(e))
317
if (
Misc
.IsCriticalException(e))
332
if (
Misc
.IsCriticalException(e))
370
if (
Misc
.GetWindowThreadProcessId(hwnd, out processId) == 0)
486
return
Misc
.ProxyGetClassName(Process.GetProcessById(processId).MainWindowHandle).Equals("ConsoleWindowClass");
490
if (
Misc
.IsCriticalException(e))
MS\Internal\AutomationProxies\WinFormsSpinner.cs (6)
38
text =
Misc
.ProxyGetText(hwndEdit);
130
IntPtr hwndFirstChild =
Misc
.GetWindow(hwnd, NativeMethods.GW_CHILD);
137
IntPtr hwndLastChild =
Misc
.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDLAST);
144
if (
Misc
.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDNEXT) != hwndLastChild)
155
if (
Misc
.ProxyGetClassName(hwndLastChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1)
163
if (
Misc
.ProxyGetClassName(hwndFirstChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1)