1 write to _hwnd
UIAutomationClientSideProviders (1)
MS\Internal\AutomationProxies\ProxySimple.cs (1)
59
_hwnd
= hwnd;
848 references to _hwnd
UIAutomationClientSideProviders (848)
MS\Internal\AutomationProxies\NonClientArea.cs (27)
208
int hit = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
230
WindowsTitleBar tb = new WindowsTitleBar(
_hwnd
, this, 0);
304
return new int [] { 1, unchecked((int)(long)
_hwnd
) };
310
if (iid == ScrollPattern.Pattern && WindowScroll.HasScrollableStyle(
_hwnd
))
355
WindowScroll.SetScrollPercent (
_hwnd
, horizontalPercent, verticalPercent, true);
361
WindowScroll.Scroll (
_hwnd
, horizontalAmount, verticalAmount, true);
369
return (double) WindowScroll.GetPropertyScroll (ScrollPattern.HorizontalScrollPercentProperty,
_hwnd
);
378
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalScrollPercentProperty,
_hwnd
);
387
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalViewSizeProperty,
_hwnd
);
396
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalViewSizeProperty,
_hwnd
);
405
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.HorizontallyScrollableProperty,
_hwnd
);
414
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.VerticallyScrollableProperty,
_hwnd
);
460
if (WindowsScrollBar.HasHorizontalScrollBar (
_hwnd
))
464
if (Misc.ProxyGetClassName(
_hwnd
) == "SysListView32")
465
return new WindowsListViewScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_HORZ);
467
return new WindowsScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_HORZ);
472
if (WindowsScrollBar.HasVerticalScrollBar (
_hwnd
))
476
if (Misc.ProxyGetClassName(
_hwnd
) == "SysListView32")
477
return new WindowsListViewScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_VERT);
479
return new WindowsScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_VERT);
486
if (WindowsTitleBar.HasTitleBar (
_hwnd
))
488
return new WindowsTitleBar (
_hwnd
, this, (int) item);
503
if (WindowsGrip.IsGripPresent(
_hwnd
, false))
505
return new WindowsGrip(
_hwnd
, this, (int)item);
538
IntPtr menu = UnsafeNativeMethods.GetMenu(
_hwnd
);
541
menuProxy = new WindowsMenu(
_hwnd
, this, menu, WindowsMenu.MenuType.Toplevel, (int)NonClientItem.Menu);
578
if (Misc.IsLayoutRTL(
_hwnd
))
MS\Internal\AutomationProxies\ProxyHwnd.cs (15)
87
WinEventTracker.AddToNotificationList(
_hwnd
, _createOnEvent, aEvents);
116
WinEventTracker.RemoveToNotificationList(
_hwnd
, aEvents, null);
127
return PtInClientRect (
_hwnd
, x, y) ? this : null;
137
accessKey = GetLabelAccessKey(
_hwnd
);
151
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
153
string sPersistentID = WindowsFormsHelper.WindowsFormsID (
_hwnd
);
161
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
180
IntPtr label = Misc.GetLabelhwnd(
_hwnd
);
189
name = Misc.ProxyGetText(
_hwnd
);
214
_controlLabel = Misc.GetLabelhwnd(
_hwnd
);
227
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
232
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
259
int idChild = Misc.GetWindowId(
_hwnd
);
260
string text = Misc.GetItemToolTipText(
_hwnd
, IntPtr.Zero, idChild);
263
text = Misc.GetItemToolTipText(
_hwnd
, IntPtr.Zero, 0);
MS\Internal\AutomationProxies\ProxySimple.cs (22)
91
if (
_hwnd
== IntPtr.Zero)
98
if (!Misc.GetWindowRect(
_hwnd
, ref controlRectangle))
151
id[1] =
_hwnd
.ToInt32();
165
if (
_hwnd
== IntPtr.Zero || (GetParent() != null && GetParent().
_hwnd
==
_hwnd
))
170
return AutomationInteropProvider.HostProviderFromHandle(
_hwnd
);
205
return Misc.IsEnabled(
_hwnd
);
216
Misc.GetWindowThreadProcessId(
_hwnd
, out pid);
238
return Misc.GetFocusedWindow() ==
_hwnd
? IsFocused() : false;
258
return WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
) ? "WinForm" : "Win32";
267
if (Misc.GetFocusedWindow() ==
_hwnd
&& IsFocused())
273
if (SafeNativeMethods.IsWindowVisible(
_hwnd
) && (bool)GetElementProperty(AutomationElement.IsEnabledProperty))
339
string sRawName = Misc.GetControlName(
_hwnd
, false);
388
EventManager.DispatchEvent(this,
_hwnd
, eventId, idProp, idObject);
528
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
578
Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref rcOutside);
601
return ClickablePoint.GetPoint(
_hwnd
, listIn, listOut, ref pt);
637
_IAccessible = Accessible.AccessibleObjectFromWindow(
_hwnd
, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK ? acc.IAccessible : null;
653
return
_hwnd
;
662
return Misc.GetWindowStyle(
_hwnd
);
671
return Misc.GetWindowExStyle(
_hwnd
);
MS\Internal\AutomationProxies\WindowsAltTab.cs (8)
36
GetAltTabInfo(
_hwnd
, 0, ref _altTabInfo, null);
126
if (Misc.MapWindowPoints(System.IntPtr.Zero,
_hwnd
, ref pt, 1))
130
if(Misc.GetClientRect(
_hwnd
, ref clientRect))
191
altTabItem = new WindowsAltTabItem(
_hwnd
, this, item);
210
if (GetAltTabInfo(
_hwnd
, -1, ref altTabInfo, null))
341
return GetBoundingRect().ToRect(Misc.IsControlRTL(
_hwnd
));
354
if (WindowsAltTab.GetAltTabInfo(
_hwnd
, _item, ref altTabInfo, itemText))
386
if(!Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (22)
252
if (!WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms) && IsStartButton())
257
return Misc.AccessKey(Misc.ProxyGetText(
_hwnd
));
263
return SafeNativeMethods.IsWindowVisible(
_hwnd
);
389
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
461
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
470
Misc.SetFocus(
_hwnd
);
494
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero);
508
Misc.ProxySendMessage(
_hwnd
, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true);
515
Misc.ProxySendMessage(
_hwnd
, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true);
549
if (!Misc.GetClassName(
_hwnd
).Equals("Button"))
557
return Misc.InTheShellProcess(
_hwnd
) && UnsafeNativeMethods.GetProp(
_hwnd
, "StartButtonTag") == new IntPtr(304);
561
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
575
if (!Misc.GetClassName(
_hwnd
).Equals("Button"))
580
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
595
IntPtr hwndParent =
_hwnd
;
640
int state = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero);
663
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
665
Misc.EnumChildWindows(
_hwnd
, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound);
694
return Misc.StripMnemonic(Misc.ProxyGetText(
_hwnd
));
700
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
703
Misc.EnumChildWindows(
_hwnd
, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton);
MS\Internal\AutomationProxies\WindowsComboBox.cs (34)
119
if (GetDroppedState (
_hwnd
))
125
if (GetComboInfo(
_hwnd
, ref cbInfo))
140
return rcCombo.ToRect(Misc.IsControlRTL(
_hwnd
));
149
if (Misc.GetClassName(
_hwnd
).Equals("Internet Explorer_TridentCmboBx"))
251
if (GetComboInfo(
_hwnd
, ref cbInfo))
254
if (Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref cbInfo.rcButton, 2))
258
return new WindowsComboButton(
_hwnd
, this, (int)ComboChildren.Button);
295
if (GetComboInfo(
_hwnd
, ref cbInfo))
330
if (GetComboInfo(
_hwnd
, ref cbInfo))
367
Misc.CheckEnabled(
_hwnd
);
372
if (GetComboInfo(
_hwnd
, ref cbInfo) && SafeNativeMethods.IsWindowVisible(cbInfo.hwndItem))
382
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
385
int id = Misc.GetWindowId(
_hwnd
);
388
Misc.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam,
_hwnd
);
410
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
435
Misc.CheckEnabled(
_hwnd
);
437
if (GetDroppedState (
_hwnd
))
443
Expand (
_hwnd
);
449
Misc.CheckEnabled(
_hwnd
);
451
if (!GetDroppedState (
_hwnd
))
457
Collapse(
_hwnd
);
464
return (GetDroppedState (
_hwnd
)) ? ExpandCollapseState.Expanded : ExpandCollapseState.Collapsed;
492
IntPtr hwndToAsk = IsComboBoxEx32() ? _hwndEx :
_hwnd
;
623
return Misc.ProxyGetText(IsComboBoxEx32() ? _hwndEx :
_hwnd
);
629
IntPtr hwnd = IsComboBoxEx32() ? _hwndEx :
_hwnd
;
639
if (GetComboInfo(
_hwnd
, ref cbInfo) && cbInfo.stateButton != NativeMethods.STATE_SYSTEM_INVISIBLE)
641
return new WindowsComboButton (
_hwnd
, this, (int) ComboChildren.Button);
651
if (GetComboInfo(
_hwnd
, ref cbInfo) && (IntPtr.Zero != cbInfo.hwndList))
909
if (!WindowsComboBox.GetComboInfo(
_hwnd
, ref cbInfo))
913
if (!Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref cbInfo.rcButton, 2))
940
Misc.CheckEnabled(
_hwnd
);
942
if (!WindowsComboBox.GetDroppedState (
_hwnd
))
944
WindowsComboBox.Expand (
_hwnd
);
948
WindowsComboBox.Collapse (
_hwnd
);
MS\Internal\AutomationProxies\WindowsEditBox.cs (21)
148
for (IntPtr hwnd =
_hwnd
;
161
if (IsInsideOfIPAddress(
_hwnd
))
216
IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(
_hwnd
);
219
return new WindowsSpinner(hwndUpDown,
_hwnd
, _parent, _item);
227
IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(
_hwnd
);
230
return new WindowsSpinner(hwndUpDown,
_hwnd
, _parent, _item);
238
IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(
_hwnd
);
241
return new WindowsSpinner(hwndUpDown,
_hwnd
, _parent, _item);
265
Misc.CheckEnabled(
_hwnd
);
289
int result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
297
result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
579
return Misc.ProxyGetText(
_hwnd
, GetTextLength());
595
if (Misc.GetClientRect(
_hwnd
, ref rect) && !rect.IsEmpty)
720
if (Misc.GetClientRect(
_hwnd
, ref rect) && !rect.IsEmpty)
852
IntPtr hdc = Misc.GetDC(
_hwnd
);
872
Misc.ReleaseDC(
_hwnd
, hdc);
885
return Text(
_hwnd
);
890
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
900
if (WindowsComboBox.GetComboInfo(hwndParent, ref cbInfo) && cbInfo.hwndItem ==
_hwnd
)
910
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
921
return WindowsSpinner.IsSpinnerEdit(
_hwnd
);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (8)
79
Misc.SetFocus(_provider.
_hwnd
);
300
Misc.SetFocus(_provider.
_hwnd
);
354
Misc.SetFocus(_provider.
_hwnd
);
418
Misc.SetFocus(_provider.
_hwnd
);
437
Misc.SetFocus(_provider.
_hwnd
);
454
Misc.SetFocus(_provider.
_hwnd
);
477
Misc.SetFocus(_provider.
_hwnd
);
483
if (Misc.IsReadingRTL(_provider.
_hwnd
))
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (4)
91
Misc.SetFocus(
_hwnd
);
108
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
113
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
118
Misc.SetFocus(
_hwnd
);
MS\Internal\AutomationProxies\WindowsGrip.cs (4)
47
if (IsGripPresent(
_hwnd
, false))
50
if (Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref client))
52
NativeMethods.SIZE sizeGrip = GetGripSize(
_hwnd
, false);
54
if (Misc.IsLayoutRTL(
_hwnd
))
MS\Internal\AutomationProxies\WindowsHyperlink.cs (12)
115
return Misc.StripMnemonic(RemoveHTMLAnchorTag(Misc.ProxyGetText(
_hwnd
)));
196
if (!Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref HitTestInfo.pt, 1))
211
bGetItemResult = XSendMessage.XSend(
_hwnd
, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
256
return new WindowsHyperlinkItem(
_hwnd
, this, index);
276
return XSendMessage.XSend(
_hwnd
, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM));
395
return XSendMessage.XSend(
_hwnd
, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType()));
422
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
427
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
436
if (!Misc.GetWindowRect(
_hwnd
, ref BoundingRect))
492
bGetItemResult = XSendMessage.XSend(
_hwnd
, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
504
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
505
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (12)
116
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
137
Misc.ProxySendMessage(
_hwnd
, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4));
152
return Misc.ProxyGetText(
_hwnd
, IP_ADDRESS_STRING_LENGTH);
160
return !Misc.IsEnabled(
_hwnd
);
242
IntPtr hwndChild = Misc.GetWindow(
_hwnd
, NativeMethods.GW_CHILD);
259
IntPtr hwndChild = Misc.GetWindow(
_hwnd
, NativeMethods.GW_CHILD);
350
return Misc.ProxyGetText(
_hwnd
);
362
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
380
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
388
string s = WindowsEditBox.Text(
_hwnd
);
401
return !SafeNativeMethods.IsWindowEnabled(
_hwnd
);
475
return WindowsIPAddress.Create(Misc.GetParent(
_hwnd
), 0, 0);
MS\Internal\AutomationProxies\WindowsListBox.cs (52)
150
else if (iid == ScrollPattern.Pattern && WindowScroll.HasScrollableStyle(
_hwnd
))
153
IScrollProvider scroll = NonClientArea.Create(
_hwnd
, 0) as IScrollProvider;
170
return IsParentedByCombo() || SafeNativeMethods.IsWindowVisible(
_hwnd
);
179
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
287
Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref listboxrect);
290
int ret = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top));
305
int index = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero);
341
if (ListboxItem.IsSelected(
_hwnd
, itemPos))
380
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0;
422
return new ListboxItem (
_hwnd
, this, index);
430
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero);
543
if (i != skipItem && ListboxItem.IsSelected(
_hwnd
, i))
555
int result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero);
566
for (i = 0, count = Length; i < count && !ListboxItem.IsSelected (
_hwnd
, i); i++)
579
if (i != skipItem && ListboxItem.IsSelected (
_hwnd
, i))
596
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR;
609
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
))
681
else if (iid == ScrollItemPattern.Pattern && WindowScroll.IsScrollable(
_hwnd
))
719
int iTextLen = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero);
723
if (Misc.GetClassName(
_hwnd
).Equals("Internet Explorer_TridentLstBox"))
730
return XSendMessage.GetItemText(
_hwnd
, NativeMethods.WM_USER + NativeMethods.LB_GETTEXT, _item, iTextLen);
734
string text = Misc.GetUnsafeText(
_hwnd
, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen);
761
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
768
bool itemSelected = IsSelected (
_hwnd
, _item);
818
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
824
if (ListboxItem.IsSelected (
_hwnd
, _item) && !_listBox.IsParentedByCombo())
870
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
875
if (!IsSelected(
_hwnd
, _item))
890
if (!UnSelect(
_hwnd
, _item))
901
return ListboxItem.IsSelected (
_hwnd
, _item);
921
if (_listBox._parentedByCombo && !SafeNativeMethods.IsWindowVisible(
_hwnd
))
926
if (!WindowScroll.IsScrollable(
_hwnd
))
932
Misc.ProxySendMessage(
_hwnd
, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero);
943
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
947
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
1006
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR;
1010
return Select (
_hwnd
, _item, false);
1031
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item;
1035
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0;
1052
Misc.ProxySendMessage(
_hwnd
, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect);
1053
return Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty;
1066
_windowsForms = WindowsFormsHelper.GetControlState(
_hwnd
);
1121
Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item));
1126
Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1136
int listBoxStyle = Misc.GetWindowStyle(
_hwnd
);
1140
int idListBox = Misc.GetWindowId(
_hwnd
);
1144
IntPtr hwndListBoxParent = Misc.GetParent(
_hwnd
);
1148
hwndListBoxParent, NativeMethods.WM_COMMAND, wParam,
_hwnd
);
1156
Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1160
int id = Misc.GetWindowId(
_hwnd
);
1164
Misc.ProxySendMessageInt(combo.
_hwnd
, NativeMethods.WM_COMMAND, wParam,
_hwnd
);
MS\Internal\AutomationProxies\WindowsListView.cs (82)
86
WinEventTracker.AddToNotificationList(
_hwnd
, new WinEventTracker.ProxyRaiseEvents (WindowsListView.GroupSpecificEvents), _groupEvents);
170
(IsDetailMode (
_hwnd
) ||
171
IsImplementingGrid (
_hwnd
) && GetItemCount (
_hwnd
) > 0))
182
if (iid == TablePattern.Pattern && IsDetailMode (
_hwnd
))
196
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
203
count = GetItemCount (
_hwnd
);
230
_groupsCollection.EnsureCreation (
_hwnd
);
232
GroupManager manager = _groupsCollection[
_hwnd
];
264
if (IsGroupViewEnabled (
_hwnd
))
267
_groupsCollection.EnsureCreation (
_hwnd
);
270
GroupManager manager = _groupsCollection [
_hwnd
];
309
int count = GetItemCount (
_hwnd
);
327
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
328
int itemCount = GetItemCount(
_hwnd
);
340
_groupsCollection.EnsureCreation(
_hwnd
);
342
GroupManager manager = _groupsCollection[
_hwnd
];
362
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
369
_groupsCollection.EnsureCreation (
_hwnd
);
371
GroupManager manager = _groupsCollection [
_hwnd
];
386
int count = GetItemCount (
_hwnd
);
396
if (PtInListViewHeader (x, y) || !PtInClientRect (
_hwnd
, x, y))
402
if (IsGroupViewEnabled (
_hwnd
))
404
_groupsCollection.EnsureCreation (
_hwnd
);
407
GroupManager manager = WindowsListView._groupsCollection [
_hwnd
];
416
ProxyFragment group = new WindowsListViewGroup (
_hwnd
, this, groupID);
422
NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest(
_hwnd
, new NativeMethods.Win32Point(x, y));
429
else if (hitTest.flags == NativeMethods.LVHT_NOWHERE && IsDetailMode(
_hwnd
))
447
hitTest = WindowsListView.SubitemHitTest(
_hwnd
, new NativeMethods.Win32Point(x, y));
464
if (IsGroupViewEnabled (
_hwnd
))
466
_groupsCollection.EnsureCreation (
_hwnd
);
467
return WindowsListViewGroup.GetFocusInGroup (
_hwnd
, this);
471
int index = GetItemNext(
_hwnd
, -1, NativeMethods.LVNI_FOCUSED);
494
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
508
WinEventTracker.AddToNotificationList(
_hwnd
, _createOnEvent, aEvents);
523
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
537
WinEventTracker.AddToNotificationList(
_hwnd
, _createOnEvent, aEvents);
550
int count = GetItemCount (
_hwnd
);
551
int countSelection = MultiSelected(
_hwnd
) ? GetSelectedItemCount(
_hwnd
) : 1;
562
for (int itemPos = GetItemNext(
_hwnd
, -1, NativeMethods.LVNI_SELECTED); itemPos != -1; itemPos = GetItemNext(
_hwnd
, itemPos, NativeMethods.LVNI_SELECTED))
582
return MultiSelected (
_hwnd
);
603
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
608
WindowScroll.Scroll (
_hwnd
, horizontalAmount, verticalAmount, true);
614
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
620
int size = ApproximateViewRect (
_hwnd
);
639
fScrollSuccess = Scroll(
_hwnd
, (IntPtr)dx, (IntPtr)dy);
646
if (fScrollSuccess && (((int)horizontalPercent != (int)ScrollPattern.NoScroll && (int)horizontalPercent != (int)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalScrollPercentProperty,
_hwnd
))
647
|| ((int)verticalPercent != (int)ScrollPattern.NoScroll && (int)verticalPercent != (int)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalScrollPercentProperty,
_hwnd
))))
655
Scroll(
_hwnd
, (IntPtr)dx, (IntPtr)dy);
675
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalScrollPercentProperty,
_hwnd
);
685
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalScrollPercentProperty,
_hwnd
);
695
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalViewSizeProperty,
_hwnd
);
705
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalViewSizeProperty,
_hwnd
);
715
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.HorizontallyScrollableProperty,
_hwnd
);
724
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.VerticallyScrollableProperty,
_hwnd
);
736
int maxRow = GetRowCount (
_hwnd
);
737
int maxColumn = GetColumnCount (
_hwnd
);
750
if (IsDetailMode (
_hwnd
))
762
return GetRowCount (
_hwnd
);
770
return GetColumnCount (
_hwnd
);
788
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
853
return new int [] { ListViewGetView (
_hwnd
) };
860
return ListViewGetView (
_hwnd
);
1543
return CheckBoxes (
_hwnd
) ? new int [] { NativeMethods.EventObjectNameChange, NativeMethods.EventObjectStateChange } : new int [] { NativeMethods.EventObjectNameChange };
1571
return new WindowsListViewGroup (
_hwnd
, this, groupID);
1580
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
1582
if ((!hasGroup) && GetItemCount(
_hwnd
) > 0)
1590
_groupsCollection.EnsureCreation(
_hwnd
);
1592
GroupManager manager = _groupsCollection[
_hwnd
];
1608
return CreateListViewItemOrStartMenuItem(new WindowsListViewGroup(
_hwnd
, this, groupId), item);
1613
return new WindowsListViewGroup (
_hwnd
, this, item);
1627
ProxyFragment proxyFragment = new ListViewItemStartMenu(
_hwnd
, parent, item, AccessibleObject);
1636
return new ListViewItem(
_hwnd
, parent, item);
1643
string className = Misc.GetClassName(Misc.GetParent(
_hwnd
));
1667
if (!Misc.GetScrollBarInfo(
_hwnd
, scrollBar, ref scrollBarInfo) ||
1683
if (!Misc.GetScrollInfo(
_hwnd
, sbFlag, ref si) ||
1707
return new ListViewSubItem (
_hwnd
, lvItem, column, row);
1714
int itemCount = GetItemCount (
_hwnd
);
1717
if (IsListMode (
_hwnd
))
1831
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (29)
57
else if (iid == ExpandCollapsePattern.Pattern && WindowsListView.IsGroupViewEnabled(
_hwnd
))
70
GroupManager manager = WindowsListView._groupsCollection [
_hwnd
];
101
return XSendMessage.GetItemText(
_hwnd
, group, NativeMethods.LVGF_HEADER);
112
return XSendMessage.GetItemText(
_hwnd
, group);
126
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
158
XSendMessage.GetGroupInfo(
_hwnd
, ref group); // ignore return code.
179
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
216
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
233
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
246
XSendMessage.GetGroupInfo(
_hwnd
, ref group); // ignore return code.
285
NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest (
_hwnd
, pt);
295
return new ListViewItem (
_hwnd
, this, hitTest.iItem);
306
XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType()));
311
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
328
int groupIndex = (int)Misc.ProxySendMessage(
_hwnd
, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
337
bool lresult = XSendMessage.XSend(
_hwnd
, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
361
int maxRow = GetRowCount (
_hwnd
, ID);
362
int maxColumn = GetColumnCount(
_hwnd
, ID);
374
if (WindowsListView.IsDetailMode (
_hwnd
))
386
return GetRowCount (
_hwnd
, ID);
394
return GetColumnCount (
_hwnd
, ID);
404
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
417
return IsCollapsed(
_hwnd
, _groupID);
591
return new ListViewItem (
_hwnd
, this, index);
613
if (!XSendMessage.SetGroupInfo(
_hwnd
, group))
624
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
631
return new ListViewSubItem (
_hwnd
, lvItem, column, lvitemIndex);
643
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
827
return new ListViewGroupSubsetLink(
_hwnd
, this, item, _groupID);
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (4)
77
XSendMessage.XSend(
_hwnd
, NativeMethods.LVM_GETGROUPRECT, new IntPtr(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
78
Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref rect, 2);
94
XSendMessage.GetGroupInfo(
_hwnd
, ref groupInfo); // ignore return code.
110
return XSendMessage.GetItemText(
_hwnd
, group, NativeMethods.LVGF_SUBSET);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (83)
59
if (iid == InvokePattern.Pattern && WindowsListView.ListViewInvokable(
_hwnd
))
69
if (iid == ValuePattern.Pattern && WindowsListView.ListViewEditable (
_hwnd
))
74
if (iid == GridItemPattern.Pattern && IsImplementingGrid (
_hwnd
))
79
if (iid == TogglePattern.Pattern && IsItemWithCheckbox(
_hwnd
, _item))
84
if (iid == ScrollItemPattern.Pattern && WindowScroll.IsScrollable(
_hwnd
))
111
WindowsListView._groupsCollection.EnsureCreation (
_hwnd
);
113
GroupManager manager = WindowsListView._groupsCollection[
_hwnd
];
133
if (XSendMessage.XSend(
_hwnd
, NativeMethods.LVM_GETITEMINDEXRECT, new IntPtr(&ii), new IntPtr(&itemRectangle), Marshal.SizeOf(ii.GetType()), Marshal.SizeOf(itemRectangle.GetType())))
135
if (Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRectangle, 2))
147
if (WindowsListView.GetItemRect(
_hwnd
, _item, NativeMethods.LVIR_BOUNDS, out itemRectangle))
190
string text = GetText(
_hwnd
, _item, 0);
213
return WindowsListView.SetItemFocused (
_hwnd
, _item);
233
&& IsItemWithCheckbox(
_hwnd
, _item))
257
if (WindowsListView.IsDetailMode (
_hwnd
))
260
int countCol = GetSubItemCount (
_hwnd
);
277
if (IsItemWithCheckbox(
_hwnd
, _item) && item == 0)
281
else if (WindowsListView.IsDetailMode (
_hwnd
))
283
int countCol = GetSubItemCount (
_hwnd
);
296
if (IsItemWithCheckbox(
_hwnd
, _item))
300
else if (WindowsListView.IsDetailMode(
_hwnd
))
302
int countCol = GetSubItemCount (
_hwnd
);
315
if (WindowsListView.IsDetailMode (
_hwnd
))
317
int countCol = GetSubItemCount (
_hwnd
);
325
if (IsItemWithCheckbox(
_hwnd
, _item))
337
if (IsItemWithCheckbox (
_hwnd
, _item))
339
NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (
_hwnd
, _item);
343
return new ListViewItemCheckbox (
_hwnd
, this, _item, _checkbox);
347
if (WindowsListView.IsDetailMode (
_hwnd
))
350
return ListViewSubItem.ElementProviderFromPoint (
_hwnd
, this, _item, x, y);
362
int columns = ListViewItem.GetSubItemCount (
_hwnd
);
365
int column = (int)Misc.ProxySendMessage(
_hwnd
, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
384
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
390
if (!WindowsListView.MultiSelected (
_hwnd
) && WindowsListView.IsItemSelected (
_hwnd
, _item))
396
WindowsListView.UnselectAll (
_hwnd
);
399
if (!WindowsListView.SelectItem(
_hwnd
, _item))
409
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
415
if (WindowsListView.IsItemSelected (
_hwnd
, _item))
421
if (!WindowsListView.MultiSelected(
_hwnd
))
428
if (selectionRequired || WindowsListView.GetSelectedItemCount(
_hwnd
) > 0)
437
if (!WindowsListView.SelectItem(
_hwnd
, _item))
447
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
453
if (!WindowsListView.IsItemSelected (
_hwnd
, _item))
459
if (!WindowsListView.MultiSelected (
_hwnd
))
473
if (!WindowsListView.UnSelectItem(
_hwnd
, _item))
484
return WindowsListView.IsItemSelected (
_hwnd
, _item);
516
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
521
if (WindowsListView.Scrollable (
_hwnd
))
524
WindowsListView.EnsureVisible (
_hwnd
, _item, true);
545
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
550
SetValue(val,
_hwnd
, _item);
558
return ListViewItem.GetText (
_hwnd
, _item, 0);
567
return !WindowsListView.ListViewEditable (
_hwnd
);
580
if (WindowsListView.IsGroupViewEnabled (
_hwnd
))
586
if (WindowsListView.IsListMode (
_hwnd
))
588
int itemCount = WindowsListView.GetItemCount (
_hwnd
);
589
int rowCount = WindowsListView.GetRowCountListMode (
_hwnd
, itemCount);
595
int columnCount = WindowsListView.GetColumnCountOtherModes (
_hwnd
);
605
if (WindowsListView.IsGroupViewEnabled (
_hwnd
))
611
if (WindowsListView.IsListMode (
_hwnd
))
613
int itemCount = WindowsListView.GetItemCount (
_hwnd
);
614
int rowCount = WindowsListView.GetRowCountListMode (
_hwnd
, itemCount);
619
int columnCount = WindowsListView.GetColumnCountOtherModes (
_hwnd
);
657
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
663
if (!WindowsListView.Scrollable(
_hwnd
))
669
WindowsListView.EnsureVisible(
_hwnd
, _item, false);
841
return WindowsListView.IsItemFocused (
_hwnd
, _item);
849
IntPtr hwndHeader = WindowsListView.ListViewGetHeader(
_hwnd
);
855
&& Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref listViewRect))
886
return new ListViewSubItem (
_hwnd
, this, index, _item);
891
return new ListViewItemCheckbox (
_hwnd
, this, _item, _checkbox);
918
if (!WindowsListView.GetItemRect(
_hwnd
, _item, NativeMethods.LVIR_LABEL, out itemRectangle))
923
if (WindowsListView.IsDetailMode (
_hwnd
) && !WindowsListView.FullRowSelect (
_hwnd
))
929
if (!Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
939
if (!WindowsListView.GetItemRect(
_hwnd
, _item, NativeMethods.LVIR_LABEL, out itemRectangle))
953
Misc.MouseClick(clickPoint.x, clickPoint.y, !WindowsListView.ListViewSingleClickActivate(
_hwnd
));
981
int groupID = GetGroupID (
_hwnd
, _item);
986
GroupManager.GroupInfo groupInfo = WindowsListViewGroup.GetGroupInfo (
_hwnd
, groupID);
995
int columnCount = WindowsListViewGroup.GetColumnCountExternal (
_hwnd
, groupID);
1014
int groupID = GetGroupID (
_hwnd
, _item);
1019
GroupManager.GroupInfo groupInfo = WindowsListViewGroup.GetGroupInfo (
_hwnd
, groupID);
1028
int columnCount = WindowsListViewGroup.GetColumnCountExternal (
_hwnd
, groupID);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (12)
63
return ListViewCheckBoxRect(
_hwnd
, _listviewItem).ToRect(false);
73
NativeMethods.Win32Rect itemRect = ListViewCheckBoxRect(
_hwnd
, _listviewItem);
79
if (Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect))
100
return WindowsListView.GetItemToolTipText(
_hwnd
);
109
string name = ListViewItem.GetText(
_hwnd
, _listviewItem, 0);
212
ListViewItem.CheckState current = (ListViewItem.CheckState) WindowsListView.GetCheckedState (
_hwnd
, _listviewItem);
239
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
244
Misc.SetFocus(
_hwnd
);
246
NativeMethods.Win32Rect rc = ListViewCheckBoxRect(
_hwnd
, _listviewItem);
249
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
252
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
253
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (9)
47
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
))
58
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
77
bool isVerticalScroll = IsScrollBarVertical(
_hwnd
, _sbFlag);
78
if (isVerticalScroll && WindowsListView.InReportView (
_hwnd
))
80
Misc.SetScrollPos(
_hwnd
, _sbFlag, pos, true);
85
int size = WindowsListView.ApproximateViewRect (
_hwnd
);
104
if (WindowsListView.Scroll (
_hwnd
, (IntPtr) dx, (IntPtr) dy))
109
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
129
WindowsListView.Scroll (
_hwnd
, (IntPtr) dx, (IntPtr) dy);
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (26)
55
if (iid == ValuePattern.Pattern && _item == 0 && WindowsListView.ListViewEditable (
_hwnd
))
79
if (!WindowsListView.GetSubItemRect (
_hwnd
, _itemParent, _item, lvir, out itemRectangle))
87
if (WindowsListView.FullRowSelect(
_hwnd
) && !WindowsListView.HasJustifyColumnsExStyle(
_hwnd
) &&
88
!WindowsListView.IsIconView(
_hwnd
) && _item == 0 && 1 < ListViewItem.GetSubItemCount(
_hwnd
))
92
if (!WindowsListView.GetSubItemRect(
_hwnd
, _itemParent, 1, NativeMethods.LVIR_BOUNDS, out itemRectangle1))
98
if (Misc.IsControlRTL(
_hwnd
))
108
if (ListViewItem.IsItemWithCheckbox (
_hwnd
, _itemParent))
110
NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (
_hwnd
, _itemParent);
113
if (Misc.IsControlRTL(
_hwnd
))
167
IntPtr ancestor =
_hwnd
;
189
return WindowsListView.GetItemToolTipText(
_hwnd
);
198
string name = ListViewItem.GetText(
_hwnd
, _itemParent, _item);
207
return WindowsListView.SetItemFocused (
_hwnd
, this._itemParent);
217
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
222
ListViewItem.SetValue (val,
_hwnd
, _itemParent);
230
return ListViewItem.GetText (
_hwnd
, _itemParent, _item);
238
return !WindowsListView.ListViewEditable (
_hwnd
);
251
if (!WindowsListView.IsGroupViewEnabled (
_hwnd
))
259
int groupID = ListViewItem.GetGroupID (
_hwnd
, _itemParent);
263
GroupManager.GroupInfo groupInfo = WindowsListViewGroup.GetGroupInfo (
_hwnd
, groupID);
326
IntPtr hwndHeader = WindowsListView.ListViewGetHeader (
_hwnd
);
372
if (Misc.IsComctrlV6OnOsVerV6orHigher(
_hwnd
))
374
int column = (int)Misc.ProxySendMessage(
_hwnd
, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
378
return WindowsListView.IsItemFocused (
_hwnd
, _itemParent);
MS\Internal\AutomationProxies\WindowsMenu.cs (31)
83
_expandedMenus[hwnd] = new MenuParentInfo(_parent.
_hwnd
, _parent._item, ((MenuItem)_parent)._menuType);
97
_expandedMenus[hwnd] = new MenuParentInfo(_parent.
_hwnd
, _parent._item, ((MenuItem)_parent)._menuType);
137
if (_type == MenuType.Submenu && GetHierarchyParent(
_hwnd
) == null && GetSystemPopupParent() != null)
338
return new int[] { 1, unchecked((int)(long)
_hwnd
), unchecked((int)(long)_hmenu) };
497
return new MenuItem(
_hwnd
, this, index, _hmenu, _type);
800
if (!GetMenuBarInfo(
_hwnd
, NativeMethods.OBJID_SYSMENU, 0, out mbi))
812
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(
_hwnd
)))
817
if (!Misc.ProxyGetTitleBarInfo(
_hwnd
, out ti))
830
if (GetMenuBarInfo(
_hwnd
, NativeMethods.OBJID_MENU, 0, out mbi))
1213
if (!SafeNativeMethods.IsWindowVisible (
_hwnd
) || _type == MenuItemType.Spacer)
1247
if (GetMenuBarInfo(
_hwnd
, NativeMethods.OBJID_SYSMENU, 0, out mbi))
1256
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(
_hwnd
)))
1261
if (!Misc.ProxyGetTitleBarInfo(
_hwnd
, out ti))
1274
if (Misc.GetMenuItemRect(
_hwnd
, _hmenu, _item, out rc))
1383
if (!Misc.IsEnabled(
_hwnd
))
1425
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
) || _type == MenuItemType.Spacer)
1444
if (hwndFocus != IntPtr.Zero && hwndFocus !=
_hwnd
)
2019
if (!SafeNativeMethods.IsWindowVisible (
_hwnd
))
2064
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
2088
hwndSubMenu !=
_hwnd
;
2118
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' '));
2226
if (!SafeNativeMethods.IsWindowVisible (
_hwnd
))
2240
if (Misc.ProxyGetGUIThreadInfo(0, out gui) &&
_hwnd
== gui.hwndActive)
2256
return Misc.SetFocus(
_hwnd
);
2578
if (
_hwnd
== IntPtr.Zero)
2584
using (SafeProcessHandle hProcess = new SafeProcessHandle(
_hwnd
))
2643
return SafeNativeMethods.IsWindowEnabled(
_hwnd
);
2661
return new MenuItem(
_hwnd
, _parent, _item - 1, _hmenu, _menuType);
2676
return new MenuItem(
_hwnd
, _parent, nextItem, _hmenu, _menuType);
2712
if (new MenuItem (
_hwnd
, this._parent, i, _hmenu, _menuType).HotKey == chHotKey)
2927
return
_hwnd
;
MS\Internal\AutomationProxies\WindowsProgressbar.cs (3)
154
int cur = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
155
int min = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero);
156
int max = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (10)
123
if (!Misc.GetWindowRect(
_hwnd
, ref rebarRect))
186
return new RebarBandItem (
_hwnd
, this, index);
193
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero);
206
return XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType()));
279
return GetBoundingRectangle (
_hwnd
, _item);
288
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
289
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _item);
374
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
379
Misc.PostMessage(
_hwnd
, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero);
435
if (XSendMessage.XSend(
_hwnd
, NativeMethods.RB_GETBANDINFOA, new IntPtr(_item), new IntPtr(&rebarBandInfo), Marshal.SizeOf(rebarBandInfo.GetType()), XSendMessage.ErrorValue.Zero))
MS\Internal\AutomationProxies\WindowsRichEdit.cs (6)
162
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
173
if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
))
188
int result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
195
result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
560
return Misc.ProxyGetText(
_hwnd
);
680
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (6)
64
Misc.SetFocus(_pattern.
_hwnd
);
250
Misc.SetFocus(_pattern.
_hwnd
);
268
Misc.SetFocus(_pattern.
_hwnd
);
300
Misc.SetFocus(_pattern.
_hwnd
);
322
Misc.SetFocus(_pattern.
_hwnd
);
346
Misc.SetFocus(_pattern.
_hwnd
);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (28)
118
return (iid == RangeValuePattern.Pattern && WindowScroll.Scrollable (
_hwnd
, _sbFlag) && HasValuePattern (
_hwnd
, _sbFlag)) ? this : null;
139
if (!Misc.GetScrollBarInfo(
_hwnd
, idObject, ref sbi))
159
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_parent.
_hwnd
)))
190
return SafeNativeMethods.IsWindowVisible(
_hwnd
);
199
if (SafeNativeMethods.IsWindowVisible(
_hwnd
) &&
214
return IsEnabled() && Misc.IsEnabled(
_hwnd
);
218
return IsScrollBarVertical(
_hwnd
, _sbFlag) ? OrientationType.Vertical : OrientationType.Horizontal;
262
return IsScrollBarVertical(
_hwnd
, _sbFlag)
282
if (item == ScrollBarItem.UpArrow && !IsScrollBarWithThumb (
_hwnd
, _sbFlag))
302
if (item == ScrollBarItem.DownArrow && !IsScrollBarWithThumb (
_hwnd
, _sbFlag))
329
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(WindowsScrollBarBits.GetBoundingRectangle(
_hwnd
, this, item, _sbFlag));
333
return new WindowsScrollBarBits (
_hwnd
, this, (int) item, _sbFlag);
363
return !Misc.IsEnabled(
_hwnd
) || !HasValuePattern(
_hwnd
, _sbFlag);
521
if (_sbFlag != NativeMethods.SB_CTL || Misc.GetScrollBarInfo(
_hwnd
, NativeMethods.OBJID_CLIENT, ref sbi))
523
return new WindowsScrollBarBits (
_hwnd
, this, (int) index, _sbFlag);
555
string classname = Misc.GetClassName(
_hwnd
);
574
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
585
if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent.
_hwnd
)))
616
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
))
627
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
665
string classname = Misc.GetClassName(
_hwnd
);
688
Misc.SetScrollPos(
_hwnd
, _sbFlag, val, true);
694
IsScrollBarVertical(
_hwnd
, _sbFlag) ? NativeMethods.WM_VSCROLL : NativeMethods.WM_HSCROLL;
699
Misc.ProxySendMessage(
_hwnd
, msg, (IntPtr)wParam, IntPtr.Zero);
701
Misc.ProxySendMessage(
_hwnd
, msg, (IntPtr)wParam, IntPtr.Zero);
738
if (!Misc.GetScrollBarInfo(
_hwnd
, idObject, ref sbi))
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (10)
111
return SafeNativeMethods.IsWindowVisible(
_hwnd
);
126
return GetBoundingRectangle (
_hwnd
, _parent, (WindowsScrollBar.ScrollBarItem) _item, _sbFlag);
147
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
177
if (WindowsScrollBar.IsScrollBarVertical(
_hwnd
, _sbFlag))
235
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(parent._parent.
_hwnd
)))
516
IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(
_hwnd
) :
_hwnd
;
544
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
565
Misc.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd ==
_hwnd
? IntPtr.Zero :
_hwnd
));
MS\Internal\AutomationProxies\WindowsSlider.cs (16)
137
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SliderItem.GetBoundingRectangle (
_hwnd
, item, _fHorizontal));
156
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
167
IntPtr parent = Misc.GetParent(
_hwnd
);
245
return new SliderItem (
_hwnd
, this, (int) item, _fHorizontal);
260
int value = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
265
int maxValue = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
283
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val));
290
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero);
298
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero);
306
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
314
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero);
399
return GetBoundingRectangle (
_hwnd
, (WindowsSlider.SItem) _item, _fHorizontal);
408
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
409
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, 0);
430
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
439
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsStatic.cs (2)
132
return Misc.AccessKey(Misc.ProxyGetText(
_hwnd
));
151
return Misc.StripMnemonic(Misc.ProxyGetText(
_hwnd
));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (17)
105
if (hwndChild == IntPtr.Zero || hwndChild ==
_hwnd
)
107
hwndChild = GetChildHwnd(
_hwnd
, accChild.Location);
110
if(hwndChild != IntPtr.Zero && hwndChild !=
_hwnd
)
117
return new WindowsStatusBarPane(
_hwnd
, this, index, accChild);
141
return Misc.ProxyGetText(
_hwnd
);
170
return item + 1 < count ? CreateStatusBarPane(item + 1) : (_fHasGrip ? StatusBarGrip.Create(
_hwnd
, this, -1) : null);
201
return Count > 0 ? CreateStatusBarPane(0) : (_fHasGrip ? StatusBarGrip.Create(
_hwnd
, this, GripItemID) : null);
210
return StatusBarGrip.Create(
_hwnd
, this, GripItemID);
223
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (WindowsStatusBarPane.GetBoundingRectangle (
_hwnd
, item));
234
NativeMethods.Win32Rect rc = StatusBarGrip.GetBoundingRectangle (
_hwnd
);
237
ProxySimple grip = StatusBarGrip.Create(
_hwnd
, this, -1);
307
hwndChild = GetChildHwnd(
_hwnd
, accChild.Location);
336
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero);
459
return GetBoundingRectangle (
_hwnd
, _item);
596
int retValue = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
601
return XSendMessage.GetItemText(
_hwnd
, NativeMethods.SB_GETTEXTW, _item, len);
774
return GetBoundingRectangle(
_hwnd
).ToRect(false);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (30)
157
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref HitTestInfo.pt, 1))
161
index = XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
177
int item = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
244
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (
_hwnd
, NativeMethods.GA_PARENT);
313
if (!XSendMessage.GetItem(
_hwnd
, index, ref item))
325
return new HeaderItem (
_hwnd
, this, index);
333
return HeaderItemCount (
_hwnd
);
429
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
463
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
481
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
482
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
523
if (Misc.IsComctrlV6OnOsVerV6orHigher(
_hwnd
))
525
int item = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
545
int index = OrderToIndex (
_hwnd
, _item);
554
return XSendMessage.GetItemText(
_hwnd
, index, hdi);
562
int index = OrderToIndex (
_hwnd
, _item);
568
result = XSendMessage.XSend(
_hwnd
, NativeMethods.HDM_GETITEMRECT, new IntPtr(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero);
573
if (!Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref rectW32, 2))
586
if (Misc.IsLayoutRTL(
_hwnd
))
637
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
) || !SafeNativeMethods.IsWindowVisible (
_hwnd
) || HeaderIsHidden (
_hwnd
))
668
return Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1);
679
if (XSendMessage.GetItem(
_hwnd
, _item, ref item))
693
int item = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
708
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
717
Rect rect = XSendMessage.GetItemRect(
_hwnd
, NativeMethods.HDM_GETITEMDROPDOWNRECT, _item);
724
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
725
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
734
if (Misc.GetFocusedWindow().Equals(
_hwnd
))
MS\Internal\AutomationProxies\WindowsTab.cs (53)
47
_fIsContent = IsValidControl(
_hwnd
);
146
return IsValidControl(
_hwnd
);
182
int count = GetItemCount(
_hwnd
);
205
int count = GetItemCount(
_hwnd
);
228
int count = GetItemCount(
_hwnd
);
241
int count = GetItemCount(
_hwnd
);
259
if (!Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref hti.pt, 1))
276
index = XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType()));
290
int focusIndex = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero);
292
if (focusIndex >= 0 && focusIndex < GetItemCount(
_hwnd
))
363
for (int i = 0, c = GetItemCount(
_hwnd
); i < c; i++)
365
if (sTitle == WindowsTabItem.GetName(
_hwnd
, i, true))
384
if (!WindowsTab.SupportMultipleSelection (
_hwnd
))
386
int selectedItem = WindowsTabItem.GetCurrentSelectedItem(
_hwnd
);
428
return SupportMultipleSelection (
_hwnd
);
448
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
472
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
513
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
573
if (!Misc.GetWindowRect(
_hwnd
, ref viewable))
671
return new WindowsTabItem(
_hwnd
, this, index, _windowsForms == WindowsFormsHelper.FormControlState.True);
692
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
697
return GetUpDownHwnd(
_hwnd
) != IntPtr.Zero;
746
return GetUpDownHwnd(
_hwnd
);
849
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
908
_fIsContent = !string.IsNullOrEmpty(GetName(
_hwnd
, _item, true));
951
return Misc.AccessKey(WindowsTabItem.GetItemText(
_hwnd
, _item));
955
return !string.IsNullOrEmpty(GetName(
_hwnd
, _item, true));
966
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
967
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _item);
977
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
986
return GetName(
_hwnd
, _item, _windowsForms == WindowsFormsHelper.FormControlState.True);
1003
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
1058
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1078
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1096
if (WindowsTab.SupportMultipleSelection(
_hwnd
))
1121
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1133
if (WindowsTab.SupportMultipleSelection(
_hwnd
))
1149
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero);
1162
if (!WindowsTab.SupportMultipleSelection(
_hwnd
))
1164
int selectedItem = GetCurrentSelectedItem(
_hwnd
);
1175
if (!XSendMessage.GetItem(
_hwnd
, _item, ref TCItem))
1203
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1255
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item;
1272
if (!XSendMessage.XSend(
_hwnd
, NativeMethods.TCM_GETITEMRECT, new IntPtr(_item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero))
1277
return Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty;
1282
return (SafeNativeMethods.IsWindowEnabled(
_hwnd
) && SafeNativeMethods.IsWindowVisible(
_hwnd
));
1297
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
1299
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1300
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1306
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
1316
IntPtr hwndParent =
_hwnd
;
1325
string sName = WindowsTabItem.GetName(
_hwnd
, _item, true);
MS\Internal\AutomationProxies\WindowsTitleBar.cs (12)
57
return Misc.GetTitleBarRect(
_hwnd
);
65
return new int [] { 4, unchecked((int)(long)
_hwnd
), _item };
73
return Misc.ProxyGetText(
_hwnd
);
111
int hit = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y));
132
WindowsMenu sysmenu = WindowsMenu.CreateSystemMenu(
_hwnd
, this);
160
return WindowsMenu.CreateSystemMenu (
_hwnd
, this);
166
return new TitleBarButton (
_hwnd
, this, item);
198
Misc.ProxyGetTitleBarInfo(
_hwnd
, out ti);
358
Rect[] rects = Misc.GetTitlebarRects(
_hwnd
);
402
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
431
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero);
445
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (30)
210
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (ToolbarItem.GetBoundingRectangle (
_hwnd
, item));
228
int focusIndex = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero);
232
Accessible acc = Accessible.CreateNativeFromEvent(
_hwnd
, NativeMethods.OBJID_CLIENT, NativeMethods.CHILD_SELF);
238
return new WindowsToolbarAsMenu(
_hwnd
, this, focusIndex, acc);
242
return new WindowsToolbar(
_hwnd
, this, focusIndex);
257
string name = Misc.ProxyGetText(
_hwnd
);
293
if (!XSendMessage.GetItem(
_hwnd
, item, ref tbb))
299
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0)
301
Accessible acc = Accessible.CreateNativeFromEvent(
_hwnd
, NativeMethods.OBJID_CLIENT, item + 1);
306
return new ToolbarItemAsMenuItem(
_hwnd
, this, item, tbb.idCommand, acc);
310
return new ToolbarItem(
_hwnd
, this, item, tbb.idCommand);
329
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero);
362
if (XSendMessage.GetItem(
_hwnd
, _item, ref tbb))
368
bool hasImageList = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0;
369
int exStyle = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero);
380
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
428
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
451
return GetBoundingRectangle(
_hwnd
, _item);
468
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0;
514
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero);
576
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item;
598
int len = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero);
601
return XSendMessage.GetItemText(
_hwnd
, NativeMethods.TB_GETBUTTONTEXT, _idCommand, len);
624
if (XSendMessage.GetItem(
_hwnd
, _item, ref tbb))
635
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
636
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _idCommand);
642
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
)
643
|| Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
650
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
677
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
73
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
79
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (2)
182
string className = Misc.ProxyGetClassName(
_hwnd
);
195
return Misc.ProxyGetText(
_hwnd
);
MS\Internal\AutomationProxies\WindowsTreeView.cs (79)
156
IntPtr hNext = GetNextItem (
_hwnd
, ((TreeViewItem) child)._hItem);
159
return new TreeViewItem (
_hwnd
, this, hNext, (int) TVItem.TopLevel);
183
IntPtr hPrev = GetPreviousItem (
_hwnd
, ((TreeViewItem) child)._hItem);
185
return hPrev != IntPtr.Zero ? new TreeViewItem (
_hwnd
, this, hPrev, (int) TVItem.TopLevel) : null;
189
IntPtr hChild = GetRoot (
_hwnd
);
196
for (temp = GetNextItem (
_hwnd
, hChild); temp != IntPtr.Zero; temp = GetNextItem (
_hwnd
, hChild))
201
return new TreeViewItem (
_hwnd
, this, hChild, (int) TVItem.TopLevel);
212
hChild = GetRoot (
_hwnd
);
233
IntPtr hChild = GetRoot (
_hwnd
);
238
for (IntPtr temp = GetNextItem (
_hwnd
, hChild); temp != IntPtr.Zero; temp = GetNextItem (
_hwnd
, hChild))
252
IntPtr hItem = XSendMessage.HitTestTreeView(
_hwnd
, x, y);
263
IntPtr treeItem = GetSelection (
_hwnd
);
280
IntPtr treeItem = GetSelection(
_hwnd
);
303
return (IntPtr.Zero != GetSelection (
_hwnd
));
375
return new TreeViewItem (
_hwnd
, this, hItem, depth);
380
return CreateParents (
_hwnd
, hItem);
745
return IsItemExpanded (
_hwnd
, _hItem) ? NextSibling (child) : null;
754
return IsItemExpanded (
_hwnd
, _hItem) ? PreviousSibling (child) : null;
761
return IsItemExpanded (
_hwnd
, _hItem) ? FirstChild () : null;
768
return IsItemExpanded (
_hwnd
, _hItem) ? LastChild () : null;
789
else if (iid == ScrollItemPattern.Pattern && WindowScroll.IsScrollable(
_hwnd
))
812
if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 && Misc.IsWindowInGivenProcess(
_hwnd
, "explorer"))
815
_nativeAcc = Accessible.CreateNativeFromEvent(
_hwnd
, NativeMethods.OBJID_CLIENT, childId);
835
return WindowsTreeView.GetItemRect(
_hwnd
, _hItem, true).ToRect(false);
844
NativeMethods.Win32Rect itemRect = GetItemRect(
_hwnd
, _hItem, true);
847
if (!Misc.IsItemVisible(
_hwnd
, ref itemRect))
863
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
864
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _item);
925
return WindowsTreeView.SelectItem (
_hwnd
, _hItem);
941
return new int [4] { ProxySimple.Win32ProviderRuntimeIdBase, unchecked((int)(long)
_hwnd
), highPart, lowPart };
945
return new int[3] { ProxySimple.Win32ProviderRuntimeIdBase, (int)
_hwnd
, (int)_hItem };
957
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
977
if (!WindowsTreeView.SelectItem(
_hwnd
, _hItem))
988
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1006
if (selectionRequired || WindowsTreeView.GetSelection(
_hwnd
) != IntPtr.Zero)
1013
if (!WindowsTreeView.SelectItem(
_hwnd
, _hItem))
1023
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1073
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1093
WindowsTreeView.Expand (
_hwnd
, _hItem);
1102
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1118
WindowsTreeView.Collapse (
_hwnd
, _hItem);
1144
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1151
if (!WindowsTreeView.SetItemText(
_hwnd
, _hItem, val))
1184
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1197
WindowsTreeView.SetCheckState(
_hwnd
, _hItem, GetToggleState() != ToggleState.On);
1219
if (!WindowScroll.IsScrollable(
_hwnd
))
1224
Misc.SetFocus(
_hwnd
);
1228
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem);
1281
int selected = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED));
1304
if (!WindowsTreeView.IsItemExpanded (
_hwnd
, current._hItem))
1316
IntPtr hNext = WindowsTreeView.GetNextItem (
_hwnd
, ((TreeViewItem) child)._hItem);
1318
return hNext != IntPtr.Zero ? new TreeViewItem(
_hwnd
, this, hNext, _item + 1) : null;
1326
IntPtr hPrev = WindowsTreeView.GetPreviousItem (
_hwnd
, ((TreeViewItem) child)._hItem);
1328
return hPrev != IntPtr.Zero ? new TreeViewItem(
_hwnd
, this, hPrev, _item + 1) : null;
1334
IntPtr hChild = WindowsTreeView.GetFirstChild (
_hwnd
, _hItem);
1336
return hChild != IntPtr.Zero ? new TreeViewItem(
_hwnd
, this, hChild, _item + 1) : null;
1342
if (!IsItemExpanded (
_hwnd
, _hItem))
1347
IntPtr hChild = WindowsTreeView.GetFirstChild (
_hwnd
, _hItem);
1352
for (IntPtr temp = WindowsTreeView.GetNextItem (
_hwnd
, hChild); temp != IntPtr.Zero; temp = WindowsTreeView.GetNextItem (
_hwnd
, hChild))
1357
return new TreeViewItem(
_hwnd
, this, hChild, _item + 1);
1366
bool expanded = WindowsTreeView.IsItemExpanded (
_hwnd
, _hItem);
1374
bool hasChildren = WindowsTreeView.TreeViewItem_HasChildren (
_hwnd
, _hItem);
1403
state = (WindowsTreeView.CheckState)WindowsTreeView.GetCheckState(
_hwnd
, _hItem);
1454
NativeMethods.Win32Rect rectItem = WindowsTreeView.GetItemRect(
_hwnd
, _hItem, true);
1465
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
1480
int selected = WindowsTreeView.GetItemState(
_hwnd
, _hItem, NativeMethods.TVIS_SELECTED);
1500
isCheckbox = WindowsTreeView.CheckState.NoCheckbox != (WindowsTreeView.CheckState)WindowsTreeView.GetCheckState(
_hwnd
, _hItem);
1529
return WindowsTreeView.GetItemText (
_hwnd
, _hItem);
1537
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1538
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1544
if (WindowsTreeView.GetItem(
_hwnd
, _hItem, NativeMethods.TVIF_IMAGE | NativeMethods.TVIF_STATE, out treeItem))
1565
IntPtr address = UnsafeNativeMethods.GetProp(
_hwnd
, "MSAAStateImageMapAddr");
1571
int numStates = unchecked((int)UnsafeNativeMethods.GetProp(
_hwnd
, "MSAAStateImageMapCount"));
1584
using (SafeProcessHandle hProcess = new SafeProcessHandle(
_hwnd
))
1626
return UnsafeNativeMethods.GetProp(
_hwnd
, "MSAAStateImageMapAddr") != IntPtr.Zero;
1636
int childId = Misc.ProxySendMessageInt(
_hwnd
, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (21)
93
return new SpinButtonItem(
_hwnd
, IsSpinnerElement()? _parent : this, (int)item);
118
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
) && IsWinformUpdown(
_hwnd
))
184
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SpinButtonItem.GetBoundingRectangle (
_hwnd
, item));
203
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
))
223
Misc.ProxySendMessage(
_hwnd
, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0));
226
Misc.ProxySendMessage(HwndBuddy(
_hwnd
), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
289
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
340
int pos = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
367
IntPtr hwndBuddy = HwndBuddy(
_hwnd
);
377
int range = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
391
int range = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
464
return GetBoundingRectangle(
_hwnd
, (WindowsUpDown.SpinItem)_item);
508
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
523
if (IsHorizontal(
_hwnd
) && Misc.IsLayoutRTL(
_hwnd
))
529
Rect rc = GetBoundingRectangle(
_hwnd
, (WindowsUpDown.SpinItem)item);
532
if (!Misc.GetWindowRect(
_hwnd
, ref updownRect))
542
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center);
543
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center);
620
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
MS\Internal\AutomationProxies\WinFormsSpinner.cs (4)
307
return new WinformsSpinnerEdit(
_hwnd
, _elEdit.
_hwnd
, _elUpDown.
_hwnd
, _parent, _item);
425
return _elEdit.
_hwnd
== hwnd;