1 write to _hwnd
UIAutomationClientSideProviders (1)
MS\Internal\AutomationProxies\ProxySimple.cs (1)
68
_hwnd
= hwnd;
848 references to _hwnd
UIAutomationClientSideProviders (848)
MS\Internal\AutomationProxies\NonClientArea.cs (27)
219
int hit = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
241
WindowsTitleBar tb = new WindowsTitleBar(
_hwnd
, this, 0);
315
return new int [] { 1, unchecked((int)(long)
_hwnd
) };
321
if (iid == ScrollPattern.Pattern && WindowScroll.HasScrollableStyle(
_hwnd
))
366
WindowScroll.SetScrollPercent (
_hwnd
, horizontalPercent, verticalPercent, true);
372
WindowScroll.Scroll (
_hwnd
, horizontalAmount, verticalAmount, true);
380
return (double) WindowScroll.GetPropertyScroll (ScrollPattern.HorizontalScrollPercentProperty,
_hwnd
);
389
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalScrollPercentProperty,
_hwnd
);
398
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalViewSizeProperty,
_hwnd
);
407
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalViewSizeProperty,
_hwnd
);
416
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.HorizontallyScrollableProperty,
_hwnd
);
425
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.VerticallyScrollableProperty,
_hwnd
);
471
if (WindowsScrollBar.HasHorizontalScrollBar (
_hwnd
))
475
if (Misc.ProxyGetClassName(
_hwnd
) == "SysListView32")
476
return new WindowsListViewScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_HORZ);
478
return new WindowsScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_HORZ);
483
if (WindowsScrollBar.HasVerticalScrollBar (
_hwnd
))
487
if (Misc.ProxyGetClassName(
_hwnd
) == "SysListView32")
488
return new WindowsListViewScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_VERT);
490
return new WindowsScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_VERT);
497
if (WindowsTitleBar.HasTitleBar (
_hwnd
))
499
return new WindowsTitleBar (
_hwnd
, this, (int) item);
514
if (WindowsGrip.IsGripPresent(
_hwnd
, false))
516
return new WindowsGrip(
_hwnd
, this, (int)item);
549
IntPtr menu = UnsafeNativeMethods.GetMenu(
_hwnd
);
552
menuProxy = new WindowsMenu(
_hwnd
, this, menu, WindowsMenu.MenuType.Toplevel, (int)NonClientItem.Menu);
589
if (Misc.IsLayoutRTL(
_hwnd
))
MS\Internal\AutomationProxies\ProxyHwnd.cs (15)
96
WinEventTracker.AddToNotificationList (
_hwnd
, _createOnEvent, aEvents, cEvents);
126
WinEventTracker.RemoveToNotificationList (
_hwnd
, aEvents, null, cEvents);
137
return PtInClientRect (
_hwnd
, x, y) ? this : null;
147
accessKey = GetLabelAccessKey(
_hwnd
);
161
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
163
string sPersistentID = WindowsFormsHelper.WindowsFormsID (
_hwnd
);
171
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
192
IntPtr label = Misc.GetLabelhwnd(
_hwnd
);
201
name = Misc.ProxyGetText(
_hwnd
);
226
_controlLabel = Misc.GetLabelhwnd(
_hwnd
);
239
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
244
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
271
int idChild = Misc.GetWindowId(
_hwnd
);
272
string text = Misc.GetItemToolTipText(
_hwnd
, IntPtr.Zero, idChild);
275
text = Misc.GetItemToolTipText(
_hwnd
, IntPtr.Zero, 0);
MS\Internal\AutomationProxies\ProxySimple.cs (22)
100
if (
_hwnd
== IntPtr.Zero)
107
if (!Misc.GetWindowRect(
_hwnd
, ref controlRectangle))
160
id[1] =
_hwnd
.ToInt32();
174
if (
_hwnd
== IntPtr.Zero || (GetParent() != null && GetParent().
_hwnd
==
_hwnd
))
179
return AutomationInteropProvider.HostProviderFromHandle(
_hwnd
);
214
return Misc.IsEnabled(
_hwnd
);
225
Misc.GetWindowThreadProcessId(
_hwnd
, out pid);
247
return Misc.GetFocusedWindow() ==
_hwnd
? IsFocused() : false;
269
return WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
) ? "WinForm" : "Win32";
278
if (Misc.GetFocusedWindow() ==
_hwnd
&& IsFocused())
284
if (SafeNativeMethods.IsWindowVisible(
_hwnd
) && (bool)GetElementProperty(AutomationElement.IsEnabledProperty))
350
string sRawName = Misc.GetControlName(
_hwnd
, false);
399
EventManager.DispatchEvent(this,
_hwnd
, eventId, idProp, idObject);
539
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
589
Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref rcOutside);
613
return ClickablePoint.GetPoint(
_hwnd
, alIn, alOut, ref pt);
649
_IAccessible = Accessible.AccessibleObjectFromWindow(
_hwnd
, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK ? acc.IAccessible : null;
665
return
_hwnd
;
674
return Misc.GetWindowStyle(
_hwnd
);
683
return Misc.GetWindowExStyle(
_hwnd
);
MS\Internal\AutomationProxies\WindowsAltTab.cs (8)
45
GetAltTabInfo(
_hwnd
, 0, ref _altTabInfo, null);
138
if (Misc.MapWindowPoints(System.IntPtr.Zero,
_hwnd
, ref pt, 1))
142
if(Misc.GetClientRect(
_hwnd
, ref clientRect))
203
altTabItem = new WindowsAltTabItem(
_hwnd
, this, item);
222
if (GetAltTabInfo(
_hwnd
, -1, ref altTabInfo, null))
353
return GetBoundingRect().ToRect(Misc.IsControlRTL(
_hwnd
));
366
if (WindowsAltTab.GetAltTabInfo(
_hwnd
, _item, ref altTabInfo, itemText))
398
if(!Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (22)
258
if (!WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms) && IsStartButton())
263
return Misc.AccessKey(Misc.ProxyGetText(
_hwnd
));
269
return SafeNativeMethods.IsWindowVisible(
_hwnd
);
398
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
470
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
479
Misc.SetFocus(
_hwnd
);
503
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero);
517
Misc.ProxySendMessage(
_hwnd
, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true);
524
Misc.ProxySendMessage(
_hwnd
, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true);
558
if (!Misc.GetClassName(
_hwnd
).Equals("Button"))
566
return Misc.InTheShellProcess(
_hwnd
) && UnsafeNativeMethods.GetProp(
_hwnd
, "StartButtonTag") == new IntPtr(304);
570
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
584
if (!Misc.GetClassName(
_hwnd
).Equals("Button"))
589
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
604
IntPtr hwndParent =
_hwnd
;
649
int state = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero);
672
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
674
Misc.EnumChildWindows(
_hwnd
, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound);
703
return Misc.StripMnemonic(Misc.ProxyGetText(
_hwnd
));
709
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
712
Misc.EnumChildWindows(
_hwnd
, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton);
MS\Internal\AutomationProxies\WindowsComboBox.cs (34)
124
if (GetDroppedState (
_hwnd
))
130
if (GetComboInfo(
_hwnd
, ref cbInfo))
145
return rcCombo.ToRect(Misc.IsControlRTL(
_hwnd
));
154
if (Misc.GetClassName(
_hwnd
).Equals("Internet Explorer_TridentCmboBx"))
256
if (GetComboInfo(
_hwnd
, ref cbInfo))
259
if (Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref cbInfo.rcButton, 2))
263
return new WindowsComboButton(
_hwnd
, this, (int)ComboChildren.Button);
300
if (GetComboInfo(
_hwnd
, ref cbInfo))
337
if (GetComboInfo(
_hwnd
, ref cbInfo))
376
Misc.CheckEnabled(
_hwnd
);
381
if (GetComboInfo(
_hwnd
, ref cbInfo) && SafeNativeMethods.IsWindowVisible(cbInfo.hwndItem))
391
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
394
int id = Misc.GetWindowId(
_hwnd
);
397
Misc.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam,
_hwnd
);
419
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
444
Misc.CheckEnabled(
_hwnd
);
446
if (GetDroppedState (
_hwnd
))
452
Expand (
_hwnd
);
458
Misc.CheckEnabled(
_hwnd
);
460
if (!GetDroppedState (
_hwnd
))
466
Collapse(
_hwnd
);
473
return (GetDroppedState (
_hwnd
)) ? ExpandCollapseState.Expanded : ExpandCollapseState.Collapsed;
501
IntPtr hwndToAsk = IsComboBoxEx32() ? _hwndEx :
_hwnd
;
632
return Misc.ProxyGetText(IsComboBoxEx32() ? _hwndEx :
_hwnd
);
638
IntPtr hwnd = IsComboBoxEx32() ? _hwndEx :
_hwnd
;
648
if (GetComboInfo(
_hwnd
, ref cbInfo) && cbInfo.stateButton != NativeMethods.STATE_SYSTEM_INVISIBLE)
650
return new WindowsComboButton (
_hwnd
, this, (int) ComboChildren.Button);
660
if (GetComboInfo(
_hwnd
, ref cbInfo) && (IntPtr.Zero != cbInfo.hwndList))
924
if (!WindowsComboBox.GetComboInfo(
_hwnd
, ref cbInfo))
928
if (!Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref cbInfo.rcButton, 2))
955
Misc.CheckEnabled(
_hwnd
);
957
if (!WindowsComboBox.GetDroppedState (
_hwnd
))
959
WindowsComboBox.Expand (
_hwnd
);
963
WindowsComboBox.Collapse (
_hwnd
);
MS\Internal\AutomationProxies\WindowsEditBox.cs (21)
153
for (IntPtr hwnd =
_hwnd
;
166
if (IsInsideOfIPAddress(
_hwnd
))
221
IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(
_hwnd
);
224
return new WindowsSpinner(hwndUpDown,
_hwnd
, _parent, _item);
232
IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(
_hwnd
);
235
return new WindowsSpinner(hwndUpDown,
_hwnd
, _parent, _item);
243
IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(
_hwnd
);
246
return new WindowsSpinner(hwndUpDown,
_hwnd
, _parent, _item);
270
Misc.CheckEnabled(
_hwnd
);
294
int result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
302
result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
584
return Misc.ProxyGetText(
_hwnd
, GetTextLength());
600
if (Misc.GetClientRect(
_hwnd
, ref rect) && !rect.IsEmpty)
723
if (Misc.GetClientRect(
_hwnd
, ref rect) && !rect.IsEmpty)
855
IntPtr hdc = Misc.GetDC(
_hwnd
);
875
Misc.ReleaseDC(
_hwnd
, hdc);
888
return Text(
_hwnd
);
893
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
903
if (WindowsComboBox.GetComboInfo(hwndParent, ref cbInfo) && cbInfo.hwndItem ==
_hwnd
)
913
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
924
return WindowsSpinner.IsSpinnerEdit(
_hwnd
);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (8)
86
Misc.SetFocus(_provider.
_hwnd
);
307
Misc.SetFocus(_provider.
_hwnd
);
361
Misc.SetFocus(_provider.
_hwnd
);
425
Misc.SetFocus(_provider.
_hwnd
);
444
Misc.SetFocus(_provider.
_hwnd
);
461
Misc.SetFocus(_provider.
_hwnd
);
484
Misc.SetFocus(_provider.
_hwnd
);
490
if (Misc.IsReadingRTL(_provider.
_hwnd
))
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (4)
105
Misc.SetFocus(
_hwnd
);
122
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
127
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
132
Misc.SetFocus(
_hwnd
);
MS\Internal\AutomationProxies\WindowsGrip.cs (4)
54
if (IsGripPresent(
_hwnd
, false))
57
if (Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref client))
59
NativeMethods.SIZE sizeGrip = GetGripSize(
_hwnd
, false);
61
if (Misc.IsLayoutRTL(
_hwnd
))
MS\Internal\AutomationProxies\WindowsHyperlink.cs (12)
119
return Misc.StripMnemonic(RemoveHTMLAnchorTag(Misc.ProxyGetText(
_hwnd
)));
204
if (!Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref HitTestInfo.pt, 1))
219
bGetItemResult = XSendMessage.XSend(
_hwnd
, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
264
return new WindowsHyperlinkItem(
_hwnd
, this, index);
284
return XSendMessage.XSend(
_hwnd
, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM));
402
return XSendMessage.XSend(
_hwnd
, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType()));
429
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
434
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
443
if (!Misc.GetWindowRect(
_hwnd
, ref BoundingRect))
499
bGetItemResult = XSendMessage.XSend(
_hwnd
, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
511
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
512
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (12)
119
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
140
Misc.ProxySendMessage(
_hwnd
, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4));
155
return Misc.ProxyGetText(
_hwnd
, IP_ADDRESS_STRING_LENGTH);
163
return !Misc.IsEnabled(
_hwnd
);
245
IntPtr hwndChild = Misc.GetWindow(
_hwnd
, NativeMethods.GW_CHILD);
262
IntPtr hwndChild = Misc.GetWindow(
_hwnd
, NativeMethods.GW_CHILD);
353
return Misc.ProxyGetText(
_hwnd
);
365
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
383
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
391
string s = WindowsEditBox.Text(
_hwnd
);
404
return !SafeNativeMethods.IsWindowEnabled(
_hwnd
);
478
return WindowsIPAddress.Create(Misc.GetParent(
_hwnd
), 0, 0);
MS\Internal\AutomationProxies\WindowsListBox.cs (52)
158
else if (iid == ScrollPattern.Pattern && WindowScroll.HasScrollableStyle(
_hwnd
))
161
IScrollProvider scroll = NonClientArea.Create(
_hwnd
, 0) as IScrollProvider;
178
return IsParentedByCombo() || SafeNativeMethods.IsWindowVisible(
_hwnd
);
187
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
295
Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref listboxrect);
298
int ret = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top));
313
int index = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero);
349
if (ListboxItem.IsSelected(
_hwnd
, itemPos))
388
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0;
430
return new ListboxItem (
_hwnd
, this, index);
438
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero);
557
if (i != skipItem && ListboxItem.IsSelected(
_hwnd
, i))
569
int result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero);
580
for (i = 0, count = Length; i < count && !ListboxItem.IsSelected (
_hwnd
, i); i++)
593
if (i != skipItem && ListboxItem.IsSelected (
_hwnd
, i))
610
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR;
623
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
))
695
else if (iid == ScrollItemPattern.Pattern && WindowScroll.IsScrollable(
_hwnd
))
733
int iTextLen = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero);
737
if (Misc.GetClassName(
_hwnd
).Equals("Internet Explorer_TridentLstBox"))
744
return XSendMessage.GetItemText(
_hwnd
, NativeMethods.WM_USER + NativeMethods.LB_GETTEXT, _item, iTextLen);
748
string text = Misc.GetUnsafeText(
_hwnd
, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen);
775
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
782
bool itemSelected = IsSelected (
_hwnd
, _item);
832
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
838
if (ListboxItem.IsSelected (
_hwnd
, _item) && !_listBox.IsParentedByCombo())
884
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
889
if (!IsSelected(
_hwnd
, _item))
904
if (!UnSelect(
_hwnd
, _item))
915
return ListboxItem.IsSelected (
_hwnd
, _item);
935
if (_listBox._parentedByCombo && !SafeNativeMethods.IsWindowVisible(
_hwnd
))
940
if (!WindowScroll.IsScrollable(
_hwnd
))
946
Misc.ProxySendMessage(
_hwnd
, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero);
957
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
961
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
1020
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR;
1024
return Select (
_hwnd
, _item, false);
1045
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item;
1049
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0;
1066
Misc.ProxySendMessage(
_hwnd
, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect);
1067
return Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty;
1080
_windowsForms = WindowsFormsHelper.GetControlState(
_hwnd
);
1135
Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item));
1140
Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1150
int listBoxStyle = Misc.GetWindowStyle(
_hwnd
);
1154
int idListBox = Misc.GetWindowId(
_hwnd
);
1158
IntPtr hwndListBoxParent = Misc.GetParent(
_hwnd
);
1162
hwndListBoxParent, NativeMethods.WM_COMMAND, wParam,
_hwnd
);
1170
Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1174
int id = Misc.GetWindowId(
_hwnd
);
1178
Misc.ProxySendMessageInt(combo.
_hwnd
, NativeMethods.WM_COMMAND, wParam,
_hwnd
);
MS\Internal\AutomationProxies\WindowsListView.cs (82)
90
WinEventTracker.AddToNotificationList (
_hwnd
, new WinEventTracker.ProxyRaiseEvents (WindowsListView.GroupSpecificEvents), _groupEvents, 3);
177
(IsDetailMode (
_hwnd
) ||
178
IsImplementingGrid (
_hwnd
) && GetItemCount (
_hwnd
) > 0))
189
if (iid == TablePattern.Pattern && IsDetailMode (
_hwnd
))
203
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
210
count = GetItemCount (
_hwnd
);
237
_groupsCollection.EnsureCreation (
_hwnd
);
239
GroupManager manager = _groupsCollection[
_hwnd
];
271
if (IsGroupViewEnabled (
_hwnd
))
274
_groupsCollection.EnsureCreation (
_hwnd
);
277
GroupManager manager = _groupsCollection [
_hwnd
];
316
int count = GetItemCount (
_hwnd
);
334
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
335
int itemCount = GetItemCount(
_hwnd
);
347
_groupsCollection.EnsureCreation(
_hwnd
);
349
GroupManager manager = _groupsCollection[
_hwnd
];
369
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
376
_groupsCollection.EnsureCreation (
_hwnd
);
378
GroupManager manager = _groupsCollection [
_hwnd
];
393
int count = GetItemCount (
_hwnd
);
403
if (PtInListViewHeader (x, y) || !PtInClientRect (
_hwnd
, x, y))
409
if (IsGroupViewEnabled (
_hwnd
))
411
_groupsCollection.EnsureCreation (
_hwnd
);
414
GroupManager manager = WindowsListView._groupsCollection [
_hwnd
];
423
ProxyFragment group = new WindowsListViewGroup (
_hwnd
, this, groupID);
429
NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest(
_hwnd
, new NativeMethods.Win32Point(x, y));
436
else if (hitTest.flags == NativeMethods.LVHT_NOWHERE && IsDetailMode(
_hwnd
))
454
hitTest = WindowsListView.SubitemHitTest(
_hwnd
, new NativeMethods.Win32Point(x, y));
471
if (IsGroupViewEnabled (
_hwnd
))
473
_groupsCollection.EnsureCreation (
_hwnd
);
474
return WindowsListViewGroup.GetFocusInGroup (
_hwnd
, this);
478
int index = GetItemNext(
_hwnd
, -1, NativeMethods.LVNI_FOCUSED);
501
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
515
WinEventTracker.AddToNotificationList(
_hwnd
, _createOnEvent, aEvents, 1);
530
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
544
WinEventTracker.AddToNotificationList(
_hwnd
, _createOnEvent, aEvents, 1);
557
int count = GetItemCount (
_hwnd
);
558
int countSelection = MultiSelected(
_hwnd
) ? GetSelectedItemCount(
_hwnd
) : 1;
569
for (int itemPos = GetItemNext(
_hwnd
, -1, NativeMethods.LVNI_SELECTED); itemPos != -1; itemPos = GetItemNext(
_hwnd
, itemPos, NativeMethods.LVNI_SELECTED))
589
return MultiSelected (
_hwnd
);
610
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
615
WindowScroll.Scroll (
_hwnd
, horizontalAmount, verticalAmount, true);
621
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
627
int size = ApproximateViewRect (
_hwnd
);
646
fScrollSuccess = Scroll(
_hwnd
, (IntPtr)dx, (IntPtr)dy);
653
if (fScrollSuccess && (((int)horizontalPercent != (int)ScrollPattern.NoScroll && (int)horizontalPercent != (int)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalScrollPercentProperty,
_hwnd
))
654
|| ((int)verticalPercent != (int)ScrollPattern.NoScroll && (int)verticalPercent != (int)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalScrollPercentProperty,
_hwnd
))))
662
Scroll(
_hwnd
, (IntPtr)dx, (IntPtr)dy);
682
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalScrollPercentProperty,
_hwnd
);
692
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalScrollPercentProperty,
_hwnd
);
702
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalViewSizeProperty,
_hwnd
);
712
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalViewSizeProperty,
_hwnd
);
722
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.HorizontallyScrollableProperty,
_hwnd
);
731
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.VerticallyScrollableProperty,
_hwnd
);
743
int maxRow = GetRowCount (
_hwnd
);
744
int maxColumn = GetColumnCount (
_hwnd
);
757
if (IsDetailMode (
_hwnd
))
769
return GetRowCount (
_hwnd
);
777
return GetColumnCount (
_hwnd
);
795
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
860
return new int [] { ListViewGetView (
_hwnd
) };
867
return ListViewGetView (
_hwnd
);
1549
return CheckBoxes (
_hwnd
) ? new int [] { NativeMethods.EventObjectNameChange, NativeMethods.EventObjectStateChange } : new int [] { NativeMethods.EventObjectNameChange };
1577
return new WindowsListViewGroup (
_hwnd
, this, groupID);
1586
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
1588
if ((!hasGroup) && GetItemCount(
_hwnd
) > 0)
1596
_groupsCollection.EnsureCreation(
_hwnd
);
1598
GroupManager manager = _groupsCollection[
_hwnd
];
1614
return CreateListViewItemOrStartMenuItem(new WindowsListViewGroup(
_hwnd
, this, groupId), item);
1619
return new WindowsListViewGroup (
_hwnd
, this, item);
1633
ProxyFragment proxyFragment = new ListViewItemStartMenu(
_hwnd
, parent, item, AccessibleObject);
1642
return new ListViewItem(
_hwnd
, parent, item);
1649
string className = Misc.GetClassName(Misc.GetParent(
_hwnd
));
1673
if (!Misc.GetScrollBarInfo(
_hwnd
, scrollBar, ref scrollBarInfo) ||
1689
if (!Misc.GetScrollInfo(
_hwnd
, sbFlag, ref si) ||
1713
return new ListViewSubItem (
_hwnd
, lvItem, column, row);
1720
int itemCount = GetItemCount (
_hwnd
);
1723
if (IsListMode (
_hwnd
))
1836
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (29)
60
else if (iid == ExpandCollapsePattern.Pattern && WindowsListView.IsGroupViewEnabled(
_hwnd
))
73
GroupManager manager = WindowsListView._groupsCollection [
_hwnd
];
104
return XSendMessage.GetItemText(
_hwnd
, group, NativeMethods.LVGF_HEADER);
115
return XSendMessage.GetItemText(
_hwnd
, group);
129
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
161
XSendMessage.GetGroupInfo(
_hwnd
, ref group); // ignore return code.
182
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
219
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
236
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
249
XSendMessage.GetGroupInfo(
_hwnd
, ref group); // ignore return code.
288
NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest (
_hwnd
, pt);
298
return new ListViewItem (
_hwnd
, this, hitTest.iItem);
309
XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType()));
314
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
331
int groupIndex = (int)Misc.ProxySendMessage(
_hwnd
, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
340
bool lresult = XSendMessage.XSend(
_hwnd
, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
364
int maxRow = GetRowCount (
_hwnd
, ID);
365
int maxColumn = GetColumnCount(
_hwnd
, ID);
377
if (WindowsListView.IsDetailMode (
_hwnd
))
389
return GetRowCount (
_hwnd
, ID);
397
return GetColumnCount (
_hwnd
, ID);
407
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
420
return IsCollapsed(
_hwnd
, _groupID);
593
return new ListViewItem (
_hwnd
, this, index);
615
if (!XSendMessage.SetGroupInfo(
_hwnd
, group))
626
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
633
return new ListViewSubItem (
_hwnd
, lvItem, column, lvitemIndex);
645
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
829
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)
65
if (iid == InvokePattern.Pattern && WindowsListView.ListViewInvokable(
_hwnd
))
75
if (iid == ValuePattern.Pattern && WindowsListView.ListViewEditable (
_hwnd
))
80
if (iid == GridItemPattern.Pattern && IsImplementingGrid (
_hwnd
))
85
if (iid == TogglePattern.Pattern && IsItemWithCheckbox(
_hwnd
, _item))
90
if (iid == ScrollItemPattern.Pattern && WindowScroll.IsScrollable(
_hwnd
))
117
WindowsListView._groupsCollection.EnsureCreation (
_hwnd
);
119
GroupManager manager = WindowsListView._groupsCollection[
_hwnd
];
137
if (XSendMessage.XSend(
_hwnd
, NativeMethods.LVM_GETITEMINDEXRECT, new IntPtr(&ii), new IntPtr(&itemRectangle), Marshal.SizeOf(ii.GetType()), Marshal.SizeOf(itemRectangle.GetType())))
139
if (Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRectangle, 2))
151
if (WindowsListView.GetItemRect(
_hwnd
, _item, NativeMethods.LVIR_BOUNDS, out itemRectangle))
194
string text = GetText(
_hwnd
, _item, 0);
217
return WindowsListView.SetItemFocused (
_hwnd
, _item);
237
&& IsItemWithCheckbox(
_hwnd
, _item))
261
if (WindowsListView.IsDetailMode (
_hwnd
))
264
int countCol = GetSubItemCount (
_hwnd
);
281
if (IsItemWithCheckbox(
_hwnd
, _item) && item == 0)
285
else if (WindowsListView.IsDetailMode (
_hwnd
))
287
int countCol = GetSubItemCount (
_hwnd
);
300
if (IsItemWithCheckbox(
_hwnd
, _item))
304
else if (WindowsListView.IsDetailMode(
_hwnd
))
306
int countCol = GetSubItemCount (
_hwnd
);
319
if (WindowsListView.IsDetailMode (
_hwnd
))
321
int countCol = GetSubItemCount (
_hwnd
);
329
if (IsItemWithCheckbox(
_hwnd
, _item))
341
if (IsItemWithCheckbox (
_hwnd
, _item))
343
NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (
_hwnd
, _item);
347
return new ListViewItemCheckbox (
_hwnd
, this, _item, _checkbox);
351
if (WindowsListView.IsDetailMode (
_hwnd
))
354
return ListViewSubItem.ElementProviderFromPoint (
_hwnd
, this, _item, x, y);
366
int columns = ListViewItem.GetSubItemCount (
_hwnd
);
369
int column = (int)Misc.ProxySendMessage(
_hwnd
, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
388
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
394
if (!WindowsListView.MultiSelected (
_hwnd
) && WindowsListView.IsItemSelected (
_hwnd
, _item))
400
WindowsListView.UnselectAll (
_hwnd
);
403
if (!WindowsListView.SelectItem(
_hwnd
, _item))
413
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
419
if (WindowsListView.IsItemSelected (
_hwnd
, _item))
425
if (!WindowsListView.MultiSelected(
_hwnd
))
432
if (selectionRequired || WindowsListView.GetSelectedItemCount(
_hwnd
) > 0)
441
if (!WindowsListView.SelectItem(
_hwnd
, _item))
451
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
457
if (!WindowsListView.IsItemSelected (
_hwnd
, _item))
463
if (!WindowsListView.MultiSelected (
_hwnd
))
477
if (!WindowsListView.UnSelectItem(
_hwnd
, _item))
488
return WindowsListView.IsItemSelected (
_hwnd
, _item);
520
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
525
if (WindowsListView.Scrollable (
_hwnd
))
528
WindowsListView.EnsureVisible (
_hwnd
, _item, true);
549
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
554
SetValue(val,
_hwnd
, _item);
562
return ListViewItem.GetText (
_hwnd
, _item, 0);
571
return !WindowsListView.ListViewEditable (
_hwnd
);
584
if (WindowsListView.IsGroupViewEnabled (
_hwnd
))
590
if (WindowsListView.IsListMode (
_hwnd
))
592
int itemCount = WindowsListView.GetItemCount (
_hwnd
);
593
int rowCount = WindowsListView.GetRowCountListMode (
_hwnd
, itemCount);
599
int columnCount = WindowsListView.GetColumnCountOtherModes (
_hwnd
);
609
if (WindowsListView.IsGroupViewEnabled (
_hwnd
))
615
if (WindowsListView.IsListMode (
_hwnd
))
617
int itemCount = WindowsListView.GetItemCount (
_hwnd
);
618
int rowCount = WindowsListView.GetRowCountListMode (
_hwnd
, itemCount);
623
int columnCount = WindowsListView.GetColumnCountOtherModes (
_hwnd
);
661
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
667
if (!WindowsListView.Scrollable(
_hwnd
))
673
WindowsListView.EnsureVisible(
_hwnd
, _item, false);
846
return WindowsListView.IsItemFocused (
_hwnd
, _item);
854
IntPtr hwndHeader = WindowsListView.ListViewGetHeader(
_hwnd
);
860
&& Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref listViewRect))
891
return new ListViewSubItem (
_hwnd
, this, index, _item);
896
return new ListViewItemCheckbox (
_hwnd
, this, _item, _checkbox);
923
if (!WindowsListView.GetItemRect(
_hwnd
, _item, NativeMethods.LVIR_LABEL, out itemRectangle))
928
if (WindowsListView.IsDetailMode (
_hwnd
) && !WindowsListView.FullRowSelect (
_hwnd
))
934
if (!Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
944
if (!WindowsListView.GetItemRect(
_hwnd
, _item, NativeMethods.LVIR_LABEL, out itemRectangle))
958
Misc.MouseClick(clickPoint.x, clickPoint.y, !WindowsListView.ListViewSingleClickActivate(
_hwnd
));
986
int groupID = GetGroupID (
_hwnd
, _item);
991
GroupManager.GroupInfo groupInfo = WindowsListViewGroup.GetGroupInfo (
_hwnd
, groupID);
1000
int columnCount = WindowsListViewGroup.GetColumnCountExternal (
_hwnd
, groupID);
1019
int groupID = GetGroupID (
_hwnd
, _item);
1024
GroupManager.GroupInfo groupInfo = WindowsListViewGroup.GetGroupInfo (
_hwnd
, groupID);
1033
int columnCount = WindowsListViewGroup.GetColumnCountExternal (
_hwnd
, groupID);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (12)
66
return ListViewCheckBoxRect(
_hwnd
, _listviewItem).ToRect(false);
76
NativeMethods.Win32Rect itemRect = ListViewCheckBoxRect(
_hwnd
, _listviewItem);
82
if (Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect))
103
return WindowsListView.GetItemToolTipText(
_hwnd
);
112
string name = ListViewItem.GetText(
_hwnd
, _listviewItem, 0);
215
ListViewItem.CheckState current = (ListViewItem.CheckState) WindowsListView.GetCheckedState (
_hwnd
, _listviewItem);
242
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
247
Misc.SetFocus(
_hwnd
);
249
NativeMethods.Win32Rect rc = ListViewCheckBoxRect(
_hwnd
, _listviewItem);
252
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
255
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
256
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (9)
50
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
))
59
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
78
bool isVerticalScroll = IsScrollBarVertical(
_hwnd
, _sbFlag);
79
if (isVerticalScroll && WindowsListView.InReportView (
_hwnd
))
81
Misc.SetScrollPos(
_hwnd
, _sbFlag, pos, true);
86
int size = WindowsListView.ApproximateViewRect (
_hwnd
);
105
if (WindowsListView.Scroll (
_hwnd
, (IntPtr) dx, (IntPtr) dy))
110
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
130
WindowsListView.Scroll (
_hwnd
, (IntPtr) dx, (IntPtr) dy);
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (26)
57
if (iid == ValuePattern.Pattern && _item == 0 && WindowsListView.ListViewEditable (
_hwnd
))
81
if (!WindowsListView.GetSubItemRect (
_hwnd
, _itemParent, _item, lvir, out itemRectangle))
89
if (WindowsListView.FullRowSelect(
_hwnd
) && !WindowsListView.HasJustifyColumnsExStyle(
_hwnd
) &&
90
!WindowsListView.IsIconView(
_hwnd
) && _item == 0 && 1 < ListViewItem.GetSubItemCount(
_hwnd
))
94
if (!WindowsListView.GetSubItemRect(
_hwnd
, _itemParent, 1, NativeMethods.LVIR_BOUNDS, out itemRectangle1))
100
if (Misc.IsControlRTL(
_hwnd
))
110
if (ListViewItem.IsItemWithCheckbox (
_hwnd
, _itemParent))
112
NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (
_hwnd
, _itemParent);
115
if (Misc.IsControlRTL(
_hwnd
))
169
IntPtr ancestor =
_hwnd
;
191
return WindowsListView.GetItemToolTipText(
_hwnd
);
200
string name = ListViewItem.GetText(
_hwnd
, _itemParent, _item);
209
return WindowsListView.SetItemFocused (
_hwnd
, this._itemParent);
219
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
224
ListViewItem.SetValue (val,
_hwnd
, _itemParent);
232
return ListViewItem.GetText (
_hwnd
, _itemParent, _item);
240
return !WindowsListView.ListViewEditable (
_hwnd
);
253
if (!WindowsListView.IsGroupViewEnabled (
_hwnd
))
261
int groupID = ListViewItem.GetGroupID (
_hwnd
, _itemParent);
265
GroupManager.GroupInfo groupInfo = WindowsListViewGroup.GetGroupInfo (
_hwnd
, groupID);
328
IntPtr hwndHeader = WindowsListView.ListViewGetHeader (
_hwnd
);
374
if (Misc.IsComctrlV6OnOsVerV6orHigher(
_hwnd
))
376
int column = (int)Misc.ProxySendMessage(
_hwnd
, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
380
return WindowsListView.IsItemFocused (
_hwnd
, _itemParent);
MS\Internal\AutomationProxies\WindowsMenu.cs (31)
89
_expandedMenus[hwnd] = new MenuParentInfo(_parent.
_hwnd
, _parent._item, ((MenuItem)_parent)._menuType);
103
_expandedMenus[hwnd] = new MenuParentInfo(_parent.
_hwnd
, _parent._item, ((MenuItem)_parent)._menuType);
143
if (_type == MenuType.Submenu && GetHierarchyParent(
_hwnd
) == null && GetSystemPopupParent() != null)
344
return new int[] { 1, unchecked((int)(long)
_hwnd
), unchecked((int)(long)_hmenu) };
503
return new MenuItem(
_hwnd
, this, index, _hmenu, _type);
806
if (!GetMenuBarInfo(
_hwnd
, NativeMethods.OBJID_SYSMENU, 0, out mbi))
818
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(
_hwnd
)))
823
if (!Misc.ProxyGetTitleBarInfo(
_hwnd
, out ti))
836
if (GetMenuBarInfo(
_hwnd
, NativeMethods.OBJID_MENU, 0, out mbi))
1219
if (!SafeNativeMethods.IsWindowVisible (
_hwnd
) || _type == MenuItemType.Spacer)
1253
if (GetMenuBarInfo(
_hwnd
, NativeMethods.OBJID_SYSMENU, 0, out mbi))
1262
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(
_hwnd
)))
1267
if (!Misc.ProxyGetTitleBarInfo(
_hwnd
, out ti))
1282
if (Misc.GetMenuItemRect(
_hwnd
, _hmenu, _item, out rc))
1391
if (!Misc.IsEnabled(
_hwnd
))
1433
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
) || _type == MenuItemType.Spacer)
1452
if (hwndFocus != IntPtr.Zero && hwndFocus !=
_hwnd
)
2027
if (!SafeNativeMethods.IsWindowVisible (
_hwnd
))
2072
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
2096
hwndSubMenu !=
_hwnd
;
2126
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' '));
2234
if (!SafeNativeMethods.IsWindowVisible (
_hwnd
))
2248
if (Misc.ProxyGetGUIThreadInfo(0, out gui) &&
_hwnd
== gui.hwndActive)
2264
return Misc.SetFocus(
_hwnd
);
2586
if (
_hwnd
== IntPtr.Zero)
2592
using (SafeProcessHandle hProcess = new SafeProcessHandle(
_hwnd
))
2651
return SafeNativeMethods.IsWindowEnabled(
_hwnd
);
2669
return new MenuItem(
_hwnd
, _parent, _item - 1, _hmenu, _menuType);
2684
return new MenuItem(
_hwnd
, _parent, nextItem, _hmenu, _menuType);
2720
if (new MenuItem (
_hwnd
, this._parent, i, _hmenu, _menuType).HotKey == chHotKey)
2935
return
_hwnd
;
MS\Internal\AutomationProxies\WindowsProgressbar.cs (3)
159
int cur = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
160
int min = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero);
161
int max = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (10)
127
if (!Misc.GetWindowRect(
_hwnd
, ref rebarRect))
190
return new RebarBandItem (
_hwnd
, this, index);
197
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero);
208
return XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType()));
281
return GetBoundingRectangle (
_hwnd
, _item);
290
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
291
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _item);
376
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
381
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)
167
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
178
if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
))
193
int result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
200
result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
565
return Misc.ProxyGetText(
_hwnd
);
681
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (6)
69
Misc.SetFocus(_pattern.
_hwnd
);
258
Misc.SetFocus(_pattern.
_hwnd
);
276
Misc.SetFocus(_pattern.
_hwnd
);
308
Misc.SetFocus(_pattern.
_hwnd
);
330
Misc.SetFocus(_pattern.
_hwnd
);
354
Misc.SetFocus(_pattern.
_hwnd
);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (28)
125
return (iid == RangeValuePattern.Pattern && WindowScroll.Scrollable (
_hwnd
, _sbFlag) && HasValuePattern (
_hwnd
, _sbFlag)) ? this : null;
146
if (!Misc.GetScrollBarInfo(
_hwnd
, idObject, ref sbi))
166
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_parent.
_hwnd
)))
197
return SafeNativeMethods.IsWindowVisible(
_hwnd
);
206
if (SafeNativeMethods.IsWindowVisible(
_hwnd
) &&
221
return IsEnabled() && Misc.IsEnabled(
_hwnd
);
225
return IsScrollBarVertical(
_hwnd
, _sbFlag) ? OrientationType.Vertical : OrientationType.Horizontal;
269
return IsScrollBarVertical(
_hwnd
, _sbFlag)
289
if (item == ScrollBarItem.UpArrow && !IsScrollBarWithThumb (
_hwnd
, _sbFlag))
309
if (item == ScrollBarItem.DownArrow && !IsScrollBarWithThumb (
_hwnd
, _sbFlag))
336
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(WindowsScrollBarBits.GetBoundingRectangle(
_hwnd
, this, item, _sbFlag));
340
return new WindowsScrollBarBits (
_hwnd
, this, (int) item, _sbFlag);
370
return !Misc.IsEnabled(
_hwnd
) || !HasValuePattern(
_hwnd
, _sbFlag);
528
if (_sbFlag != NativeMethods.SB_CTL || Misc.GetScrollBarInfo(
_hwnd
, NativeMethods.OBJID_CLIENT, ref sbi))
530
return new WindowsScrollBarBits (
_hwnd
, this, (int) index, _sbFlag);
562
string classname = Misc.GetClassName(
_hwnd
);
579
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
590
if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent.
_hwnd
)))
621
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
))
630
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
668
string classname = Misc.GetClassName(
_hwnd
);
691
Misc.SetScrollPos(
_hwnd
, _sbFlag, val, true);
697
IsScrollBarVertical(
_hwnd
, _sbFlag) ? NativeMethods.WM_VSCROLL : NativeMethods.WM_HSCROLL;
702
Misc.ProxySendMessage(
_hwnd
, msg, (IntPtr)wParam, IntPtr.Zero);
704
Misc.ProxySendMessage(
_hwnd
, msg, (IntPtr)wParam, IntPtr.Zero);
741
if (!Misc.GetScrollBarInfo(
_hwnd
, idObject, ref sbi))
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (10)
115
return SafeNativeMethods.IsWindowVisible(
_hwnd
);
130
return GetBoundingRectangle (
_hwnd
, _parent, (WindowsScrollBar.ScrollBarItem) _item, _sbFlag);
151
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
181
if (WindowsScrollBar.IsScrollBarVertical(
_hwnd
, _sbFlag))
239
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(parent._parent.
_hwnd
)))
520
IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(
_hwnd
) :
_hwnd
;
546
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
567
Misc.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd ==
_hwnd
? IntPtr.Zero :
_hwnd
));
MS\Internal\AutomationProxies\WindowsSlider.cs (16)
141
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SliderItem.GetBoundingRectangle (
_hwnd
, item, _fHorizontal));
160
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
171
IntPtr parent = Misc.GetParent(
_hwnd
);
249
return new SliderItem (
_hwnd
, this, (int) item, _fHorizontal);
264
int value = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
269
int maxValue = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
287
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val));
294
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero);
302
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero);
310
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
318
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero);
403
return GetBoundingRectangle (
_hwnd
, (WindowsSlider.SItem) _item, _fHorizontal);
412
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
413
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, 0);
434
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
443
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsStatic.cs (2)
137
return Misc.AccessKey(Misc.ProxyGetText(
_hwnd
));
156
return Misc.StripMnemonic(Misc.ProxyGetText(
_hwnd
));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (17)
109
if (hwndChild == IntPtr.Zero || hwndChild ==
_hwnd
)
111
hwndChild = GetChildHwnd(
_hwnd
, accChild.Location);
114
if(hwndChild != IntPtr.Zero && hwndChild !=
_hwnd
)
121
return new WindowsStatusBarPane(
_hwnd
, this, index, accChild);
145
return Misc.ProxyGetText(
_hwnd
);
174
return item + 1 < count ? CreateStatusBarPane(item + 1) : (_fHasGrip ? StatusBarGrip.Create(
_hwnd
, this, -1) : null);
205
return Count > 0 ? CreateStatusBarPane(0) : (_fHasGrip ? StatusBarGrip.Create(
_hwnd
, this, GripItemID) : null);
214
return StatusBarGrip.Create(
_hwnd
, this, GripItemID);
227
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (WindowsStatusBarPane.GetBoundingRectangle (
_hwnd
, item));
238
NativeMethods.Win32Rect rc = StatusBarGrip.GetBoundingRectangle (
_hwnd
);
241
ProxySimple grip = StatusBarGrip.Create(
_hwnd
, this, -1);
311
hwndChild = GetChildHwnd(
_hwnd
, accChild.Location);
340
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero);
462
return GetBoundingRectangle (
_hwnd
, _item);
599
int retValue = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
604
return XSendMessage.GetItemText(
_hwnd
, NativeMethods.SB_GETTEXTW, _item, len);
777
return GetBoundingRectangle(
_hwnd
).ToRect(false);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (30)
164
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref HitTestInfo.pt, 1))
168
index = XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
184
int item = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
251
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (
_hwnd
, NativeMethods.GA_PARENT);
320
if (!XSendMessage.GetItem(
_hwnd
, index, ref item))
332
return new HeaderItem (
_hwnd
, this, index);
340
return HeaderItemCount (
_hwnd
);
436
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
470
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
491
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
492
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
533
if (Misc.IsComctrlV6OnOsVerV6orHigher(
_hwnd
))
535
int item = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
555
int index = OrderToIndex (
_hwnd
, _item);
564
return XSendMessage.GetItemText(
_hwnd
, index, hdi);
572
int index = OrderToIndex (
_hwnd
, _item);
578
result = XSendMessage.XSend(
_hwnd
, NativeMethods.HDM_GETITEMRECT, new IntPtr(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero);
583
if (!Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref rectW32, 2))
596
if (Misc.IsLayoutRTL(
_hwnd
))
647
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
) || !SafeNativeMethods.IsWindowVisible (
_hwnd
) || HeaderIsHidden (
_hwnd
))
678
return Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1);
689
if (XSendMessage.GetItem(
_hwnd
, _item, ref item))
703
int item = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
718
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
730
Rect rect = XSendMessage.GetItemRect(
_hwnd
, NativeMethods.HDM_GETITEMDROPDOWNRECT, _item);
737
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
738
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
747
if (Misc.GetFocusedWindow().Equals(
_hwnd
))
MS\Internal\AutomationProxies\WindowsTab.cs (53)
50
_fIsContent = IsValidControl(
_hwnd
);
152
return IsValidControl(
_hwnd
);
188
int count = GetItemCount(
_hwnd
);
211
int count = GetItemCount(
_hwnd
);
234
int count = GetItemCount(
_hwnd
);
247
int count = GetItemCount(
_hwnd
);
264
if (!Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref hti.pt, 1))
281
index = XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType()));
295
int focusIndex = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero);
297
if (focusIndex >= 0 && focusIndex < GetItemCount(
_hwnd
))
372
for (int i = 0, c = GetItemCount(
_hwnd
); i < c; i++)
374
if (sTitle == WindowsTabItem.GetName(
_hwnd
, i, true))
393
if (!WindowsTab.SupportMultipleSelection (
_hwnd
))
395
int selectedItem = WindowsTabItem.GetCurrentSelectedItem(
_hwnd
);
437
return SupportMultipleSelection (
_hwnd
);
457
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
481
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
522
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
581
if (!Misc.GetWindowRect(
_hwnd
, ref viewable))
679
return new WindowsTabItem(
_hwnd
, this, index, _windowsForms == WindowsFormsHelper.FormControlState.True);
700
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
705
return GetUpDownHwnd(
_hwnd
) != IntPtr.Zero;
754
return GetUpDownHwnd(
_hwnd
);
857
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
916
_fIsContent = !string.IsNullOrEmpty(GetName(
_hwnd
, _item, true));
959
return Misc.AccessKey(WindowsTabItem.GetItemText(
_hwnd
, _item));
963
return !string.IsNullOrEmpty(GetName(
_hwnd
, _item, true));
974
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
975
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _item);
985
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
994
return GetName(
_hwnd
, _item, _windowsForms == WindowsFormsHelper.FormControlState.True);
1011
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
1066
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1086
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1104
if (WindowsTab.SupportMultipleSelection(
_hwnd
) == true)
1129
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1141
if (WindowsTab.SupportMultipleSelection(
_hwnd
) == true)
1157
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero);
1170
if (!WindowsTab.SupportMultipleSelection(
_hwnd
))
1172
int selectedItem = GetCurrentSelectedItem(
_hwnd
);
1183
if (!XSendMessage.GetItem(
_hwnd
, _item, ref TCItem))
1211
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1263
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item;
1280
if (!XSendMessage.XSend(
_hwnd
, NativeMethods.TCM_GETITEMRECT, new IntPtr(_item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero))
1285
return Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty;
1290
return (SafeNativeMethods.IsWindowEnabled(
_hwnd
) && SafeNativeMethods.IsWindowVisible(
_hwnd
));
1305
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
1307
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1308
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1314
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
1324
IntPtr hwndParent =
_hwnd
;
1333
string sName = WindowsTabItem.GetName(
_hwnd
, _item, true);
MS\Internal\AutomationProxies\WindowsTitleBar.cs (12)
62
return Misc.GetTitleBarRect(
_hwnd
);
70
return new int [] { 4, unchecked((int)(long)
_hwnd
), _item };
78
return Misc.ProxyGetText(
_hwnd
);
116
int hit = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y));
137
WindowsMenu sysmenu = WindowsMenu.CreateSystemMenu(
_hwnd
, this);
165
return WindowsMenu.CreateSystemMenu (
_hwnd
, this);
171
return new TitleBarButton (
_hwnd
, this, item);
203
Misc.ProxyGetTitleBarInfo(
_hwnd
, out ti);
363
Rect[] rects = Misc.GetTitlebarRects(
_hwnd
);
407
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
436
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero);
450
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (30)
217
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (ToolbarItem.GetBoundingRectangle (
_hwnd
, item));
235
int focusIndex = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero);
239
Accessible acc = Accessible.CreateNativeFromEvent(
_hwnd
, NativeMethods.OBJID_CLIENT, NativeMethods.CHILD_SELF);
245
return new WindowsToolbarAsMenu(
_hwnd
, this, focusIndex, acc);
249
return new WindowsToolbar(
_hwnd
, this, focusIndex);
264
string name = Misc.ProxyGetText(
_hwnd
);
300
if (!XSendMessage.GetItem(
_hwnd
, item, ref tbb))
306
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0)
308
Accessible acc = Accessible.CreateNativeFromEvent(
_hwnd
, NativeMethods.OBJID_CLIENT, item + 1);
313
return new ToolbarItemAsMenuItem(
_hwnd
, this, item, tbb.idCommand, acc);
317
return new ToolbarItem(
_hwnd
, this, item, tbb.idCommand);
336
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero);
369
if (XSendMessage.GetItem(
_hwnd
, _item, ref tbb))
375
bool hasImageList = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0;
376
int exStyle = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero);
387
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
435
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
458
return GetBoundingRectangle(
_hwnd
, _item);
475
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0;
521
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero);
583
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item;
605
int len = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero);
608
return XSendMessage.GetItemText(
_hwnd
, NativeMethods.TB_GETBUTTONTEXT, _idCommand, len);
631
if (XSendMessage.GetItem(
_hwnd
, _item, ref tbb))
642
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
643
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _idCommand);
649
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
)
650
|| Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
657
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
684
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
74
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
80
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (2)
190
string className = Misc.ProxyGetClassName(
_hwnd
);
203
return Misc.ProxyGetText(
_hwnd
);
MS\Internal\AutomationProxies\WindowsTreeView.cs (79)
162
IntPtr hNext = GetNextItem (
_hwnd
, ((TreeViewItem) child)._hItem);
165
return new TreeViewItem (
_hwnd
, this, hNext, (int) TVItem.TopLevel);
189
IntPtr hPrev = GetPreviousItem (
_hwnd
, ((TreeViewItem) child)._hItem);
191
return hPrev != IntPtr.Zero ? new TreeViewItem (
_hwnd
, this, hPrev, (int) TVItem.TopLevel) : null;
195
IntPtr hChild = GetRoot (
_hwnd
);
202
for (temp = GetNextItem (
_hwnd
, hChild); temp != IntPtr.Zero; temp = GetNextItem (
_hwnd
, hChild))
207
return new TreeViewItem (
_hwnd
, this, hChild, (int) TVItem.TopLevel);
218
hChild = GetRoot (
_hwnd
);
239
IntPtr hChild = GetRoot (
_hwnd
);
244
for (IntPtr temp = GetNextItem (
_hwnd
, hChild); temp != IntPtr.Zero; temp = GetNextItem (
_hwnd
, hChild))
258
IntPtr hItem = XSendMessage.HitTestTreeView(
_hwnd
, x, y);
269
IntPtr treeItem = GetSelection (
_hwnd
);
286
IntPtr treeItem = GetSelection(
_hwnd
);
309
return (IntPtr.Zero != GetSelection (
_hwnd
));
382
return new TreeViewItem (
_hwnd
, this, hItem, depth);
387
return CreateParents (
_hwnd
, hItem);
752
return IsItemExpanded (
_hwnd
, _hItem) ? NextSibling (child) : null;
761
return IsItemExpanded (
_hwnd
, _hItem) ? PreviousSibling (child) : null;
768
return IsItemExpanded (
_hwnd
, _hItem) ? FirstChild () : null;
775
return IsItemExpanded (
_hwnd
, _hItem) ? LastChild () : null;
796
else if (iid == ScrollItemPattern.Pattern && WindowScroll.IsScrollable(
_hwnd
))
819
if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 && Misc.IsWindowInGivenProcess(
_hwnd
, "explorer"))
822
_nativeAcc = Accessible.CreateNativeFromEvent(
_hwnd
, NativeMethods.OBJID_CLIENT, childId);
842
return WindowsTreeView.GetItemRect(
_hwnd
, _hItem, true).ToRect(false);
851
NativeMethods.Win32Rect itemRect = GetItemRect(
_hwnd
, _hItem, true);
854
if (!Misc.IsItemVisible(
_hwnd
, ref itemRect))
870
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
871
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _item);
932
return WindowsTreeView.SelectItem (
_hwnd
, _hItem);
948
return new int [4] { ProxySimple.Win32ProviderRuntimeIdBase, unchecked((int)(long)
_hwnd
), highPart, lowPart };
952
return new int[3] { ProxySimple.Win32ProviderRuntimeIdBase, (int)
_hwnd
, (int)_hItem };
964
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
984
if (!WindowsTreeView.SelectItem(
_hwnd
, _hItem))
995
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1013
if (selectionRequired || WindowsTreeView.GetSelection(
_hwnd
) != IntPtr.Zero)
1020
if (!WindowsTreeView.SelectItem(
_hwnd
, _hItem))
1030
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1080
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1100
WindowsTreeView.Expand (
_hwnd
, _hItem);
1109
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1125
WindowsTreeView.Collapse (
_hwnd
, _hItem);
1151
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1158
if (!WindowsTreeView.SetItemText(
_hwnd
, _hItem, val))
1191
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1204
WindowsTreeView.SetCheckState(
_hwnd
, _hItem, GetToggleState() != ToggleState.On);
1226
if (!WindowScroll.IsScrollable(
_hwnd
))
1231
Misc.SetFocus(
_hwnd
);
1235
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem);
1288
int selected = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED));
1311
if (!WindowsTreeView.IsItemExpanded (
_hwnd
, current._hItem))
1323
IntPtr hNext = WindowsTreeView.GetNextItem (
_hwnd
, ((TreeViewItem) child)._hItem);
1325
return hNext != IntPtr.Zero ? new TreeViewItem(
_hwnd
, this, hNext, _item + 1) : null;
1333
IntPtr hPrev = WindowsTreeView.GetPreviousItem (
_hwnd
, ((TreeViewItem) child)._hItem);
1335
return hPrev != IntPtr.Zero ? new TreeViewItem(
_hwnd
, this, hPrev, _item + 1) : null;
1341
IntPtr hChild = WindowsTreeView.GetFirstChild (
_hwnd
, _hItem);
1343
return hChild != IntPtr.Zero ? new TreeViewItem(
_hwnd
, this, hChild, _item + 1) : null;
1349
if (!IsItemExpanded (
_hwnd
, _hItem))
1354
IntPtr hChild = WindowsTreeView.GetFirstChild (
_hwnd
, _hItem);
1359
for (IntPtr temp = WindowsTreeView.GetNextItem (
_hwnd
, hChild); temp != IntPtr.Zero; temp = WindowsTreeView.GetNextItem (
_hwnd
, hChild))
1364
return new TreeViewItem(
_hwnd
, this, hChild, _item + 1);
1373
bool expanded = WindowsTreeView.IsItemExpanded (
_hwnd
, _hItem);
1381
bool hasChildren = WindowsTreeView.TreeViewItem_HasChildren (
_hwnd
, _hItem);
1410
state = (WindowsTreeView.CheckState)WindowsTreeView.GetCheckState(
_hwnd
, _hItem);
1461
NativeMethods.Win32Rect rectItem = WindowsTreeView.GetItemRect(
_hwnd
, _hItem, true);
1472
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
1487
int selected = WindowsTreeView.GetItemState(
_hwnd
, _hItem, NativeMethods.TVIS_SELECTED);
1507
isCheckbox = WindowsTreeView.CheckState.NoCheckbox != (WindowsTreeView.CheckState)WindowsTreeView.GetCheckState(
_hwnd
, _hItem);
1536
return WindowsTreeView.GetItemText (
_hwnd
, _hItem);
1544
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1545
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1551
if (WindowsTreeView.GetItem(
_hwnd
, _hItem, NativeMethods.TVIF_IMAGE | NativeMethods.TVIF_STATE, out treeItem))
1572
IntPtr address = UnsafeNativeMethods.GetProp(
_hwnd
, "MSAAStateImageMapAddr");
1578
int numStates = unchecked((int)UnsafeNativeMethods.GetProp(
_hwnd
, "MSAAStateImageMapCount"));
1591
using (SafeProcessHandle hProcess = new SafeProcessHandle(
_hwnd
))
1633
return UnsafeNativeMethods.GetProp(
_hwnd
, "MSAAStateImageMapAddr") != IntPtr.Zero;
1643
int childId = Misc.ProxySendMessageInt(
_hwnd
, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (21)
101
return new SpinButtonItem(
_hwnd
, IsSpinnerElement()? _parent : this, (int)item);
126
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
) && IsWinformUpdown(
_hwnd
))
192
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SpinButtonItem.GetBoundingRectangle (
_hwnd
, item));
211
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
))
231
Misc.ProxySendMessage(
_hwnd
, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0));
234
Misc.ProxySendMessage(HwndBuddy(
_hwnd
), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
297
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
348
int pos = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
375
IntPtr hwndBuddy = HwndBuddy(
_hwnd
);
385
int range = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
399
int range = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
472
return GetBoundingRectangle(
_hwnd
, (WindowsUpDown.SpinItem)_item);
516
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
531
if (IsHorizontal(
_hwnd
) && Misc.IsLayoutRTL(
_hwnd
))
537
Rect rc = GetBoundingRectangle(
_hwnd
, (WindowsUpDown.SpinItem)item);
540
if (!Misc.GetWindowRect(
_hwnd
, ref updownRect))
550
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center);
551
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center);
628
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
MS\Internal\AutomationProxies\WinFormsSpinner.cs (4)
316
return new WinformsSpinnerEdit(
_hwnd
, _elEdit.
_hwnd
, _elUpDown.
_hwnd
, _parent, _item);
434
return _elEdit.
_hwnd
== hwnd;