1 write to _hwnd
UIAutomationClientsideProviders (1)
MS\Internal\AutomationProxies\ProxySimple.cs (1)
75
_hwnd
= hwnd;
848 references to _hwnd
UIAutomationClientsideProviders (848)
MS\Internal\AutomationProxies\NonClientArea.cs (27)
216
int hit = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
238
WindowsTitleBar tb = new WindowsTitleBar(
_hwnd
, this, 0);
312
return new int [] { 1, unchecked((int)(long)
_hwnd
) };
318
if (iid == ScrollPattern.Pattern && WindowScroll.HasScrollableStyle(
_hwnd
))
363
WindowScroll.SetScrollPercent (
_hwnd
, horizontalPercent, verticalPercent, true);
369
WindowScroll.Scroll (
_hwnd
, horizontalAmount, verticalAmount, true);
377
return (double) WindowScroll.GetPropertyScroll (ScrollPattern.HorizontalScrollPercentProperty,
_hwnd
);
386
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalScrollPercentProperty,
_hwnd
);
395
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalViewSizeProperty,
_hwnd
);
404
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalViewSizeProperty,
_hwnd
);
413
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.HorizontallyScrollableProperty,
_hwnd
);
422
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.VerticallyScrollableProperty,
_hwnd
);
468
if (WindowsScrollBar.HasHorizontalScrollBar (
_hwnd
))
472
if (Misc.ProxyGetClassName(
_hwnd
) == "SysListView32")
473
return new WindowsListViewScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_HORZ);
475
return new WindowsScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_HORZ);
480
if (WindowsScrollBar.HasVerticalScrollBar (
_hwnd
))
484
if (Misc.ProxyGetClassName(
_hwnd
) == "SysListView32")
485
return new WindowsListViewScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_VERT);
487
return new WindowsScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_VERT);
494
if (WindowsTitleBar.HasTitleBar (
_hwnd
))
496
return new WindowsTitleBar (
_hwnd
, this, (int) item);
511
if (WindowsGrip.IsGripPresent(
_hwnd
, false))
513
return new WindowsGrip(
_hwnd
, this, (int)item);
546
IntPtr menu = UnsafeNativeMethods.GetMenu(
_hwnd
);
549
menuProxy = new WindowsMenu(
_hwnd
, this, menu, WindowsMenu.MenuType.Toplevel, (int)NonClientItem.Menu);
586
if (Misc.IsLayoutRTL(
_hwnd
))
MS\Internal\AutomationProxies\ProxyHwnd.cs (15)
107
WinEventTracker.AddToNotificationList (
_hwnd
, _createOnEvent, aEvents, cEvents);
137
WinEventTracker.RemoveToNotificationList (
_hwnd
, aEvents, null, cEvents);
148
return PtInClientRect (
_hwnd
, x, y) ? this : null;
158
accessKey = GetLabelAccessKey(
_hwnd
);
172
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
174
string sPersistentID = WindowsFormsHelper.WindowsFormsID (
_hwnd
);
182
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
203
IntPtr label = Misc.GetLabelhwnd(
_hwnd
);
212
name = Misc.ProxyGetText(
_hwnd
);
237
_controlLabel = Misc.GetLabelhwnd(
_hwnd
);
250
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
255
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
282
int idChild = Misc.GetWindowId(
_hwnd
);
283
string text = Misc.GetItemToolTipText(
_hwnd
, IntPtr.Zero, idChild);
286
text = Misc.GetItemToolTipText(
_hwnd
, IntPtr.Zero, 0);
MS\Internal\AutomationProxies\ProxySimple.cs (22)
107
if (
_hwnd
== IntPtr.Zero)
114
if (!Misc.GetWindowRect(
_hwnd
, ref controlRectangle))
167
id[1] =
_hwnd
.ToInt32();
181
if (
_hwnd
== IntPtr.Zero || (GetParent() != null && GetParent().
_hwnd
==
_hwnd
))
186
return AutomationInteropProvider.HostProviderFromHandle(
_hwnd
);
221
return Misc.IsEnabled(
_hwnd
);
232
Misc.GetWindowThreadProcessId(
_hwnd
, out pid);
254
return Misc.GetFocusedWindow() ==
_hwnd
? IsFocused() : false;
276
return WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
) ? "WinForm" : "Win32";
285
if (Misc.GetFocusedWindow() ==
_hwnd
&& IsFocused())
291
if (SafeNativeMethods.IsWindowVisible(
_hwnd
) && (bool)GetElementProperty(AutomationElement.IsEnabledProperty))
357
string sRawName = Misc.GetControlName(
_hwnd
, false);
406
EventManager.DispatchEvent(this,
_hwnd
, eventId, idProp, idObject);
546
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
596
Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref rcOutside);
620
return ClickablePoint.GetPoint(
_hwnd
, alIn, alOut, ref pt);
656
_IAccessible = Accessible.AccessibleObjectFromWindow(
_hwnd
, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK ? acc.IAccessible : null;
672
return
_hwnd
;
681
return Misc.GetWindowStyle(
_hwnd
);
690
return Misc.GetWindowExStyle(
_hwnd
);
MS\Internal\AutomationProxies\WindowsAltTab.cs (8)
53
GetAltTabInfo(
_hwnd
, 0, ref _altTabInfo, null);
146
if (Misc.MapWindowPoints(System.IntPtr.Zero,
_hwnd
, ref pt, 1))
150
if(Misc.GetClientRect(
_hwnd
, ref clientRect))
211
altTabItem = new WindowsAltTabItem(
_hwnd
, this, item);
230
if (GetAltTabInfo(
_hwnd
, -1, ref altTabInfo, null))
361
return GetBoundingRect().ToRect(Misc.IsControlRTL(
_hwnd
));
374
if (WindowsAltTab.GetAltTabInfo(
_hwnd
, _item, ref altTabInfo, itemText))
406
if(!Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (22)
269
if (!WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms) && IsStartButton())
274
return Misc.AccessKey(Misc.ProxyGetText(
_hwnd
));
280
return SafeNativeMethods.IsWindowVisible(
_hwnd
);
409
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
481
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
490
Misc.SetFocus(
_hwnd
);
514
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero);
528
Misc.ProxySendMessage(
_hwnd
, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true);
535
Misc.ProxySendMessage(
_hwnd
, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true);
569
if (!Misc.GetClassName(
_hwnd
).Equals("Button"))
577
return Misc.InTheShellProcess(
_hwnd
) && UnsafeNativeMethods.GetProp(
_hwnd
, "StartButtonTag") == new IntPtr(304);
581
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
595
if (!Misc.GetClassName(
_hwnd
).Equals("Button"))
600
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
615
IntPtr hwndParent =
_hwnd
;
660
int state = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero);
683
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
685
Misc.EnumChildWindows(
_hwnd
, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound);
714
return Misc.StripMnemonic(Misc.ProxyGetText(
_hwnd
));
720
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
723
Misc.EnumChildWindows(
_hwnd
, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton);
MS\Internal\AutomationProxies\WindowsComboBox.cs (34)
137
if (GetDroppedState (
_hwnd
))
143
if (GetComboInfo(
_hwnd
, ref cbInfo))
158
return rcCombo.ToRect(Misc.IsControlRTL(
_hwnd
));
167
if (Misc.GetClassName(
_hwnd
).Equals("Internet Explorer_TridentCmboBx"))
269
if (GetComboInfo(
_hwnd
, ref cbInfo))
272
if (Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref cbInfo.rcButton, 2))
276
return new WindowsComboButton(
_hwnd
, this, (int)ComboChildren.Button);
313
if (GetComboInfo(
_hwnd
, ref cbInfo))
350
if (GetComboInfo(
_hwnd
, ref cbInfo))
389
Misc.CheckEnabled(
_hwnd
);
394
if (GetComboInfo(
_hwnd
, ref cbInfo) && SafeNativeMethods.IsWindowVisible(cbInfo.hwndItem))
404
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
407
int id = Misc.GetWindowId(
_hwnd
);
410
Misc.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam,
_hwnd
);
432
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
457
Misc.CheckEnabled(
_hwnd
);
459
if (GetDroppedState (
_hwnd
))
465
Expand (
_hwnd
);
471
Misc.CheckEnabled(
_hwnd
);
473
if (!GetDroppedState (
_hwnd
))
479
Collapse(
_hwnd
);
486
return (GetDroppedState (
_hwnd
)) ? ExpandCollapseState.Expanded : ExpandCollapseState.Collapsed;
514
IntPtr hwndToAsk = IsComboBoxEx32() ? _hwndEx :
_hwnd
;
645
return Misc.ProxyGetText(IsComboBoxEx32() ? _hwndEx :
_hwnd
);
651
IntPtr hwnd = IsComboBoxEx32() ? _hwndEx :
_hwnd
;
661
if (GetComboInfo(
_hwnd
, ref cbInfo) && cbInfo.stateButton != NativeMethods.STATE_SYSTEM_INVISIBLE)
663
return new WindowsComboButton (
_hwnd
, this, (int) ComboChildren.Button);
673
if (GetComboInfo(
_hwnd
, ref cbInfo) && (IntPtr.Zero != cbInfo.hwndList))
937
if (!WindowsComboBox.GetComboInfo(
_hwnd
, ref cbInfo))
941
if (!Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref cbInfo.rcButton, 2))
968
Misc.CheckEnabled(
_hwnd
);
970
if (!WindowsComboBox.GetDroppedState (
_hwnd
))
972
WindowsComboBox.Expand (
_hwnd
);
976
WindowsComboBox.Collapse (
_hwnd
);
MS\Internal\AutomationProxies\WindowsEditBox.cs (21)
167
for (IntPtr hwnd =
_hwnd
;
180
if (IsInsideOfIPAddress(
_hwnd
))
235
IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(
_hwnd
);
238
return new WindowsSpinner(hwndUpDown,
_hwnd
, _parent, _item);
246
IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(
_hwnd
);
249
return new WindowsSpinner(hwndUpDown,
_hwnd
, _parent, _item);
257
IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(
_hwnd
);
260
return new WindowsSpinner(hwndUpDown,
_hwnd
, _parent, _item);
304
Misc.CheckEnabled(
_hwnd
);
329
int result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
337
result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
645
return Misc.ProxyGetText(
_hwnd
, GetTextLength());
661
if (Misc.GetClientRect(
_hwnd
, ref rect) && !rect.IsEmpty)
784
if (Misc.GetClientRect(
_hwnd
, ref rect) && !rect.IsEmpty)
916
IntPtr hdc = Misc.GetDC(
_hwnd
);
936
Misc.ReleaseDC(
_hwnd
, hdc);
949
return Text(
_hwnd
);
954
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
964
if (WindowsComboBox.GetComboInfo(hwndParent, ref cbInfo) && cbInfo.hwndItem ==
_hwnd
)
974
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
985
return WindowsSpinner.IsSpinnerEdit(
_hwnd
);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (8)
93
Misc.SetFocus(_provider.
_hwnd
);
326
Misc.SetFocus(_provider.
_hwnd
);
380
Misc.SetFocus(_provider.
_hwnd
);
444
Misc.SetFocus(_provider.
_hwnd
);
463
Misc.SetFocus(_provider.
_hwnd
);
480
Misc.SetFocus(_provider.
_hwnd
);
503
Misc.SetFocus(_provider.
_hwnd
);
509
if (Misc.IsReadingRTL(_provider.
_hwnd
))
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (4)
116
Misc.SetFocus(
_hwnd
);
133
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
138
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
143
Misc.SetFocus(
_hwnd
);
MS\Internal\AutomationProxies\WindowsGrip.cs (4)
62
if (IsGripPresent(
_hwnd
, false))
65
if (Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref client))
67
NativeMethods.SIZE sizeGrip = GetGripSize(
_hwnd
, false);
69
if (Misc.IsLayoutRTL(
_hwnd
))
MS\Internal\AutomationProxies\WindowsHyperlink.cs (12)
126
return Misc.StripMnemonic(RemoveHTMLAnchorTag(Misc.ProxyGetText(
_hwnd
)));
212
if (!Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref HitTestInfo.pt, 1))
227
bGetItemResult = XSendMessage.XSend(
_hwnd
, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
273
return new WindowsHyperlinkItem(
_hwnd
, this, index);
293
return XSendMessage.XSend(
_hwnd
, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM));
412
return XSendMessage.XSend(
_hwnd
, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType()));
440
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
445
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
454
if (!Misc.GetWindowRect(
_hwnd
, ref BoundingRect))
511
bGetItemResult = XSendMessage.XSend(
_hwnd
, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
523
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
524
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (12)
131
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
152
Misc.ProxySendMessage(
_hwnd
, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4));
167
return Misc.ProxyGetText(
_hwnd
, IP_ADDRESS_STRING_LENGTH);
175
return !Misc.IsEnabled(
_hwnd
);
257
IntPtr hwndChild = Misc.GetWindow(
_hwnd
, NativeMethods.GW_CHILD);
274
IntPtr hwndChild = Misc.GetWindow(
_hwnd
, NativeMethods.GW_CHILD);
368
return Misc.ProxyGetText(
_hwnd
);
380
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
398
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
406
string s = WindowsEditBox.Text(
_hwnd
);
419
return !SafeNativeMethods.IsWindowEnabled(
_hwnd
);
493
return WindowsIPAddress.Create(Misc.GetParent(
_hwnd
), 0, 0);
MS\Internal\AutomationProxies\WindowsListBox.cs (52)
166
else if (iid == ScrollPattern.Pattern && WindowScroll.HasScrollableStyle(
_hwnd
))
169
IScrollProvider scroll = NonClientArea.Create(
_hwnd
, 0) as IScrollProvider;
186
return IsParentedByCombo() || SafeNativeMethods.IsWindowVisible(
_hwnd
);
195
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
303
Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref listboxrect);
306
int ret = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top));
321
int index = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero);
357
if (ListboxItem.IsSelected(
_hwnd
, itemPos))
396
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0;
438
return new ListboxItem (
_hwnd
, this, index);
446
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero);
565
if (i != skipItem && ListboxItem.IsSelected(
_hwnd
, i))
577
int result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero);
588
for (i = 0, count = Length; i < count && !ListboxItem.IsSelected (
_hwnd
, i); i++)
601
if (i != skipItem && ListboxItem.IsSelected (
_hwnd
, i))
618
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR;
631
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
))
703
else if (iid == ScrollItemPattern.Pattern && WindowScroll.IsScrollable(
_hwnd
))
741
int iTextLen = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero);
745
if (Misc.GetClassName(
_hwnd
).Equals("Internet Explorer_TridentLstBox"))
752
return XSendMessage.GetItemText(
_hwnd
, NativeMethods.WM_USER + NativeMethods.LB_GETTEXT, _item, iTextLen);
756
string text = Misc.GetUnsafeText(
_hwnd
, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen);
783
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
790
bool itemSelected = IsSelected (
_hwnd
, _item);
840
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
846
if (ListboxItem.IsSelected (
_hwnd
, _item) && !_listBox.IsParentedByCombo())
892
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
897
if (!IsSelected(
_hwnd
, _item))
912
if (!UnSelect(
_hwnd
, _item))
923
return ListboxItem.IsSelected (
_hwnd
, _item);
943
if (_listBox._parentedByCombo && !SafeNativeMethods.IsWindowVisible(
_hwnd
))
948
if (!WindowScroll.IsScrollable(
_hwnd
))
954
Misc.ProxySendMessage(
_hwnd
, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero);
965
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
969
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
1028
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR;
1032
return Select (
_hwnd
, _item, false);
1053
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item;
1057
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0;
1074
Misc.ProxySendMessage(
_hwnd
, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect);
1075
return Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty;
1088
_windowsForms = WindowsFormsHelper.GetControlState(
_hwnd
);
1143
Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item));
1148
Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1158
int listBoxStyle = Misc.GetWindowStyle(
_hwnd
);
1162
int idListBox = Misc.GetWindowId(
_hwnd
);
1166
IntPtr hwndListBoxParent = Misc.GetParent(
_hwnd
);
1170
hwndListBoxParent, NativeMethods.WM_COMMAND, wParam,
_hwnd
);
1178
Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1182
int id = Misc.GetWindowId(
_hwnd
);
1186
Misc.ProxySendMessageInt(combo.
_hwnd
, NativeMethods.WM_COMMAND, wParam,
_hwnd
);
MS\Internal\AutomationProxies\WindowsListView.cs (82)
97
WinEventTracker.AddToNotificationList (
_hwnd
, new WinEventTracker.ProxyRaiseEvents (WindowsListView.GroupSpecificEvents), _groupEvents, 3);
184
(IsDetailMode (
_hwnd
) ||
185
IsImplementingGrid (
_hwnd
) && GetItemCount (
_hwnd
) > 0))
196
if (iid == TablePattern.Pattern && IsDetailMode (
_hwnd
))
210
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
217
count = GetItemCount (
_hwnd
);
244
_groupsCollection.EnsureCreation (
_hwnd
);
246
GroupManager manager = _groupsCollection[
_hwnd
];
278
if (IsGroupViewEnabled (
_hwnd
))
281
_groupsCollection.EnsureCreation (
_hwnd
);
284
GroupManager manager = _groupsCollection [
_hwnd
];
323
int count = GetItemCount (
_hwnd
);
341
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
342
int itemCount = GetItemCount(
_hwnd
);
354
_groupsCollection.EnsureCreation(
_hwnd
);
356
GroupManager manager = _groupsCollection[
_hwnd
];
376
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
383
_groupsCollection.EnsureCreation (
_hwnd
);
385
GroupManager manager = _groupsCollection [
_hwnd
];
400
int count = GetItemCount (
_hwnd
);
410
if (PtInListViewHeader (x, y) || !PtInClientRect (
_hwnd
, x, y))
416
if (IsGroupViewEnabled (
_hwnd
))
418
_groupsCollection.EnsureCreation (
_hwnd
);
421
GroupManager manager = WindowsListView._groupsCollection [
_hwnd
];
430
ProxyFragment group = new WindowsListViewGroup (
_hwnd
, this, groupID);
436
NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest(
_hwnd
, new NativeMethods.Win32Point(x, y));
443
else if (hitTest.flags == NativeMethods.LVHT_NOWHERE && IsDetailMode(
_hwnd
))
461
hitTest = WindowsListView.SubitemHitTest(
_hwnd
, new NativeMethods.Win32Point(x, y));
478
if (IsGroupViewEnabled (
_hwnd
))
480
_groupsCollection.EnsureCreation (
_hwnd
);
481
return WindowsListViewGroup.GetFocusInGroup (
_hwnd
, this);
485
int index = GetItemNext(
_hwnd
, -1, NativeMethods.LVNI_FOCUSED);
508
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
522
WinEventTracker.AddToNotificationList(
_hwnd
, _createOnEvent, aEvents, 1);
537
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
551
WinEventTracker.AddToNotificationList(
_hwnd
, _createOnEvent, aEvents, 1);
564
int count = GetItemCount (
_hwnd
);
565
int countSelection = MultiSelected(
_hwnd
) ? GetSelectedItemCount(
_hwnd
) : 1;
576
for (int itemPos = GetItemNext(
_hwnd
, -1, NativeMethods.LVNI_SELECTED); itemPos != -1; itemPos = GetItemNext(
_hwnd
, itemPos, NativeMethods.LVNI_SELECTED))
596
return MultiSelected (
_hwnd
);
617
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
622
WindowScroll.Scroll (
_hwnd
, horizontalAmount, verticalAmount, true);
628
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
634
int size = ApproximateViewRect (
_hwnd
);
653
fScrollSuccess = Scroll(
_hwnd
, (IntPtr)dx, (IntPtr)dy);
660
if (fScrollSuccess && (((int)horizontalPercent != (int)ScrollPattern.NoScroll && (int)horizontalPercent != (int)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalScrollPercentProperty,
_hwnd
))
661
|| ((int)verticalPercent != (int)ScrollPattern.NoScroll && (int)verticalPercent != (int)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalScrollPercentProperty,
_hwnd
))))
669
Scroll(
_hwnd
, (IntPtr)dx, (IntPtr)dy);
689
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalScrollPercentProperty,
_hwnd
);
699
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalScrollPercentProperty,
_hwnd
);
709
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalViewSizeProperty,
_hwnd
);
719
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalViewSizeProperty,
_hwnd
);
729
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.HorizontallyScrollableProperty,
_hwnd
);
738
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.VerticallyScrollableProperty,
_hwnd
);
750
int maxRow = GetRowCount (
_hwnd
);
751
int maxColumn = GetColumnCount (
_hwnd
);
764
if (IsDetailMode (
_hwnd
))
776
return GetRowCount (
_hwnd
);
784
return GetColumnCount (
_hwnd
);
802
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
868
return new int [] { ListViewGetView (
_hwnd
) };
875
return ListViewGetView (
_hwnd
);
1555
return CheckBoxes (
_hwnd
) ? new int [] { NativeMethods.EventObjectNameChange, NativeMethods.EventObjectStateChange } : new int [] { NativeMethods.EventObjectNameChange };
1583
return new WindowsListViewGroup (
_hwnd
, this, groupID);
1592
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
1594
if ((!hasGroup) && GetItemCount(
_hwnd
) > 0)
1602
_groupsCollection.EnsureCreation(
_hwnd
);
1604
GroupManager manager = _groupsCollection[
_hwnd
];
1620
return CreateListViewItemOrStartMenuItem(new WindowsListViewGroup(
_hwnd
, this, groupId), item);
1625
return new WindowsListViewGroup (
_hwnd
, this, item);
1639
ProxyFragment proxyFragment = new ListViewItemStartMenu(
_hwnd
, parent, item, AccessibleObject);
1648
return new ListViewItem(
_hwnd
, parent, item);
1655
string className = Misc.GetClassName(Misc.GetParent(
_hwnd
));
1679
if (!Misc.GetScrollBarInfo(
_hwnd
, scrollBar, ref scrollBarInfo) ||
1695
if (!Misc.GetScrollInfo(
_hwnd
, sbFlag, ref si) ||
1719
return new ListViewSubItem (
_hwnd
, lvItem, column, row);
1726
int itemCount = GetItemCount (
_hwnd
);
1729
if (IsListMode (
_hwnd
))
1842
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (29)
67
else if (iid == ExpandCollapsePattern.Pattern && WindowsListView.IsGroupViewEnabled(
_hwnd
))
80
GroupManager manager = WindowsListView._groupsCollection [
_hwnd
];
111
return XSendMessage.GetItemText(
_hwnd
, group, NativeMethods.LVGF_HEADER);
122
return XSendMessage.GetItemText(
_hwnd
, group);
136
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
168
XSendMessage.GetGroupInfo(
_hwnd
, ref group); // ignore return code.
189
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
226
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
243
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
256
XSendMessage.GetGroupInfo(
_hwnd
, ref group); // ignore return code.
295
NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest (
_hwnd
, pt);
305
return new ListViewItem (
_hwnd
, this, hitTest.iItem);
316
XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType()));
321
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
338
int groupIndex = (int)Misc.ProxySendMessage(
_hwnd
, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
347
bool lresult = XSendMessage.XSend(
_hwnd
, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
371
int maxRow = GetRowCount (
_hwnd
, ID);
372
int maxColumn = GetColumnCount(
_hwnd
, ID);
384
if (WindowsListView.IsDetailMode (
_hwnd
))
396
return GetRowCount (
_hwnd
, ID);
404
return GetColumnCount (
_hwnd
, ID);
414
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
427
return IsCollapsed(
_hwnd
, _groupID);
600
return new ListViewItem (
_hwnd
, this, index);
622
if (!XSendMessage.SetGroupInfo(
_hwnd
, group))
633
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
640
return new ListViewSubItem (
_hwnd
, lvItem, column, lvitemIndex);
652
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
836
return new ListViewGroupSubsetLink(
_hwnd
, this, item, _groupID);
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (4)
79
XSendMessage.XSend(
_hwnd
, NativeMethods.LVM_GETGROUPRECT, new IntPtr(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
80
Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref rect, 2);
96
XSendMessage.GetGroupInfo(
_hwnd
, ref groupInfo); // ignore return code.
112
return XSendMessage.GetItemText(
_hwnd
, group, NativeMethods.LVGF_SUBSET);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (83)
72
if (iid == InvokePattern.Pattern && WindowsListView.ListViewInvokable(
_hwnd
))
82
if (iid == ValuePattern.Pattern && WindowsListView.ListViewEditable (
_hwnd
))
87
if (iid == GridItemPattern.Pattern && IsImplementingGrid (
_hwnd
))
92
if (iid == TogglePattern.Pattern && IsItemWithCheckbox(
_hwnd
, _item))
97
if (iid == ScrollItemPattern.Pattern && WindowScroll.IsScrollable(
_hwnd
))
124
WindowsListView._groupsCollection.EnsureCreation (
_hwnd
);
126
GroupManager manager = WindowsListView._groupsCollection[
_hwnd
];
144
if (XSendMessage.XSend(
_hwnd
, NativeMethods.LVM_GETITEMINDEXRECT, new IntPtr(&ii), new IntPtr(&itemRectangle), Marshal.SizeOf(ii.GetType()), Marshal.SizeOf(itemRectangle.GetType())))
146
if (Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRectangle, 2))
158
if (WindowsListView.GetItemRect(
_hwnd
, _item, NativeMethods.LVIR_BOUNDS, out itemRectangle))
201
string text = GetText(
_hwnd
, _item, 0);
224
return WindowsListView.SetItemFocused (
_hwnd
, _item);
244
&& IsItemWithCheckbox(
_hwnd
, _item))
268
if (WindowsListView.IsDetailMode (
_hwnd
))
271
int countCol = GetSubItemCount (
_hwnd
);
288
if (IsItemWithCheckbox(
_hwnd
, _item) && item == 0)
292
else if (WindowsListView.IsDetailMode (
_hwnd
))
294
int countCol = GetSubItemCount (
_hwnd
);
307
if (IsItemWithCheckbox(
_hwnd
, _item))
311
else if (WindowsListView.IsDetailMode(
_hwnd
))
313
int countCol = GetSubItemCount (
_hwnd
);
326
if (WindowsListView.IsDetailMode (
_hwnd
))
328
int countCol = GetSubItemCount (
_hwnd
);
336
if (IsItemWithCheckbox(
_hwnd
, _item))
348
if (IsItemWithCheckbox (
_hwnd
, _item))
350
NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (
_hwnd
, _item);
354
return new ListViewItemCheckbox (
_hwnd
, this, _item, _checkbox);
358
if (WindowsListView.IsDetailMode (
_hwnd
))
361
return ListViewSubItem.ElementProviderFromPoint (
_hwnd
, this, _item, x, y);
373
int columns = ListViewItem.GetSubItemCount (
_hwnd
);
376
int column = (int)Misc.ProxySendMessage(
_hwnd
, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
395
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
401
if (!WindowsListView.MultiSelected (
_hwnd
) && WindowsListView.IsItemSelected (
_hwnd
, _item))
407
WindowsListView.UnselectAll (
_hwnd
);
410
if (!WindowsListView.SelectItem(
_hwnd
, _item))
420
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
426
if (WindowsListView.IsItemSelected (
_hwnd
, _item))
432
if (!WindowsListView.MultiSelected(
_hwnd
))
439
if (selectionRequired || WindowsListView.GetSelectedItemCount(
_hwnd
) > 0)
448
if (!WindowsListView.SelectItem(
_hwnd
, _item))
458
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
464
if (!WindowsListView.IsItemSelected (
_hwnd
, _item))
470
if (!WindowsListView.MultiSelected (
_hwnd
))
484
if (!WindowsListView.UnSelectItem(
_hwnd
, _item))
495
return WindowsListView.IsItemSelected (
_hwnd
, _item);
527
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
532
if (WindowsListView.Scrollable (
_hwnd
))
535
WindowsListView.EnsureVisible (
_hwnd
, _item, true);
556
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
561
SetValue(val,
_hwnd
, _item);
569
return ListViewItem.GetText (
_hwnd
, _item, 0);
578
return !WindowsListView.ListViewEditable (
_hwnd
);
591
if (WindowsListView.IsGroupViewEnabled (
_hwnd
))
597
if (WindowsListView.IsListMode (
_hwnd
))
599
int itemCount = WindowsListView.GetItemCount (
_hwnd
);
600
int rowCount = WindowsListView.GetRowCountListMode (
_hwnd
, itemCount);
606
int columnCount = WindowsListView.GetColumnCountOtherModes (
_hwnd
);
616
if (WindowsListView.IsGroupViewEnabled (
_hwnd
))
622
if (WindowsListView.IsListMode (
_hwnd
))
624
int itemCount = WindowsListView.GetItemCount (
_hwnd
);
625
int rowCount = WindowsListView.GetRowCountListMode (
_hwnd
, itemCount);
630
int columnCount = WindowsListView.GetColumnCountOtherModes (
_hwnd
);
668
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
674
if (!WindowsListView.Scrollable(
_hwnd
))
680
WindowsListView.EnsureVisible(
_hwnd
, _item, false);
856
return WindowsListView.IsItemFocused (
_hwnd
, _item);
864
IntPtr hwndHeader = WindowsListView.ListViewGetHeader(
_hwnd
);
870
&& Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref listViewRect))
901
return new ListViewSubItem (
_hwnd
, this, index, _item);
906
return new ListViewItemCheckbox (
_hwnd
, this, _item, _checkbox);
933
if (!WindowsListView.GetItemRect(
_hwnd
, _item, NativeMethods.LVIR_LABEL, out itemRectangle))
938
if (WindowsListView.IsDetailMode (
_hwnd
) && !WindowsListView.FullRowSelect (
_hwnd
))
944
if (!Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
954
if (!WindowsListView.GetItemRect(
_hwnd
, _item, NativeMethods.LVIR_LABEL, out itemRectangle))
968
Misc.MouseClick(clickPoint.x, clickPoint.y, !WindowsListView.ListViewSingleClickActivate(
_hwnd
));
996
int groupID = GetGroupID (
_hwnd
, _item);
1001
GroupManager.GroupInfo groupInfo = WindowsListViewGroup.GetGroupInfo (
_hwnd
, groupID);
1010
int columnCount = WindowsListViewGroup.GetColumnCountExternal (
_hwnd
, groupID);
1029
int groupID = GetGroupID (
_hwnd
, _item);
1034
GroupManager.GroupInfo groupInfo = WindowsListViewGroup.GetGroupInfo (
_hwnd
, groupID);
1043
int columnCount = WindowsListViewGroup.GetColumnCountExternal (
_hwnd
, groupID);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (12)
71
return ListViewCheckBoxRect(
_hwnd
, _listviewItem).ToRect(false);
81
NativeMethods.Win32Rect itemRect = ListViewCheckBoxRect(
_hwnd
, _listviewItem);
87
if (Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect))
108
return WindowsListView.GetItemToolTipText(
_hwnd
);
117
string name = ListViewItem.GetText(
_hwnd
, _listviewItem, 0);
220
ListViewItem.CheckState current = (ListViewItem.CheckState) WindowsListView.GetCheckedState (
_hwnd
, _listviewItem);
247
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
252
Misc.SetFocus(
_hwnd
);
254
NativeMethods.Win32Rect rc = ListViewCheckBoxRect(
_hwnd
, _listviewItem);
257
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
260
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
261
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (9)
59
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
))
68
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
87
bool isVerticalScroll = IsScrollBarVertical(
_hwnd
, _sbFlag);
88
if (isVerticalScroll && WindowsListView.InReportView (
_hwnd
))
90
Misc.SetScrollPos(
_hwnd
, _sbFlag, pos, true);
95
int size = WindowsListView.ApproximateViewRect (
_hwnd
);
114
if (WindowsListView.Scroll (
_hwnd
, (IntPtr) dx, (IntPtr) dy))
119
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
139
WindowsListView.Scroll (
_hwnd
, (IntPtr) dx, (IntPtr) dy);
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (26)
64
if (iid == ValuePattern.Pattern && _item == 0 && WindowsListView.ListViewEditable (
_hwnd
))
88
if (!WindowsListView.GetSubItemRect (
_hwnd
, _itemParent, _item, lvir, out itemRectangle))
96
if (WindowsListView.FullRowSelect(
_hwnd
) && !WindowsListView.HasJustifyColumnsExStyle(
_hwnd
) &&
97
!WindowsListView.IsIconView(
_hwnd
) && _item == 0 && 1 < ListViewItem.GetSubItemCount(
_hwnd
))
101
if (!WindowsListView.GetSubItemRect(
_hwnd
, _itemParent, 1, NativeMethods.LVIR_BOUNDS, out itemRectangle1))
107
if (Misc.IsControlRTL(
_hwnd
))
117
if (ListViewItem.IsItemWithCheckbox (
_hwnd
, _itemParent))
119
NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (
_hwnd
, _itemParent);
122
if (Misc.IsControlRTL(
_hwnd
))
176
IntPtr ancestor =
_hwnd
;
198
return WindowsListView.GetItemToolTipText(
_hwnd
);
207
string name = ListViewItem.GetText(
_hwnd
, _itemParent, _item);
216
return WindowsListView.SetItemFocused (
_hwnd
, this._itemParent);
226
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
231
ListViewItem.SetValue (val,
_hwnd
, _itemParent);
239
return ListViewItem.GetText (
_hwnd
, _itemParent, _item);
247
return !WindowsListView.ListViewEditable (
_hwnd
);
260
if (!WindowsListView.IsGroupViewEnabled (
_hwnd
))
268
int groupID = ListViewItem.GetGroupID (
_hwnd
, _itemParent);
272
GroupManager.GroupInfo groupInfo = WindowsListViewGroup.GetGroupInfo (
_hwnd
, groupID);
335
IntPtr hwndHeader = WindowsListView.ListViewGetHeader (
_hwnd
);
381
if (Misc.IsComctrlV6OnOsVerV6orHigher(
_hwnd
))
383
int column = (int)Misc.ProxySendMessage(
_hwnd
, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
387
return WindowsListView.IsItemFocused (
_hwnd
, _itemParent);
MS\Internal\AutomationProxies\WindowsMenu.cs (31)
100
_expandedMenus[hwnd] = new MenuParentInfo(_parent.
_hwnd
, _parent._item, ((MenuItem)_parent)._menuType);
114
_expandedMenus[hwnd] = new MenuParentInfo(_parent.
_hwnd
, _parent._item, ((MenuItem)_parent)._menuType);
154
if (_type == MenuType.Submenu && GetHierarchyParent(
_hwnd
) == null && GetSystemPopupParent() != null)
355
return new int[] { 1, unchecked((int)(long)
_hwnd
), unchecked((int)(long)_hmenu) };
514
return new MenuItem(
_hwnd
, this, index, _hmenu, _type);
817
if (!GetMenuBarInfo(
_hwnd
, NativeMethods.OBJID_SYSMENU, 0, out mbi))
829
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(
_hwnd
)))
834
if (!Misc.ProxyGetTitleBarInfo(
_hwnd
, out ti))
847
if (GetMenuBarInfo(
_hwnd
, NativeMethods.OBJID_MENU, 0, out mbi))
1232
if (!SafeNativeMethods.IsWindowVisible (
_hwnd
) || _type == MenuItemType.Spacer)
1266
if (GetMenuBarInfo(
_hwnd
, NativeMethods.OBJID_SYSMENU, 0, out mbi))
1275
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(
_hwnd
)))
1280
if (!Misc.ProxyGetTitleBarInfo(
_hwnd
, out ti))
1295
if (Misc.GetMenuItemRect(
_hwnd
, _hmenu, _item, out rc))
1404
if (!Misc.IsEnabled(
_hwnd
))
1446
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
) || _type == MenuItemType.Spacer)
1465
if (hwndFocus != IntPtr.Zero && hwndFocus !=
_hwnd
)
2040
if (!SafeNativeMethods.IsWindowVisible (
_hwnd
))
2085
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
2109
hwndSubMenu !=
_hwnd
;
2139
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' '));
2247
if (!SafeNativeMethods.IsWindowVisible (
_hwnd
))
2261
if (Misc.ProxyGetGUIThreadInfo(0, out gui) &&
_hwnd
== gui.hwndActive)
2277
return Misc.SetFocus(
_hwnd
);
2599
if (
_hwnd
== IntPtr.Zero)
2605
using (SafeProcessHandle hProcess = new SafeProcessHandle(
_hwnd
))
2664
return SafeNativeMethods.IsWindowEnabled(
_hwnd
);
2682
return new MenuItem(
_hwnd
, _parent, _item - 1, _hmenu, _menuType);
2697
return new MenuItem(
_hwnd
, _parent, nextItem, _hmenu, _menuType);
2733
if (new MenuItem (
_hwnd
, this._parent, i, _hmenu, _menuType).HotKey == chHotKey)
2948
return
_hwnd
;
MS\Internal\AutomationProxies\WindowsProgressbar.cs (3)
171
int cur = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
172
int min = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero);
173
int max = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (10)
142
if (!Misc.GetWindowRect(
_hwnd
, ref rebarRect))
205
return new RebarBandItem (
_hwnd
, this, index);
212
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero);
223
return XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType()));
296
return GetBoundingRectangle (
_hwnd
, _item);
305
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
306
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _item);
391
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
396
Misc.PostMessage(
_hwnd
, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero);
450
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)
179
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
190
if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
))
205
int result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
212
result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
607
return Misc.ProxyGetText(
_hwnd
);
723
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (6)
76
Misc.SetFocus(_pattern.
_hwnd
);
277
Misc.SetFocus(_pattern.
_hwnd
);
295
Misc.SetFocus(_pattern.
_hwnd
);
327
Misc.SetFocus(_pattern.
_hwnd
);
349
Misc.SetFocus(_pattern.
_hwnd
);
373
Misc.SetFocus(_pattern.
_hwnd
);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (28)
136
return (iid == RangeValuePattern.Pattern && WindowScroll.Scrollable (
_hwnd
, _sbFlag) && HasValuePattern (
_hwnd
, _sbFlag)) ? this : null;
157
if (!Misc.GetScrollBarInfo(
_hwnd
, idObject, ref sbi))
177
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_parent.
_hwnd
)))
208
return SafeNativeMethods.IsWindowVisible(
_hwnd
);
217
if (SafeNativeMethods.IsWindowVisible(
_hwnd
) &&
232
return IsEnabled() && Misc.IsEnabled(
_hwnd
);
236
return IsScrollBarVertical(
_hwnd
, _sbFlag) ? OrientationType.Vertical : OrientationType.Horizontal;
281
IsScrollBarVertical(
_hwnd
, _sbFlag)
301
if (item == ScrollBarItem.UpArrow && !IsScrollBarWithThumb (
_hwnd
, _sbFlag))
321
if (item == ScrollBarItem.DownArrow && !IsScrollBarWithThumb (
_hwnd
, _sbFlag))
348
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(WindowsScrollBarBits.GetBoundingRectangle(
_hwnd
, this, item, _sbFlag));
352
return new WindowsScrollBarBits (
_hwnd
, this, (int) item, _sbFlag);
382
return !Misc.IsEnabled(
_hwnd
) || !HasValuePattern(
_hwnd
, _sbFlag);
540
if (_sbFlag != NativeMethods.SB_CTL || Misc.GetScrollBarInfo(
_hwnd
, NativeMethods.OBJID_CLIENT, ref sbi))
542
return new WindowsScrollBarBits (
_hwnd
, this, (int) index, _sbFlag);
574
string classname = Misc.GetClassName(
_hwnd
);
591
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
602
if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent.
_hwnd
)))
633
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
))
642
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
680
string classname = Misc.GetClassName(
_hwnd
);
703
Misc.SetScrollPos(
_hwnd
, _sbFlag, val, true);
709
IsScrollBarVertical(
_hwnd
, _sbFlag) ? NativeMethods.WM_VSCROLL : NativeMethods.WM_HSCROLL;
714
Misc.ProxySendMessage(
_hwnd
, msg, (IntPtr)wParam, IntPtr.Zero);
716
Misc.ProxySendMessage(
_hwnd
, msg, (IntPtr)wParam, IntPtr.Zero);
753
if (!Misc.GetScrollBarInfo(
_hwnd
, idObject, ref sbi))
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (10)
121
return SafeNativeMethods.IsWindowVisible(
_hwnd
);
136
return GetBoundingRectangle (
_hwnd
, _parent, (WindowsScrollBar.ScrollBarItem) _item, _sbFlag);
157
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
187
if (WindowsScrollBar.IsScrollBarVertical(
_hwnd
, _sbFlag))
245
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(parent._parent.
_hwnd
)))
526
IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(
_hwnd
) :
_hwnd
;
552
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
573
Misc.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd ==
_hwnd
? IntPtr.Zero :
_hwnd
));
MS\Internal\AutomationProxies\WindowsSlider.cs (16)
154
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SliderItem.GetBoundingRectangle (
_hwnd
, item, _fHorizontal));
173
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
184
IntPtr parent = Misc.GetParent(
_hwnd
);
262
return new SliderItem (
_hwnd
, this, (int) item, _fHorizontal);
277
int value = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
282
int maxValue = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
300
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val));
307
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero);
315
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero);
323
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
331
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero);
416
return GetBoundingRectangle (
_hwnd
, (WindowsSlider.SItem) _item, _fHorizontal);
425
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
426
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, 0);
447
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
456
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsStatic.cs (2)
145
return Misc.AccessKey(Misc.ProxyGetText(
_hwnd
));
164
return Misc.StripMnemonic(Misc.ProxyGetText(
_hwnd
));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (17)
120
if (hwndChild == IntPtr.Zero || hwndChild ==
_hwnd
)
122
hwndChild = GetChildHwnd(
_hwnd
, accChild.Location);
125
if(hwndChild != IntPtr.Zero && hwndChild !=
_hwnd
)
132
return new WindowsStatusBarPane(
_hwnd
, this, index, accChild);
156
return Misc.ProxyGetText(
_hwnd
);
185
return item + 1 < count ? CreateStatusBarPane(item + 1) : (_fHasGrip ? StatusBarGrip.Create(
_hwnd
, this, -1) : null);
216
return Count > 0 ? CreateStatusBarPane(0) : (_fHasGrip ? StatusBarGrip.Create(
_hwnd
, this, GripItemID) : null);
225
return StatusBarGrip.Create(
_hwnd
, this, GripItemID);
238
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (WindowsStatusBarPane.GetBoundingRectangle (
_hwnd
, item));
249
NativeMethods.Win32Rect rc = StatusBarGrip.GetBoundingRectangle (
_hwnd
);
252
ProxySimple grip = StatusBarGrip.Create(
_hwnd
, this, -1);
322
hwndChild = GetChildHwnd(
_hwnd
, accChild.Location);
351
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero);
473
return GetBoundingRectangle (
_hwnd
, _item);
610
int retValue = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
615
return XSendMessage.GetItemText(
_hwnd
, NativeMethods.SB_GETTEXTW, _item, len);
788
return GetBoundingRectangle(
_hwnd
).ToRect(false);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (30)
173
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref HitTestInfo.pt, 1))
177
index = XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
193
int item = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
260
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (
_hwnd
, NativeMethods.GA_PARENT);
329
if (!XSendMessage.GetItem(
_hwnd
, index, ref item))
341
return new HeaderItem (
_hwnd
, this, index);
349
return HeaderItemCount (
_hwnd
);
445
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
479
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
500
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
501
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
542
if (Misc.IsComctrlV6OnOsVerV6orHigher(
_hwnd
))
544
int item = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
564
int index = OrderToIndex (
_hwnd
, _item);
573
return XSendMessage.GetItemText(
_hwnd
, index, hdi);
581
int index = OrderToIndex (
_hwnd
, _item);
587
result = XSendMessage.XSend(
_hwnd
, NativeMethods.HDM_GETITEMRECT, new IntPtr(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero);
592
if (!Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref rectW32, 2))
605
if (Misc.IsLayoutRTL(
_hwnd
))
656
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
) || !SafeNativeMethods.IsWindowVisible (
_hwnd
) || HeaderIsHidden (
_hwnd
))
687
return Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1);
698
if (XSendMessage.GetItem(
_hwnd
, _item, ref item))
712
int item = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
727
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
739
Rect rect = XSendMessage.GetItemRect(
_hwnd
, NativeMethods.HDM_GETITEMDROPDOWNRECT, _item);
746
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
747
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
756
if (Misc.GetFocusedWindow().Equals(
_hwnd
))
MS\Internal\AutomationProxies\WindowsTab.cs (53)
48
_fIsContent = IsValidControl(
_hwnd
);
150
return IsValidControl(
_hwnd
);
186
int count = GetItemCount(
_hwnd
);
209
int count = GetItemCount(
_hwnd
);
232
int count = GetItemCount(
_hwnd
);
245
int count = GetItemCount(
_hwnd
);
262
if (!Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref hti.pt, 1))
279
index = XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType()));
293
int focusIndex = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero);
295
if (focusIndex >= 0 && focusIndex < GetItemCount(
_hwnd
))
370
for (int i = 0, c = GetItemCount(
_hwnd
); i < c; i++)
372
if (sTitle == WindowsTabItem.GetName(
_hwnd
, i, true))
391
if (!WindowsTab.SupportMultipleSelection (
_hwnd
))
393
int selectedItem = WindowsTabItem.GetCurrentSelectedItem(
_hwnd
);
435
return SupportMultipleSelection (
_hwnd
);
455
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
479
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
520
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
579
if (!Misc.GetWindowRect(
_hwnd
, ref viewable))
677
return new WindowsTabItem(
_hwnd
, this, index, _windowsForms == WindowsFormsHelper.FormControlState.True);
698
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
703
return GetUpDownHwnd(
_hwnd
) != IntPtr.Zero;
752
return GetUpDownHwnd(
_hwnd
);
855
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
914
_fIsContent = !string.IsNullOrEmpty(GetName(
_hwnd
, _item, true));
957
return Misc.AccessKey(WindowsTabItem.GetItemText(
_hwnd
, _item));
961
return !string.IsNullOrEmpty(GetName(
_hwnd
, _item, true));
972
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
973
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _item);
983
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
992
return GetName(
_hwnd
, _item, _windowsForms == WindowsFormsHelper.FormControlState.True);
1009
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
1064
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1084
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1102
if (WindowsTab.SupportMultipleSelection(
_hwnd
) == true)
1127
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1139
if (WindowsTab.SupportMultipleSelection(
_hwnd
) == true)
1155
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero);
1168
if (!WindowsTab.SupportMultipleSelection(
_hwnd
))
1170
int selectedItem = GetCurrentSelectedItem(
_hwnd
);
1181
if (!XSendMessage.GetItem(
_hwnd
, _item, ref TCItem))
1209
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1261
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item;
1278
if (!XSendMessage.XSend(
_hwnd
, NativeMethods.TCM_GETITEMRECT, new IntPtr(_item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero))
1283
return Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty;
1288
return (SafeNativeMethods.IsWindowEnabled(
_hwnd
) && SafeNativeMethods.IsWindowVisible(
_hwnd
));
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);
1322
IntPtr hwndParent =
_hwnd
;
1331
string sName = WindowsTabItem.GetName(
_hwnd
, _item, true);
MS\Internal\AutomationProxies\WindowsTitleBar.cs (12)
70
return Misc.GetTitleBarRect(
_hwnd
);
78
return new int [] { 4, unchecked((int)(long)
_hwnd
), _item };
86
return Misc.ProxyGetText(
_hwnd
);
124
int hit = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y));
145
WindowsMenu sysmenu = WindowsMenu.CreateSystemMenu(
_hwnd
, this);
173
return WindowsMenu.CreateSystemMenu (
_hwnd
, this);
179
return new TitleBarButton (
_hwnd
, this, item);
211
Misc.ProxyGetTitleBarInfo(
_hwnd
, out ti);
371
Rect[] rects = Misc.GetTitlebarRects(
_hwnd
);
415
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
444
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero);
458
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (30)
224
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (ToolbarItem.GetBoundingRectangle (
_hwnd
, item));
242
int focusIndex = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero);
246
Accessible acc = Accessible.CreateNativeFromEvent(
_hwnd
, NativeMethods.OBJID_CLIENT, NativeMethods.CHILD_SELF);
252
return new WindowsToolbarAsMenu(
_hwnd
, this, focusIndex, acc);
256
return new WindowsToolbar(
_hwnd
, this, focusIndex);
271
string name = Misc.ProxyGetText(
_hwnd
);
307
if (!XSendMessage.GetItem(
_hwnd
, item, ref tbb))
313
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0)
315
Accessible acc = Accessible.CreateNativeFromEvent(
_hwnd
, NativeMethods.OBJID_CLIENT, item + 1);
320
return new ToolbarItemAsMenuItem(
_hwnd
, this, item, tbb.idCommand, acc);
324
return new ToolbarItem(
_hwnd
, this, item, tbb.idCommand);
343
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero);
377
if (XSendMessage.GetItem(
_hwnd
, _item, ref tbb))
383
bool hasImageList = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0;
384
int exStyle = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero);
395
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
443
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
466
return GetBoundingRectangle(
_hwnd
, _item);
483
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0;
529
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero);
591
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item;
613
int len = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero);
616
return XSendMessage.GetItemText(
_hwnd
, NativeMethods.TB_GETBUTTONTEXT, _idCommand, len);
639
if (XSendMessage.GetItem(
_hwnd
, _item, ref tbb))
650
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
651
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _idCommand);
657
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
)
658
|| Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
665
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
692
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
80
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
86
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (2)
201
string className = Misc.ProxyGetClassName(
_hwnd
);
214
return Misc.ProxyGetText(
_hwnd
);
MS\Internal\AutomationProxies\WindowsTreeView.cs (79)
171
IntPtr hNext = GetNextItem (
_hwnd
, ((TreeViewItem) child)._hItem);
174
return new TreeViewItem (
_hwnd
, this, hNext, (int) TVItem.TopLevel);
198
IntPtr hPrev = GetPreviousItem (
_hwnd
, ((TreeViewItem) child)._hItem);
200
return hPrev != IntPtr.Zero ? new TreeViewItem (
_hwnd
, this, hPrev, (int) TVItem.TopLevel) : null;
204
IntPtr hChild = GetRoot (
_hwnd
);
211
for (temp = GetNextItem (
_hwnd
, hChild); temp != IntPtr.Zero; temp = GetNextItem (
_hwnd
, hChild))
216
return new TreeViewItem (
_hwnd
, this, hChild, (int) TVItem.TopLevel);
227
hChild = GetRoot (
_hwnd
);
248
IntPtr hChild = GetRoot (
_hwnd
);
253
for (IntPtr temp = GetNextItem (
_hwnd
, hChild); temp != IntPtr.Zero; temp = GetNextItem (
_hwnd
, hChild))
267
IntPtr hItem = XSendMessage.HitTestTreeView(
_hwnd
, x, y);
278
IntPtr treeItem = GetSelection (
_hwnd
);
295
IntPtr treeItem = GetSelection(
_hwnd
);
318
return (IntPtr.Zero != GetSelection (
_hwnd
));
391
return new TreeViewItem (
_hwnd
, this, hItem, depth);
396
return CreateParents (
_hwnd
, hItem);
761
return IsItemExpanded (
_hwnd
, _hItem) ? NextSibling (child) : null;
770
return IsItemExpanded (
_hwnd
, _hItem) ? PreviousSibling (child) : null;
777
return IsItemExpanded (
_hwnd
, _hItem) ? FirstChild () : null;
784
return IsItemExpanded (
_hwnd
, _hItem) ? LastChild () : null;
805
else if (iid == ScrollItemPattern.Pattern && WindowScroll.IsScrollable(
_hwnd
))
828
if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 && Misc.IsWindowInGivenProcess(
_hwnd
, "explorer"))
831
_nativeAcc = Accessible.CreateNativeFromEvent(
_hwnd
, NativeMethods.OBJID_CLIENT, childId);
851
return WindowsTreeView.GetItemRect(
_hwnd
, _hItem, true).ToRect(false);
860
NativeMethods.Win32Rect itemRect = GetItemRect(
_hwnd
, _hItem, true);
863
if (!Misc.IsItemVisible(
_hwnd
, ref itemRect))
879
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
880
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _item);
941
return WindowsTreeView.SelectItem (
_hwnd
, _hItem);
957
return new int [4] { ProxySimple.Win32ProviderRuntimeIdBase, unchecked((int)(long)
_hwnd
), highPart, lowPart };
961
return new int[3] { ProxySimple.Win32ProviderRuntimeIdBase, (int)
_hwnd
, (int)_hItem };
973
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
993
if (!WindowsTreeView.SelectItem(
_hwnd
, _hItem))
1004
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1022
if (selectionRequired || WindowsTreeView.GetSelection(
_hwnd
) != IntPtr.Zero)
1029
if (!WindowsTreeView.SelectItem(
_hwnd
, _hItem))
1039
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1089
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1109
WindowsTreeView.Expand (
_hwnd
, _hItem);
1118
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1134
WindowsTreeView.Collapse (
_hwnd
, _hItem);
1160
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1167
if (!WindowsTreeView.SetItemText(
_hwnd
, _hItem, val))
1200
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1213
WindowsTreeView.SetCheckState(
_hwnd
, _hItem, GetToggleState() != ToggleState.On);
1235
if (!WindowScroll.IsScrollable(
_hwnd
))
1240
Misc.SetFocus(
_hwnd
);
1244
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem);
1297
int selected = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED));
1320
if (!WindowsTreeView.IsItemExpanded (
_hwnd
, current._hItem))
1332
IntPtr hNext = WindowsTreeView.GetNextItem (
_hwnd
, ((TreeViewItem) child)._hItem);
1334
return hNext != IntPtr.Zero ? new TreeViewItem(
_hwnd
, this, hNext, _item + 1) : null;
1342
IntPtr hPrev = WindowsTreeView.GetPreviousItem (
_hwnd
, ((TreeViewItem) child)._hItem);
1344
return hPrev != IntPtr.Zero ? new TreeViewItem(
_hwnd
, this, hPrev, _item + 1) : null;
1350
IntPtr hChild = WindowsTreeView.GetFirstChild (
_hwnd
, _hItem);
1352
return hChild != IntPtr.Zero ? new TreeViewItem(
_hwnd
, this, hChild, _item + 1) : null;
1358
if (!IsItemExpanded (
_hwnd
, _hItem))
1363
IntPtr hChild = WindowsTreeView.GetFirstChild (
_hwnd
, _hItem);
1368
for (IntPtr temp = WindowsTreeView.GetNextItem (
_hwnd
, hChild); temp != IntPtr.Zero; temp = WindowsTreeView.GetNextItem (
_hwnd
, hChild))
1373
return new TreeViewItem(
_hwnd
, this, hChild, _item + 1);
1382
bool expanded = WindowsTreeView.IsItemExpanded (
_hwnd
, _hItem);
1390
bool hasChildren = WindowsTreeView.TreeViewItem_HasChildren (
_hwnd
, _hItem);
1419
state = (WindowsTreeView.CheckState)WindowsTreeView.GetCheckState(
_hwnd
, _hItem);
1470
NativeMethods.Win32Rect rectItem = WindowsTreeView.GetItemRect(
_hwnd
, _hItem, true);
1481
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
1496
int selected = WindowsTreeView.GetItemState(
_hwnd
, _hItem, NativeMethods.TVIS_SELECTED);
1516
isCheckbox = WindowsTreeView.CheckState.NoCheckbox != (WindowsTreeView.CheckState)WindowsTreeView.GetCheckState(
_hwnd
, _hItem);
1545
return WindowsTreeView.GetItemText (
_hwnd
, _hItem);
1553
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1554
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1560
if (WindowsTreeView.GetItem(
_hwnd
, _hItem, NativeMethods.TVIF_IMAGE | NativeMethods.TVIF_STATE, out treeItem))
1581
IntPtr address = UnsafeNativeMethods.GetProp(
_hwnd
, "MSAAStateImageMapAddr");
1587
int numStates = unchecked((int)UnsafeNativeMethods.GetProp(
_hwnd
, "MSAAStateImageMapCount"));
1600
using (SafeProcessHandle hProcess = new SafeProcessHandle(
_hwnd
))
1642
return UnsafeNativeMethods.GetProp(
_hwnd
, "MSAAStateImageMapAddr") != IntPtr.Zero;
1652
int childId = Misc.ProxySendMessageInt(
_hwnd
, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (21)
114
return new SpinButtonItem(
_hwnd
, IsSpinnerElement()? _parent : this, (int)item);
139
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
) && IsWinformUpdown(
_hwnd
))
205
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SpinButtonItem.GetBoundingRectangle (
_hwnd
, item));
224
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
))
244
Misc.ProxySendMessage(
_hwnd
, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0));
247
Misc.ProxySendMessage(HwndBuddy(
_hwnd
), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
310
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
361
int pos = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
388
IntPtr hwndBuddy = HwndBuddy(
_hwnd
);
398
int range = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
412
int range = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
485
return GetBoundingRectangle(
_hwnd
, (WindowsUpDown.SpinItem)_item);
529
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
544
if (IsHorizontal(
_hwnd
) && Misc.IsLayoutRTL(
_hwnd
))
550
Rect rc = GetBoundingRectangle(
_hwnd
, (WindowsUpDown.SpinItem)item);
553
if (!Misc.GetWindowRect(
_hwnd
, ref updownRect))
563
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center);
564
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center);
641
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
MS\Internal\AutomationProxies\WinFormsSpinner.cs (4)
324
return new WinformsSpinnerEdit(
_hwnd
, _elEdit.
_hwnd
, _elUpDown.
_hwnd
, _parent, _item);
442
return _elEdit.
_hwnd
== hwnd;