1 write to _hwnd
UIAutomationClientSideProviders (1)
MS\Internal\AutomationProxies\ProxySimple.cs (1)
60
_hwnd
= hwnd;
848 references to _hwnd
UIAutomationClientSideProviders (848)
MS\Internal\AutomationProxies\NonClientArea.cs (27)
209
int hit = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
231
WindowsTitleBar tb = new WindowsTitleBar(
_hwnd
, this, 0);
305
return new int [] { 1, unchecked((int)(long)
_hwnd
) };
311
if (iid == ScrollPattern.Pattern && WindowScroll.HasScrollableStyle(
_hwnd
))
356
WindowScroll.SetScrollPercent (
_hwnd
, horizontalPercent, verticalPercent, true);
362
WindowScroll.Scroll (
_hwnd
, horizontalAmount, verticalAmount, true);
370
return (double) WindowScroll.GetPropertyScroll (ScrollPattern.HorizontalScrollPercentProperty,
_hwnd
);
379
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalScrollPercentProperty,
_hwnd
);
388
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalViewSizeProperty,
_hwnd
);
397
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalViewSizeProperty,
_hwnd
);
406
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.HorizontallyScrollableProperty,
_hwnd
);
415
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.VerticallyScrollableProperty,
_hwnd
);
461
if (WindowsScrollBar.HasHorizontalScrollBar (
_hwnd
))
465
if (Misc.ProxyGetClassName(
_hwnd
) == "SysListView32")
466
return new WindowsListViewScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_HORZ);
468
return new WindowsScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_HORZ);
473
if (WindowsScrollBar.HasVerticalScrollBar (
_hwnd
))
477
if (Misc.ProxyGetClassName(
_hwnd
) == "SysListView32")
478
return new WindowsListViewScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_VERT);
480
return new WindowsScrollBar (
_hwnd
, this, (int) item, NativeMethods.SB_VERT);
487
if (WindowsTitleBar.HasTitleBar (
_hwnd
))
489
return new WindowsTitleBar (
_hwnd
, this, (int) item);
504
if (WindowsGrip.IsGripPresent(
_hwnd
, false))
506
return new WindowsGrip(
_hwnd
, this, (int)item);
539
IntPtr menu = UnsafeNativeMethods.GetMenu(
_hwnd
);
542
menuProxy = new WindowsMenu(
_hwnd
, this, menu, WindowsMenu.MenuType.Toplevel, (int)NonClientItem.Menu);
579
if (Misc.IsLayoutRTL(
_hwnd
))
MS\Internal\AutomationProxies\ProxyHwnd.cs (15)
88
WinEventTracker.AddToNotificationList (
_hwnd
, _createOnEvent, aEvents, cEvents);
118
WinEventTracker.RemoveToNotificationList (
_hwnd
, aEvents, null, cEvents);
129
return PtInClientRect (
_hwnd
, x, y) ? this : null;
139
accessKey = GetLabelAccessKey(
_hwnd
);
153
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
155
string sPersistentID = WindowsFormsHelper.WindowsFormsID (
_hwnd
);
163
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
182
IntPtr label = Misc.GetLabelhwnd(
_hwnd
);
191
name = Misc.ProxyGetText(
_hwnd
);
216
_controlLabel = Misc.GetLabelhwnd(
_hwnd
);
229
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
234
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
261
int idChild = Misc.GetWindowId(
_hwnd
);
262
string text = Misc.GetItemToolTipText(
_hwnd
, IntPtr.Zero, idChild);
265
text = Misc.GetItemToolTipText(
_hwnd
, IntPtr.Zero, 0);
MS\Internal\AutomationProxies\ProxySimple.cs (22)
92
if (
_hwnd
== IntPtr.Zero)
99
if (!Misc.GetWindowRect(
_hwnd
, ref controlRectangle))
152
id[1] =
_hwnd
.ToInt32();
166
if (
_hwnd
== IntPtr.Zero || (GetParent() != null && GetParent().
_hwnd
==
_hwnd
))
171
return AutomationInteropProvider.HostProviderFromHandle(
_hwnd
);
206
return Misc.IsEnabled(
_hwnd
);
217
Misc.GetWindowThreadProcessId(
_hwnd
, out pid);
239
return Misc.GetFocusedWindow() ==
_hwnd
? IsFocused() : false;
259
return WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
) ? "WinForm" : "Win32";
268
if (Misc.GetFocusedWindow() ==
_hwnd
&& IsFocused())
274
if (SafeNativeMethods.IsWindowVisible(
_hwnd
) && (bool)GetElementProperty(AutomationElement.IsEnabledProperty))
340
string sRawName = Misc.GetControlName(
_hwnd
, false);
389
EventManager.DispatchEvent(this,
_hwnd
, eventId, idProp, idObject);
529
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
579
Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref rcOutside);
603
return ClickablePoint.GetPoint(
_hwnd
, alIn, alOut, ref pt);
639
_IAccessible = Accessible.AccessibleObjectFromWindow(
_hwnd
, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK ? acc.IAccessible : null;
655
return
_hwnd
;
664
return Misc.GetWindowStyle(
_hwnd
);
673
return Misc.GetWindowExStyle(
_hwnd
);
MS\Internal\AutomationProxies\WindowsAltTab.cs (8)
37
GetAltTabInfo(
_hwnd
, 0, ref _altTabInfo, null);
127
if (Misc.MapWindowPoints(System.IntPtr.Zero,
_hwnd
, ref pt, 1))
131
if(Misc.GetClientRect(
_hwnd
, ref clientRect))
192
altTabItem = new WindowsAltTabItem(
_hwnd
, this, item);
211
if (GetAltTabInfo(
_hwnd
, -1, ref altTabInfo, null))
342
return GetBoundingRect().ToRect(Misc.IsControlRTL(
_hwnd
));
355
if (WindowsAltTab.GetAltTabInfo(
_hwnd
, _item, ref altTabInfo, itemText))
387
if(!Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (22)
253
if (!WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms) && IsStartButton())
258
return Misc.AccessKey(Misc.ProxyGetText(
_hwnd
));
264
return SafeNativeMethods.IsWindowVisible(
_hwnd
);
393
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
465
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
474
Misc.SetFocus(
_hwnd
);
498
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero);
512
Misc.ProxySendMessage(
_hwnd
, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true);
519
Misc.ProxySendMessage(
_hwnd
, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true);
553
if (!Misc.GetClassName(
_hwnd
).Equals("Button"))
561
return Misc.InTheShellProcess(
_hwnd
) && UnsafeNativeMethods.GetProp(
_hwnd
, "StartButtonTag") == new IntPtr(304);
565
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
579
if (!Misc.GetClassName(
_hwnd
).Equals("Button"))
584
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
599
IntPtr hwndParent =
_hwnd
;
644
int state = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero);
667
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
669
Misc.EnumChildWindows(
_hwnd
, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound);
698
return Misc.StripMnemonic(Misc.ProxyGetText(
_hwnd
));
704
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
707
Misc.EnumChildWindows(
_hwnd
, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton);
MS\Internal\AutomationProxies\WindowsComboBox.cs (34)
120
if (GetDroppedState (
_hwnd
))
126
if (GetComboInfo(
_hwnd
, ref cbInfo))
141
return rcCombo.ToRect(Misc.IsControlRTL(
_hwnd
));
150
if (Misc.GetClassName(
_hwnd
).Equals("Internet Explorer_TridentCmboBx"))
252
if (GetComboInfo(
_hwnd
, ref cbInfo))
255
if (Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref cbInfo.rcButton, 2))
259
return new WindowsComboButton(
_hwnd
, this, (int)ComboChildren.Button);
296
if (GetComboInfo(
_hwnd
, ref cbInfo))
333
if (GetComboInfo(
_hwnd
, ref cbInfo))
372
Misc.CheckEnabled(
_hwnd
);
377
if (GetComboInfo(
_hwnd
, ref cbInfo) && SafeNativeMethods.IsWindowVisible(cbInfo.hwndItem))
387
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
390
int id = Misc.GetWindowId(
_hwnd
);
393
Misc.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam,
_hwnd
);
415
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
440
Misc.CheckEnabled(
_hwnd
);
442
if (GetDroppedState (
_hwnd
))
448
Expand (
_hwnd
);
454
Misc.CheckEnabled(
_hwnd
);
456
if (!GetDroppedState (
_hwnd
))
462
Collapse(
_hwnd
);
469
return (GetDroppedState (
_hwnd
)) ? ExpandCollapseState.Expanded : ExpandCollapseState.Collapsed;
497
IntPtr hwndToAsk = IsComboBoxEx32() ? _hwndEx :
_hwnd
;
628
return Misc.ProxyGetText(IsComboBoxEx32() ? _hwndEx :
_hwnd
);
634
IntPtr hwnd = IsComboBoxEx32() ? _hwndEx :
_hwnd
;
644
if (GetComboInfo(
_hwnd
, ref cbInfo) && cbInfo.stateButton != NativeMethods.STATE_SYSTEM_INVISIBLE)
646
return new WindowsComboButton (
_hwnd
, this, (int) ComboChildren.Button);
656
if (GetComboInfo(
_hwnd
, ref cbInfo) && (IntPtr.Zero != cbInfo.hwndList))
917
if (!WindowsComboBox.GetComboInfo(
_hwnd
, ref cbInfo))
921
if (!Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref cbInfo.rcButton, 2))
948
Misc.CheckEnabled(
_hwnd
);
950
if (!WindowsComboBox.GetDroppedState (
_hwnd
))
952
WindowsComboBox.Expand (
_hwnd
);
956
WindowsComboBox.Collapse (
_hwnd
);
MS\Internal\AutomationProxies\WindowsEditBox.cs (21)
149
for (IntPtr hwnd =
_hwnd
;
162
if (IsInsideOfIPAddress(
_hwnd
))
217
IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(
_hwnd
);
220
return new WindowsSpinner(hwndUpDown,
_hwnd
, _parent, _item);
228
IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(
_hwnd
);
231
return new WindowsSpinner(hwndUpDown,
_hwnd
, _parent, _item);
239
IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(
_hwnd
);
242
return new WindowsSpinner(hwndUpDown,
_hwnd
, _parent, _item);
266
Misc.CheckEnabled(
_hwnd
);
290
int result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
298
result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
580
return Misc.ProxyGetText(
_hwnd
, GetTextLength());
596
if (Misc.GetClientRect(
_hwnd
, ref rect) && !rect.IsEmpty)
721
if (Misc.GetClientRect(
_hwnd
, ref rect) && !rect.IsEmpty)
853
IntPtr hdc = Misc.GetDC(
_hwnd
);
873
Misc.ReleaseDC(
_hwnd
, hdc);
886
return Text(
_hwnd
);
891
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
901
if (WindowsComboBox.GetComboInfo(hwndParent, ref cbInfo) && cbInfo.hwndItem ==
_hwnd
)
911
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
922
return WindowsSpinner.IsSpinnerEdit(
_hwnd
);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (8)
80
Misc.SetFocus(_provider.
_hwnd
);
301
Misc.SetFocus(_provider.
_hwnd
);
355
Misc.SetFocus(_provider.
_hwnd
);
419
Misc.SetFocus(_provider.
_hwnd
);
438
Misc.SetFocus(_provider.
_hwnd
);
455
Misc.SetFocus(_provider.
_hwnd
);
478
Misc.SetFocus(_provider.
_hwnd
);
484
if (Misc.IsReadingRTL(_provider.
_hwnd
))
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (4)
96
Misc.SetFocus(
_hwnd
);
113
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
118
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
123
Misc.SetFocus(
_hwnd
);
MS\Internal\AutomationProxies\WindowsGrip.cs (4)
48
if (IsGripPresent(
_hwnd
, false))
51
if (Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref client))
53
NativeMethods.SIZE sizeGrip = GetGripSize(
_hwnd
, false);
55
if (Misc.IsLayoutRTL(
_hwnd
))
MS\Internal\AutomationProxies\WindowsHyperlink.cs (12)
116
return Misc.StripMnemonic(RemoveHTMLAnchorTag(Misc.ProxyGetText(
_hwnd
)));
201
if (!Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref HitTestInfo.pt, 1))
216
bGetItemResult = XSendMessage.XSend(
_hwnd
, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
261
return new WindowsHyperlinkItem(
_hwnd
, this, index);
281
return XSendMessage.XSend(
_hwnd
, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM));
400
return XSendMessage.XSend(
_hwnd
, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType()));
427
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
432
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
441
if (!Misc.GetWindowRect(
_hwnd
, ref BoundingRect))
497
bGetItemResult = XSendMessage.XSend(
_hwnd
, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
509
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
510
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (12)
117
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
138
Misc.ProxySendMessage(
_hwnd
, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4));
153
return Misc.ProxyGetText(
_hwnd
, IP_ADDRESS_STRING_LENGTH);
161
return !Misc.IsEnabled(
_hwnd
);
243
IntPtr hwndChild = Misc.GetWindow(
_hwnd
, NativeMethods.GW_CHILD);
260
IntPtr hwndChild = Misc.GetWindow(
_hwnd
, NativeMethods.GW_CHILD);
351
return Misc.ProxyGetText(
_hwnd
);
363
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
381
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
389
string s = WindowsEditBox.Text(
_hwnd
);
402
return !SafeNativeMethods.IsWindowEnabled(
_hwnd
);
476
return WindowsIPAddress.Create(Misc.GetParent(
_hwnd
), 0, 0);
MS\Internal\AutomationProxies\WindowsListBox.cs (52)
151
else if (iid == ScrollPattern.Pattern && WindowScroll.HasScrollableStyle(
_hwnd
))
154
IScrollProvider scroll = NonClientArea.Create(
_hwnd
, 0) as IScrollProvider;
171
return IsParentedByCombo() || SafeNativeMethods.IsWindowVisible(
_hwnd
);
180
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
288
Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref listboxrect);
291
int ret = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top));
306
int index = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero);
342
if (ListboxItem.IsSelected(
_hwnd
, itemPos))
381
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0;
423
return new ListboxItem (
_hwnd
, this, index);
431
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero);
544
if (i != skipItem && ListboxItem.IsSelected(
_hwnd
, i))
556
int result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero);
567
for (i = 0, count = Length; i < count && !ListboxItem.IsSelected (
_hwnd
, i); i++)
580
if (i != skipItem && ListboxItem.IsSelected (
_hwnd
, i))
597
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR;
610
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
))
682
else if (iid == ScrollItemPattern.Pattern && WindowScroll.IsScrollable(
_hwnd
))
720
int iTextLen = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero);
724
if (Misc.GetClassName(
_hwnd
).Equals("Internet Explorer_TridentLstBox"))
731
return XSendMessage.GetItemText(
_hwnd
, NativeMethods.WM_USER + NativeMethods.LB_GETTEXT, _item, iTextLen);
735
string text = Misc.GetUnsafeText(
_hwnd
, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen);
762
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
769
bool itemSelected = IsSelected (
_hwnd
, _item);
819
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
825
if (ListboxItem.IsSelected (
_hwnd
, _item) && !_listBox.IsParentedByCombo())
871
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
876
if (!IsSelected(
_hwnd
, _item))
891
if (!UnSelect(
_hwnd
, _item))
902
return ListboxItem.IsSelected (
_hwnd
, _item);
922
if (_listBox._parentedByCombo && !SafeNativeMethods.IsWindowVisible(
_hwnd
))
927
if (!WindowScroll.IsScrollable(
_hwnd
))
933
Misc.ProxySendMessage(
_hwnd
, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero);
944
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
948
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
1007
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR;
1011
return Select (
_hwnd
, _item, false);
1032
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item;
1036
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0;
1053
Misc.ProxySendMessage(
_hwnd
, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect);
1054
return Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty;
1067
_windowsForms = WindowsFormsHelper.GetControlState(
_hwnd
);
1122
Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item));
1127
Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1137
int listBoxStyle = Misc.GetWindowStyle(
_hwnd
);
1141
int idListBox = Misc.GetWindowId(
_hwnd
);
1145
IntPtr hwndListBoxParent = Misc.GetParent(
_hwnd
);
1149
hwndListBoxParent, NativeMethods.WM_COMMAND, wParam,
_hwnd
);
1157
Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1161
int id = Misc.GetWindowId(
_hwnd
);
1165
Misc.ProxySendMessageInt(combo.
_hwnd
, NativeMethods.WM_COMMAND, wParam,
_hwnd
);
MS\Internal\AutomationProxies\WindowsListView.cs (82)
87
WinEventTracker.AddToNotificationList (
_hwnd
, new WinEventTracker.ProxyRaiseEvents (WindowsListView.GroupSpecificEvents), _groupEvents, 3);
171
(IsDetailMode (
_hwnd
) ||
172
IsImplementingGrid (
_hwnd
) && GetItemCount (
_hwnd
) > 0))
183
if (iid == TablePattern.Pattern && IsDetailMode (
_hwnd
))
197
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
204
count = GetItemCount (
_hwnd
);
231
_groupsCollection.EnsureCreation (
_hwnd
);
233
GroupManager manager = _groupsCollection[
_hwnd
];
265
if (IsGroupViewEnabled (
_hwnd
))
268
_groupsCollection.EnsureCreation (
_hwnd
);
271
GroupManager manager = _groupsCollection [
_hwnd
];
310
int count = GetItemCount (
_hwnd
);
328
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
329
int itemCount = GetItemCount(
_hwnd
);
341
_groupsCollection.EnsureCreation(
_hwnd
);
343
GroupManager manager = _groupsCollection[
_hwnd
];
363
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
370
_groupsCollection.EnsureCreation (
_hwnd
);
372
GroupManager manager = _groupsCollection [
_hwnd
];
387
int count = GetItemCount (
_hwnd
);
397
if (PtInListViewHeader (x, y) || !PtInClientRect (
_hwnd
, x, y))
403
if (IsGroupViewEnabled (
_hwnd
))
405
_groupsCollection.EnsureCreation (
_hwnd
);
408
GroupManager manager = WindowsListView._groupsCollection [
_hwnd
];
417
ProxyFragment group = new WindowsListViewGroup (
_hwnd
, this, groupID);
423
NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest(
_hwnd
, new NativeMethods.Win32Point(x, y));
430
else if (hitTest.flags == NativeMethods.LVHT_NOWHERE && IsDetailMode(
_hwnd
))
448
hitTest = WindowsListView.SubitemHitTest(
_hwnd
, new NativeMethods.Win32Point(x, y));
465
if (IsGroupViewEnabled (
_hwnd
))
467
_groupsCollection.EnsureCreation (
_hwnd
);
468
return WindowsListViewGroup.GetFocusInGroup (
_hwnd
, this);
472
int index = GetItemNext(
_hwnd
, -1, NativeMethods.LVNI_FOCUSED);
495
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
509
WinEventTracker.AddToNotificationList(
_hwnd
, _createOnEvent, aEvents, 1);
524
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
538
WinEventTracker.AddToNotificationList(
_hwnd
, _createOnEvent, aEvents, 1);
551
int count = GetItemCount (
_hwnd
);
552
int countSelection = MultiSelected(
_hwnd
) ? GetSelectedItemCount(
_hwnd
) : 1;
563
for (int itemPos = GetItemNext(
_hwnd
, -1, NativeMethods.LVNI_SELECTED); itemPos != -1; itemPos = GetItemNext(
_hwnd
, itemPos, NativeMethods.LVNI_SELECTED))
583
return MultiSelected (
_hwnd
);
604
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
609
WindowScroll.Scroll (
_hwnd
, horizontalAmount, verticalAmount, true);
615
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
621
int size = ApproximateViewRect (
_hwnd
);
640
fScrollSuccess = Scroll(
_hwnd
, (IntPtr)dx, (IntPtr)dy);
647
if (fScrollSuccess && (((int)horizontalPercent != (int)ScrollPattern.NoScroll && (int)horizontalPercent != (int)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalScrollPercentProperty,
_hwnd
))
648
|| ((int)verticalPercent != (int)ScrollPattern.NoScroll && (int)verticalPercent != (int)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalScrollPercentProperty,
_hwnd
))))
656
Scroll(
_hwnd
, (IntPtr)dx, (IntPtr)dy);
676
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalScrollPercentProperty,
_hwnd
);
686
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalScrollPercentProperty,
_hwnd
);
696
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.HorizontalViewSizeProperty,
_hwnd
);
706
return (double)WindowScroll.GetPropertyScroll(ScrollPattern.VerticalViewSizeProperty,
_hwnd
);
716
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.HorizontallyScrollableProperty,
_hwnd
);
725
return (bool) WindowScroll.GetPropertyScroll (ScrollPattern.VerticallyScrollableProperty,
_hwnd
);
737
int maxRow = GetRowCount (
_hwnd
);
738
int maxColumn = GetColumnCount (
_hwnd
);
751
if (IsDetailMode (
_hwnd
))
763
return GetRowCount (
_hwnd
);
771
return GetColumnCount (
_hwnd
);
789
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
854
return new int [] { ListViewGetView (
_hwnd
) };
861
return ListViewGetView (
_hwnd
);
1544
return CheckBoxes (
_hwnd
) ? new int [] { NativeMethods.EventObjectNameChange, NativeMethods.EventObjectStateChange } : new int [] { NativeMethods.EventObjectNameChange };
1572
return new WindowsListViewGroup (
_hwnd
, this, groupID);
1581
bool hasGroup = IsGroupViewEnabled (
_hwnd
);
1583
if ((!hasGroup) && GetItemCount(
_hwnd
) > 0)
1591
_groupsCollection.EnsureCreation(
_hwnd
);
1593
GroupManager manager = _groupsCollection[
_hwnd
];
1609
return CreateListViewItemOrStartMenuItem(new WindowsListViewGroup(
_hwnd
, this, groupId), item);
1614
return new WindowsListViewGroup (
_hwnd
, this, item);
1628
ProxyFragment proxyFragment = new ListViewItemStartMenu(
_hwnd
, parent, item, AccessibleObject);
1637
return new ListViewItem(
_hwnd
, parent, item);
1644
string className = Misc.GetClassName(Misc.GetParent(
_hwnd
));
1668
if (!Misc.GetScrollBarInfo(
_hwnd
, scrollBar, ref scrollBarInfo) ||
1684
if (!Misc.GetScrollInfo(
_hwnd
, sbFlag, ref si) ||
1708
return new ListViewSubItem (
_hwnd
, lvItem, column, row);
1715
int itemCount = GetItemCount (
_hwnd
);
1718
if (IsListMode (
_hwnd
))
1832
IntPtr hwndHeader = ListViewGetHeader (
_hwnd
);
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (29)
58
else if (iid == ExpandCollapsePattern.Pattern && WindowsListView.IsGroupViewEnabled(
_hwnd
))
71
GroupManager manager = WindowsListView._groupsCollection [
_hwnd
];
102
return XSendMessage.GetItemText(
_hwnd
, group, NativeMethods.LVGF_HEADER);
113
return XSendMessage.GetItemText(
_hwnd
, group);
127
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
159
XSendMessage.GetGroupInfo(
_hwnd
, ref group); // ignore return code.
180
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
217
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
234
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
247
XSendMessage.GetGroupInfo(
_hwnd
, ref group); // ignore return code.
286
NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest (
_hwnd
, pt);
296
return new ListViewItem (
_hwnd
, this, hitTest.iItem);
307
XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType()));
312
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
329
int groupIndex = (int)Misc.ProxySendMessage(
_hwnd
, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
338
bool lresult = XSendMessage.XSend(
_hwnd
, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
362
int maxRow = GetRowCount (
_hwnd
, ID);
363
int maxColumn = GetColumnCount(
_hwnd
, ID);
375
if (WindowsListView.IsDetailMode (
_hwnd
))
387
return GetRowCount (
_hwnd
, ID);
395
return GetColumnCount (
_hwnd
, ID);
405
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
418
return IsCollapsed(
_hwnd
, _groupID);
592
return new ListViewItem (
_hwnd
, this, index);
614
if (!XSendMessage.SetGroupInfo(
_hwnd
, group))
625
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
632
return new ListViewSubItem (
_hwnd
, lvItem, column, lvitemIndex);
644
GroupManager.GroupInfo groupInfo = GetGroupInfo (
_hwnd
, ID);
828
return new ListViewGroupSubsetLink(
_hwnd
, this, item, _groupID);
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (4)
78
XSendMessage.XSend(
_hwnd
, NativeMethods.LVM_GETGROUPRECT, new IntPtr(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
79
Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref rect, 2);
95
XSendMessage.GetGroupInfo(
_hwnd
, ref groupInfo); // ignore return code.
111
return XSendMessage.GetItemText(
_hwnd
, group, NativeMethods.LVGF_SUBSET);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (83)
60
if (iid == InvokePattern.Pattern && WindowsListView.ListViewInvokable(
_hwnd
))
70
if (iid == ValuePattern.Pattern && WindowsListView.ListViewEditable (
_hwnd
))
75
if (iid == GridItemPattern.Pattern && IsImplementingGrid (
_hwnd
))
80
if (iid == TogglePattern.Pattern && IsItemWithCheckbox(
_hwnd
, _item))
85
if (iid == ScrollItemPattern.Pattern && WindowScroll.IsScrollable(
_hwnd
))
112
WindowsListView._groupsCollection.EnsureCreation (
_hwnd
);
114
GroupManager manager = WindowsListView._groupsCollection[
_hwnd
];
134
if (XSendMessage.XSend(
_hwnd
, NativeMethods.LVM_GETITEMINDEXRECT, new IntPtr(&ii), new IntPtr(&itemRectangle), Marshal.SizeOf(ii.GetType()), Marshal.SizeOf(itemRectangle.GetType())))
136
if (Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRectangle, 2))
148
if (WindowsListView.GetItemRect(
_hwnd
, _item, NativeMethods.LVIR_BOUNDS, out itemRectangle))
191
string text = GetText(
_hwnd
, _item, 0);
214
return WindowsListView.SetItemFocused (
_hwnd
, _item);
234
&& IsItemWithCheckbox(
_hwnd
, _item))
258
if (WindowsListView.IsDetailMode (
_hwnd
))
261
int countCol = GetSubItemCount (
_hwnd
);
278
if (IsItemWithCheckbox(
_hwnd
, _item) && item == 0)
282
else if (WindowsListView.IsDetailMode (
_hwnd
))
284
int countCol = GetSubItemCount (
_hwnd
);
297
if (IsItemWithCheckbox(
_hwnd
, _item))
301
else if (WindowsListView.IsDetailMode(
_hwnd
))
303
int countCol = GetSubItemCount (
_hwnd
);
316
if (WindowsListView.IsDetailMode (
_hwnd
))
318
int countCol = GetSubItemCount (
_hwnd
);
326
if (IsItemWithCheckbox(
_hwnd
, _item))
338
if (IsItemWithCheckbox (
_hwnd
, _item))
340
NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (
_hwnd
, _item);
344
return new ListViewItemCheckbox (
_hwnd
, this, _item, _checkbox);
348
if (WindowsListView.IsDetailMode (
_hwnd
))
351
return ListViewSubItem.ElementProviderFromPoint (
_hwnd
, this, _item, x, y);
363
int columns = ListViewItem.GetSubItemCount (
_hwnd
);
366
int column = (int)Misc.ProxySendMessage(
_hwnd
, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
385
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
391
if (!WindowsListView.MultiSelected (
_hwnd
) && WindowsListView.IsItemSelected (
_hwnd
, _item))
397
WindowsListView.UnselectAll (
_hwnd
);
400
if (!WindowsListView.SelectItem(
_hwnd
, _item))
410
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
416
if (WindowsListView.IsItemSelected (
_hwnd
, _item))
422
if (!WindowsListView.MultiSelected(
_hwnd
))
429
if (selectionRequired || WindowsListView.GetSelectedItemCount(
_hwnd
) > 0)
438
if (!WindowsListView.SelectItem(
_hwnd
, _item))
448
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
454
if (!WindowsListView.IsItemSelected (
_hwnd
, _item))
460
if (!WindowsListView.MultiSelected (
_hwnd
))
474
if (!WindowsListView.UnSelectItem(
_hwnd
, _item))
485
return WindowsListView.IsItemSelected (
_hwnd
, _item);
517
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
522
if (WindowsListView.Scrollable (
_hwnd
))
525
WindowsListView.EnsureVisible (
_hwnd
, _item, true);
546
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
551
SetValue(val,
_hwnd
, _item);
559
return ListViewItem.GetText (
_hwnd
, _item, 0);
568
return !WindowsListView.ListViewEditable (
_hwnd
);
581
if (WindowsListView.IsGroupViewEnabled (
_hwnd
))
587
if (WindowsListView.IsListMode (
_hwnd
))
589
int itemCount = WindowsListView.GetItemCount (
_hwnd
);
590
int rowCount = WindowsListView.GetRowCountListMode (
_hwnd
, itemCount);
596
int columnCount = WindowsListView.GetColumnCountOtherModes (
_hwnd
);
606
if (WindowsListView.IsGroupViewEnabled (
_hwnd
))
612
if (WindowsListView.IsListMode (
_hwnd
))
614
int itemCount = WindowsListView.GetItemCount (
_hwnd
);
615
int rowCount = WindowsListView.GetRowCountListMode (
_hwnd
, itemCount);
620
int columnCount = WindowsListView.GetColumnCountOtherModes (
_hwnd
);
658
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
664
if (!WindowsListView.Scrollable(
_hwnd
))
670
WindowsListView.EnsureVisible(
_hwnd
, _item, false);
842
return WindowsListView.IsItemFocused (
_hwnd
, _item);
850
IntPtr hwndHeader = WindowsListView.ListViewGetHeader(
_hwnd
);
856
&& Misc.GetClientRectInScreenCoordinates(
_hwnd
, ref listViewRect))
887
return new ListViewSubItem (
_hwnd
, this, index, _item);
892
return new ListViewItemCheckbox (
_hwnd
, this, _item, _checkbox);
919
if (!WindowsListView.GetItemRect(
_hwnd
, _item, NativeMethods.LVIR_LABEL, out itemRectangle))
924
if (WindowsListView.IsDetailMode (
_hwnd
) && !WindowsListView.FullRowSelect (
_hwnd
))
930
if (!Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
940
if (!WindowsListView.GetItemRect(
_hwnd
, _item, NativeMethods.LVIR_LABEL, out itemRectangle))
954
Misc.MouseClick(clickPoint.x, clickPoint.y, !WindowsListView.ListViewSingleClickActivate(
_hwnd
));
982
int groupID = GetGroupID (
_hwnd
, _item);
987
GroupManager.GroupInfo groupInfo = WindowsListViewGroup.GetGroupInfo (
_hwnd
, groupID);
996
int columnCount = WindowsListViewGroup.GetColumnCountExternal (
_hwnd
, groupID);
1015
int groupID = GetGroupID (
_hwnd
, _item);
1020
GroupManager.GroupInfo groupInfo = WindowsListViewGroup.GetGroupInfo (
_hwnd
, groupID);
1029
int columnCount = WindowsListViewGroup.GetColumnCountExternal (
_hwnd
, groupID);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (12)
64
return ListViewCheckBoxRect(
_hwnd
, _listviewItem).ToRect(false);
74
NativeMethods.Win32Rect itemRect = ListViewCheckBoxRect(
_hwnd
, _listviewItem);
80
if (Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect))
101
return WindowsListView.GetItemToolTipText(
_hwnd
);
110
string name = ListViewItem.GetText(
_hwnd
, _listviewItem, 0);
213
ListViewItem.CheckState current = (ListViewItem.CheckState) WindowsListView.GetCheckedState (
_hwnd
, _listviewItem);
240
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
245
Misc.SetFocus(
_hwnd
);
247
NativeMethods.Win32Rect rc = ListViewCheckBoxRect(
_hwnd
, _listviewItem);
250
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
253
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
254
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (9)
48
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)
56
if (iid == ValuePattern.Pattern && _item == 0 && WindowsListView.ListViewEditable (
_hwnd
))
80
if (!WindowsListView.GetSubItemRect (
_hwnd
, _itemParent, _item, lvir, out itemRectangle))
88
if (WindowsListView.FullRowSelect(
_hwnd
) && !WindowsListView.HasJustifyColumnsExStyle(
_hwnd
) &&
89
!WindowsListView.IsIconView(
_hwnd
) && _item == 0 && 1 < ListViewItem.GetSubItemCount(
_hwnd
))
93
if (!WindowsListView.GetSubItemRect(
_hwnd
, _itemParent, 1, NativeMethods.LVIR_BOUNDS, out itemRectangle1))
99
if (Misc.IsControlRTL(
_hwnd
))
109
if (ListViewItem.IsItemWithCheckbox (
_hwnd
, _itemParent))
111
NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (
_hwnd
, _itemParent);
114
if (Misc.IsControlRTL(
_hwnd
))
168
IntPtr ancestor =
_hwnd
;
190
return WindowsListView.GetItemToolTipText(
_hwnd
);
199
string name = ListViewItem.GetText(
_hwnd
, _itemParent, _item);
208
return WindowsListView.SetItemFocused (
_hwnd
, this._itemParent);
218
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
223
ListViewItem.SetValue (val,
_hwnd
, _itemParent);
231
return ListViewItem.GetText (
_hwnd
, _itemParent, _item);
239
return !WindowsListView.ListViewEditable (
_hwnd
);
252
if (!WindowsListView.IsGroupViewEnabled (
_hwnd
))
260
int groupID = ListViewItem.GetGroupID (
_hwnd
, _itemParent);
264
GroupManager.GroupInfo groupInfo = WindowsListViewGroup.GetGroupInfo (
_hwnd
, groupID);
327
IntPtr hwndHeader = WindowsListView.ListViewGetHeader (
_hwnd
);
373
if (Misc.IsComctrlV6OnOsVerV6orHigher(
_hwnd
))
375
int column = (int)Misc.ProxySendMessage(
_hwnd
, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
379
return WindowsListView.IsItemFocused (
_hwnd
, _itemParent);
MS\Internal\AutomationProxies\WindowsMenu.cs (31)
84
_expandedMenus[hwnd] = new MenuParentInfo(_parent.
_hwnd
, _parent._item, ((MenuItem)_parent)._menuType);
98
_expandedMenus[hwnd] = new MenuParentInfo(_parent.
_hwnd
, _parent._item, ((MenuItem)_parent)._menuType);
138
if (_type == MenuType.Submenu && GetHierarchyParent(
_hwnd
) == null && GetSystemPopupParent() != null)
339
return new int[] { 1, unchecked((int)(long)
_hwnd
), unchecked((int)(long)_hmenu) };
498
return new MenuItem(
_hwnd
, this, index, _hmenu, _type);
801
if (!GetMenuBarInfo(
_hwnd
, NativeMethods.OBJID_SYSMENU, 0, out mbi))
813
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(
_hwnd
)))
818
if (!Misc.ProxyGetTitleBarInfo(
_hwnd
, out ti))
831
if (GetMenuBarInfo(
_hwnd
, NativeMethods.OBJID_MENU, 0, out mbi))
1214
if (!SafeNativeMethods.IsWindowVisible (
_hwnd
) || _type == MenuItemType.Spacer)
1248
if (GetMenuBarInfo(
_hwnd
, NativeMethods.OBJID_SYSMENU, 0, out mbi))
1257
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(
_hwnd
)))
1262
if (!Misc.ProxyGetTitleBarInfo(
_hwnd
, out ti))
1275
if (Misc.GetMenuItemRect(
_hwnd
, _hmenu, _item, out rc))
1384
if (!Misc.IsEnabled(
_hwnd
))
1426
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
) || _type == MenuItemType.Spacer)
1445
if (hwndFocus != IntPtr.Zero && hwndFocus !=
_hwnd
)
2020
if (!SafeNativeMethods.IsWindowVisible (
_hwnd
))
2065
if (!SafeNativeMethods.IsWindowVisible(
_hwnd
))
2089
hwndSubMenu !=
_hwnd
;
2119
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' '));
2227
if (!SafeNativeMethods.IsWindowVisible (
_hwnd
))
2241
if (Misc.ProxyGetGUIThreadInfo(0, out gui) &&
_hwnd
== gui.hwndActive)
2257
return Misc.SetFocus(
_hwnd
);
2579
if (
_hwnd
== IntPtr.Zero)
2585
using (SafeProcessHandle hProcess = new SafeProcessHandle(
_hwnd
))
2644
return SafeNativeMethods.IsWindowEnabled(
_hwnd
);
2662
return new MenuItem(
_hwnd
, _parent, _item - 1, _hmenu, _menuType);
2677
return new MenuItem(
_hwnd
, _parent, nextItem, _hmenu, _menuType);
2713
if (new MenuItem (
_hwnd
, this._parent, i, _hmenu, _menuType).HotKey == chHotKey)
2928
return
_hwnd
;
MS\Internal\AutomationProxies\WindowsProgressbar.cs (3)
155
int cur = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
156
int min = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero);
157
int max = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (10)
124
if (!Misc.GetWindowRect(
_hwnd
, ref rebarRect))
187
return new RebarBandItem (
_hwnd
, this, index);
194
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero);
207
return XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType()));
280
return GetBoundingRectangle (
_hwnd
, _item);
289
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
290
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _item);
375
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
380
Misc.PostMessage(
_hwnd
, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero);
436
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)
163
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
174
if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
))
189
int result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
196
result = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
561
return Misc.ProxyGetText(
_hwnd
);
681
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (6)
65
Misc.SetFocus(_pattern.
_hwnd
);
251
Misc.SetFocus(_pattern.
_hwnd
);
269
Misc.SetFocus(_pattern.
_hwnd
);
301
Misc.SetFocus(_pattern.
_hwnd
);
323
Misc.SetFocus(_pattern.
_hwnd
);
347
Misc.SetFocus(_pattern.
_hwnd
);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (28)
119
return (iid == RangeValuePattern.Pattern && WindowScroll.Scrollable (
_hwnd
, _sbFlag) && HasValuePattern (
_hwnd
, _sbFlag)) ? this : null;
140
if (!Misc.GetScrollBarInfo(
_hwnd
, idObject, ref sbi))
160
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_parent.
_hwnd
)))
191
return SafeNativeMethods.IsWindowVisible(
_hwnd
);
200
if (SafeNativeMethods.IsWindowVisible(
_hwnd
) &&
215
return IsEnabled() && Misc.IsEnabled(
_hwnd
);
219
return IsScrollBarVertical(
_hwnd
, _sbFlag) ? OrientationType.Vertical : OrientationType.Horizontal;
263
return IsScrollBarVertical(
_hwnd
, _sbFlag)
283
if (item == ScrollBarItem.UpArrow && !IsScrollBarWithThumb (
_hwnd
, _sbFlag))
303
if (item == ScrollBarItem.DownArrow && !IsScrollBarWithThumb (
_hwnd
, _sbFlag))
330
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(WindowsScrollBarBits.GetBoundingRectangle(
_hwnd
, this, item, _sbFlag));
334
return new WindowsScrollBarBits (
_hwnd
, this, (int) item, _sbFlag);
364
return !Misc.IsEnabled(
_hwnd
) || !HasValuePattern(
_hwnd
, _sbFlag);
522
if (_sbFlag != NativeMethods.SB_CTL || Misc.GetScrollBarInfo(
_hwnd
, NativeMethods.OBJID_CLIENT, ref sbi))
524
return new WindowsScrollBarBits (
_hwnd
, this, (int) index, _sbFlag);
556
string classname = Misc.GetClassName(
_hwnd
);
575
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
586
if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent.
_hwnd
)))
617
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
))
628
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
666
string classname = Misc.GetClassName(
_hwnd
);
689
Misc.SetScrollPos(
_hwnd
, _sbFlag, val, true);
695
IsScrollBarVertical(
_hwnd
, _sbFlag) ? NativeMethods.WM_VSCROLL : NativeMethods.WM_HSCROLL;
700
Misc.ProxySendMessage(
_hwnd
, msg, (IntPtr)wParam, IntPtr.Zero);
702
Misc.ProxySendMessage(
_hwnd
, msg, (IntPtr)wParam, IntPtr.Zero);
739
if (!Misc.GetScrollBarInfo(
_hwnd
, idObject, ref sbi))
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (10)
112
return SafeNativeMethods.IsWindowVisible(
_hwnd
);
127
return GetBoundingRectangle (
_hwnd
, _parent, (WindowsScrollBar.ScrollBarItem) _item, _sbFlag);
148
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
178
if (WindowsScrollBar.IsScrollBarVertical(
_hwnd
, _sbFlag))
236
if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(parent._parent.
_hwnd
)))
517
IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(
_hwnd
) :
_hwnd
;
545
if (!Misc.GetScrollInfo(
_hwnd
, _sbFlag, ref si))
566
Misc.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd ==
_hwnd
? IntPtr.Zero :
_hwnd
));
MS\Internal\AutomationProxies\WindowsSlider.cs (16)
138
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SliderItem.GetBoundingRectangle (
_hwnd
, item, _fHorizontal));
157
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
168
IntPtr parent = Misc.GetParent(
_hwnd
);
246
return new SliderItem (
_hwnd
, this, (int) item, _fHorizontal);
261
int value = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
266
int maxValue = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
284
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val));
291
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero);
299
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero);
307
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
315
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero);
400
return GetBoundingRectangle (
_hwnd
, (WindowsSlider.SItem) _item, _fHorizontal);
409
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
410
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, 0);
431
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
440
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsStatic.cs (2)
133
return Misc.AccessKey(Misc.ProxyGetText(
_hwnd
));
152
return Misc.StripMnemonic(Misc.ProxyGetText(
_hwnd
));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (17)
106
if (hwndChild == IntPtr.Zero || hwndChild ==
_hwnd
)
108
hwndChild = GetChildHwnd(
_hwnd
, accChild.Location);
111
if(hwndChild != IntPtr.Zero && hwndChild !=
_hwnd
)
118
return new WindowsStatusBarPane(
_hwnd
, this, index, accChild);
142
return Misc.ProxyGetText(
_hwnd
);
171
return item + 1 < count ? CreateStatusBarPane(item + 1) : (_fHasGrip ? StatusBarGrip.Create(
_hwnd
, this, -1) : null);
202
return Count > 0 ? CreateStatusBarPane(0) : (_fHasGrip ? StatusBarGrip.Create(
_hwnd
, this, GripItemID) : null);
211
return StatusBarGrip.Create(
_hwnd
, this, GripItemID);
224
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (WindowsStatusBarPane.GetBoundingRectangle (
_hwnd
, item));
235
NativeMethods.Win32Rect rc = StatusBarGrip.GetBoundingRectangle (
_hwnd
);
238
ProxySimple grip = StatusBarGrip.Create(
_hwnd
, this, -1);
308
hwndChild = GetChildHwnd(
_hwnd
, accChild.Location);
337
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero);
460
return GetBoundingRectangle (
_hwnd
, _item);
597
int retValue = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
602
return XSendMessage.GetItemText(
_hwnd
, NativeMethods.SB_GETTEXTW, _item, len);
775
return GetBoundingRectangle(
_hwnd
).ToRect(false);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (30)
158
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref HitTestInfo.pt, 1))
162
index = XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
178
int item = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
245
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (
_hwnd
, NativeMethods.GA_PARENT);
314
if (!XSendMessage.GetItem(
_hwnd
, index, ref item))
326
return new HeaderItem (
_hwnd
, this, index);
334
return HeaderItemCount (
_hwnd
);
430
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
464
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
482
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
483
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
524
if (Misc.IsComctrlV6OnOsVerV6orHigher(
_hwnd
))
526
int item = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
546
int index = OrderToIndex (
_hwnd
, _item);
555
return XSendMessage.GetItemText(
_hwnd
, index, hdi);
563
int index = OrderToIndex (
_hwnd
, _item);
569
result = XSendMessage.XSend(
_hwnd
, NativeMethods.HDM_GETITEMRECT, new IntPtr(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero);
574
if (!Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref rectW32, 2))
587
if (Misc.IsLayoutRTL(
_hwnd
))
638
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
) || !SafeNativeMethods.IsWindowVisible (
_hwnd
) || HeaderIsHidden (
_hwnd
))
669
return Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1);
680
if (XSendMessage.GetItem(
_hwnd
, _item, ref item))
694
int item = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
709
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
718
Rect rect = XSendMessage.GetItemRect(
_hwnd
, NativeMethods.HDM_GETITEMDROPDOWNRECT, _item);
725
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
726
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
735
if (Misc.GetFocusedWindow().Equals(
_hwnd
))
MS\Internal\AutomationProxies\WindowsTab.cs (53)
48
_fIsContent = IsValidControl(
_hwnd
);
147
return IsValidControl(
_hwnd
);
183
int count = GetItemCount(
_hwnd
);
206
int count = GetItemCount(
_hwnd
);
229
int count = GetItemCount(
_hwnd
);
242
int count = GetItemCount(
_hwnd
);
260
if (!Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref hti.pt, 1))
277
index = XSendMessage.XSendGetIndex(
_hwnd
, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType()));
291
int focusIndex = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero);
293
if (focusIndex >= 0 && focusIndex < GetItemCount(
_hwnd
))
368
for (int i = 0, c = GetItemCount(
_hwnd
); i < c; i++)
370
if (sTitle == WindowsTabItem.GetName(
_hwnd
, i, true))
389
if (!WindowsTab.SupportMultipleSelection (
_hwnd
))
391
int selectedItem = WindowsTabItem.GetCurrentSelectedItem(
_hwnd
);
433
return SupportMultipleSelection (
_hwnd
);
453
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
477
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
518
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
578
if (!Misc.GetWindowRect(
_hwnd
, ref viewable))
676
return new WindowsTabItem(
_hwnd
, this, index, _windowsForms == WindowsFormsHelper.FormControlState.True);
697
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
702
return GetUpDownHwnd(
_hwnd
) != IntPtr.Zero;
751
return GetUpDownHwnd(
_hwnd
);
854
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
913
_fIsContent = !string.IsNullOrEmpty(GetName(
_hwnd
, _item, true));
956
return Misc.AccessKey(WindowsTabItem.GetItemText(
_hwnd
, _item));
960
return !string.IsNullOrEmpty(GetName(
_hwnd
, _item, true));
971
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
972
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _item);
982
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
, ref _windowsForms))
991
return GetName(
_hwnd
, _item, _windowsForms == WindowsFormsHelper.FormControlState.True);
1008
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
1063
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1083
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1101
if (WindowsTab.SupportMultipleSelection(
_hwnd
) == true)
1126
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1138
if (WindowsTab.SupportMultipleSelection(
_hwnd
) == true)
1154
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero);
1167
if (!WindowsTab.SupportMultipleSelection(
_hwnd
))
1169
int selectedItem = GetCurrentSelectedItem(
_hwnd
);
1180
if (!XSendMessage.GetItem(
_hwnd
, _item, ref TCItem))
1208
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1260
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item;
1277
if (!XSendMessage.XSend(
_hwnd
, NativeMethods.TCM_GETITEMRECT, new IntPtr(_item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero))
1282
return Misc.MapWindowPoints(
_hwnd
, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty;
1287
return (SafeNativeMethods.IsWindowEnabled(
_hwnd
) && SafeNativeMethods.IsWindowVisible(
_hwnd
));
1302
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
1304
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1305
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1311
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
1321
IntPtr hwndParent =
_hwnd
;
1330
string sName = WindowsTabItem.GetName(
_hwnd
, _item, true);
MS\Internal\AutomationProxies\WindowsTitleBar.cs (12)
58
return Misc.GetTitleBarRect(
_hwnd
);
66
return new int [] { 4, unchecked((int)(long)
_hwnd
), _item };
74
return Misc.ProxyGetText(
_hwnd
);
112
int hit = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y));
133
WindowsMenu sysmenu = WindowsMenu.CreateSystemMenu(
_hwnd
, this);
161
return WindowsMenu.CreateSystemMenu (
_hwnd
, this);
167
return new TitleBarButton (
_hwnd
, this, item);
199
Misc.ProxyGetTitleBarInfo(
_hwnd
, out ti);
359
Rect[] rects = Misc.GetTitlebarRects(
_hwnd
);
403
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
432
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero);
446
Misc.PostMessage(
_hwnd
, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (30)
211
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (ToolbarItem.GetBoundingRectangle (
_hwnd
, item));
229
int focusIndex = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero);
233
Accessible acc = Accessible.CreateNativeFromEvent(
_hwnd
, NativeMethods.OBJID_CLIENT, NativeMethods.CHILD_SELF);
239
return new WindowsToolbarAsMenu(
_hwnd
, this, focusIndex, acc);
243
return new WindowsToolbar(
_hwnd
, this, focusIndex);
258
string name = Misc.ProxyGetText(
_hwnd
);
294
if (!XSendMessage.GetItem(
_hwnd
, item, ref tbb))
300
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0)
302
Accessible acc = Accessible.CreateNativeFromEvent(
_hwnd
, NativeMethods.OBJID_CLIENT, item + 1);
307
return new ToolbarItemAsMenuItem(
_hwnd
, this, item, tbb.idCommand, acc);
311
return new ToolbarItem(
_hwnd
, this, item, tbb.idCommand);
330
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero);
363
if (XSendMessage.GetItem(
_hwnd
, _item, ref tbb))
369
bool hasImageList = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0;
370
int exStyle = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero);
381
IntPtr hwndParent = Misc.GetParent(
_hwnd
);
429
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
452
return GetBoundingRectangle(
_hwnd
, _item);
469
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0;
515
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero);
577
return Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item;
599
int len = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero);
602
return XSendMessage.GetItemText(
_hwnd
, NativeMethods.TB_GETBUTTONTEXT, _idCommand, len);
625
if (XSendMessage.GetItem(
_hwnd
, _item, ref tbb))
636
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
637
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _idCommand);
643
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
)
644
|| Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
651
if (Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
678
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)
183
string className = Misc.ProxyGetClassName(
_hwnd
);
196
return Misc.ProxyGetText(
_hwnd
);
MS\Internal\AutomationProxies\WindowsTreeView.cs (79)
157
IntPtr hNext = GetNextItem (
_hwnd
, ((TreeViewItem) child)._hItem);
160
return new TreeViewItem (
_hwnd
, this, hNext, (int) TVItem.TopLevel);
184
IntPtr hPrev = GetPreviousItem (
_hwnd
, ((TreeViewItem) child)._hItem);
186
return hPrev != IntPtr.Zero ? new TreeViewItem (
_hwnd
, this, hPrev, (int) TVItem.TopLevel) : null;
190
IntPtr hChild = GetRoot (
_hwnd
);
197
for (temp = GetNextItem (
_hwnd
, hChild); temp != IntPtr.Zero; temp = GetNextItem (
_hwnd
, hChild))
202
return new TreeViewItem (
_hwnd
, this, hChild, (int) TVItem.TopLevel);
213
hChild = GetRoot (
_hwnd
);
234
IntPtr hChild = GetRoot (
_hwnd
);
239
for (IntPtr temp = GetNextItem (
_hwnd
, hChild); temp != IntPtr.Zero; temp = GetNextItem (
_hwnd
, hChild))
253
IntPtr hItem = XSendMessage.HitTestTreeView(
_hwnd
, x, y);
264
IntPtr treeItem = GetSelection (
_hwnd
);
281
IntPtr treeItem = GetSelection(
_hwnd
);
304
return (IntPtr.Zero != GetSelection (
_hwnd
));
377
return new TreeViewItem (
_hwnd
, this, hItem, depth);
382
return CreateParents (
_hwnd
, hItem);
747
return IsItemExpanded (
_hwnd
, _hItem) ? NextSibling (child) : null;
756
return IsItemExpanded (
_hwnd
, _hItem) ? PreviousSibling (child) : null;
763
return IsItemExpanded (
_hwnd
, _hItem) ? FirstChild () : null;
770
return IsItemExpanded (
_hwnd
, _hItem) ? LastChild () : null;
791
else if (iid == ScrollItemPattern.Pattern && WindowScroll.IsScrollable(
_hwnd
))
814
if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 && Misc.IsWindowInGivenProcess(
_hwnd
, "explorer"))
817
_nativeAcc = Accessible.CreateNativeFromEvent(
_hwnd
, NativeMethods.OBJID_CLIENT, childId);
837
return WindowsTreeView.GetItemRect(
_hwnd
, _hItem, true).ToRect(false);
846
NativeMethods.Win32Rect itemRect = GetItemRect(
_hwnd
, _hItem, true);
849
if (!Misc.IsItemVisible(
_hwnd
, ref itemRect))
865
IntPtr hwndToolTip = Misc.ProxySendMessage(
_hwnd
, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
866
return Misc.GetItemToolTipText(
_hwnd
, hwndToolTip, _item);
927
return WindowsTreeView.SelectItem (
_hwnd
, _hItem);
943
return new int [4] { ProxySimple.Win32ProviderRuntimeIdBase, unchecked((int)(long)
_hwnd
), highPart, lowPart };
947
return new int[3] { ProxySimple.Win32ProviderRuntimeIdBase, (int)
_hwnd
, (int)_hItem };
959
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
979
if (!WindowsTreeView.SelectItem(
_hwnd
, _hItem))
990
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1008
if (selectionRequired || WindowsTreeView.GetSelection(
_hwnd
) != IntPtr.Zero)
1015
if (!WindowsTreeView.SelectItem(
_hwnd
, _hItem))
1025
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1075
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1095
WindowsTreeView.Expand (
_hwnd
, _hItem);
1104
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1120
WindowsTreeView.Collapse (
_hwnd
, _hItem);
1146
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1153
if (!WindowsTreeView.SetItemText(
_hwnd
, _hItem, val))
1186
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
1199
WindowsTreeView.SetCheckState(
_hwnd
, _hItem, GetToggleState() != ToggleState.On);
1221
if (!WindowScroll.IsScrollable(
_hwnd
))
1226
Misc.SetFocus(
_hwnd
);
1230
Misc.ProxySendMessage(
_hwnd
, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem);
1283
int selected = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED));
1306
if (!WindowsTreeView.IsItemExpanded (
_hwnd
, current._hItem))
1318
IntPtr hNext = WindowsTreeView.GetNextItem (
_hwnd
, ((TreeViewItem) child)._hItem);
1320
return hNext != IntPtr.Zero ? new TreeViewItem(
_hwnd
, this, hNext, _item + 1) : null;
1328
IntPtr hPrev = WindowsTreeView.GetPreviousItem (
_hwnd
, ((TreeViewItem) child)._hItem);
1330
return hPrev != IntPtr.Zero ? new TreeViewItem(
_hwnd
, this, hPrev, _item + 1) : null;
1336
IntPtr hChild = WindowsTreeView.GetFirstChild (
_hwnd
, _hItem);
1338
return hChild != IntPtr.Zero ? new TreeViewItem(
_hwnd
, this, hChild, _item + 1) : null;
1344
if (!IsItemExpanded (
_hwnd
, _hItem))
1349
IntPtr hChild = WindowsTreeView.GetFirstChild (
_hwnd
, _hItem);
1354
for (IntPtr temp = WindowsTreeView.GetNextItem (
_hwnd
, hChild); temp != IntPtr.Zero; temp = WindowsTreeView.GetNextItem (
_hwnd
, hChild))
1359
return new TreeViewItem(
_hwnd
, this, hChild, _item + 1);
1368
bool expanded = WindowsTreeView.IsItemExpanded (
_hwnd
, _hItem);
1376
bool hasChildren = WindowsTreeView.TreeViewItem_HasChildren (
_hwnd
, _hItem);
1405
state = (WindowsTreeView.CheckState)WindowsTreeView.GetCheckState(
_hwnd
, _hItem);
1456
NativeMethods.Win32Rect rectItem = WindowsTreeView.GetItemRect(
_hwnd
, _hItem, true);
1467
if (Misc.MapWindowPoints(IntPtr.Zero,
_hwnd
, ref pt, 1))
1482
int selected = WindowsTreeView.GetItemState(
_hwnd
, _hItem, NativeMethods.TVIS_SELECTED);
1502
isCheckbox = WindowsTreeView.CheckState.NoCheckbox != (WindowsTreeView.CheckState)WindowsTreeView.GetCheckState(
_hwnd
, _hItem);
1531
return WindowsTreeView.GetItemText (
_hwnd
, _hItem);
1539
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1540
Misc.PostMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1546
if (WindowsTreeView.GetItem(
_hwnd
, _hItem, NativeMethods.TVIF_IMAGE | NativeMethods.TVIF_STATE, out treeItem))
1567
IntPtr address = UnsafeNativeMethods.GetProp(
_hwnd
, "MSAAStateImageMapAddr");
1573
int numStates = unchecked((int)UnsafeNativeMethods.GetProp(
_hwnd
, "MSAAStateImageMapCount"));
1586
using (SafeProcessHandle hProcess = new SafeProcessHandle(
_hwnd
))
1628
return UnsafeNativeMethods.GetProp(
_hwnd
, "MSAAStateImageMapAddr") != IntPtr.Zero;
1638
int childId = Misc.ProxySendMessageInt(
_hwnd
, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (21)
94
return new SpinButtonItem(
_hwnd
, IsSpinnerElement()? _parent : this, (int)item);
119
if (WindowsFormsHelper.IsWindowsFormsControl(
_hwnd
) && IsWinformUpdown(
_hwnd
))
185
NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SpinButtonItem.GetBoundingRectangle (
_hwnd
, item));
204
if (!SafeNativeMethods.IsWindowEnabled (
_hwnd
))
224
Misc.ProxySendMessage(
_hwnd
, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0));
227
Misc.ProxySendMessage(HwndBuddy(
_hwnd
), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
290
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
341
int pos = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
368
IntPtr hwndBuddy = HwndBuddy(
_hwnd
);
378
int range = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
392
int range = Misc.ProxySendMessageInt(
_hwnd
, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
465
return GetBoundingRectangle(
_hwnd
, (WindowsUpDown.SpinItem)_item);
509
if (!SafeNativeMethods.IsWindowEnabled(
_hwnd
))
524
if (IsHorizontal(
_hwnd
) && Misc.IsLayoutRTL(
_hwnd
))
530
Rect rc = GetBoundingRectangle(
_hwnd
, (WindowsUpDown.SpinItem)item);
533
if (!Misc.GetWindowRect(
_hwnd
, ref updownRect))
543
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center);
544
Misc.ProxySendMessage(
_hwnd
, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center);
621
IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(
_hwnd
, NativeMethods.GA_PARENT);
MS\Internal\AutomationProxies\WinFormsSpinner.cs (4)
308
return new WinformsSpinnerEdit(
_hwnd
, _elEdit.
_hwnd
, _elUpDown.
_hwnd
, _parent, _item);
426
return _elEdit.
_hwnd
== hwnd;