MS\Internal\AutomationProxies\Accessible.cs (53)
167IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject));
175int hr = NativeMethods.S_FALSE;
215if(hr == NativeMethods.S_OK && acc != null)
222if (hr != NativeMethods.S_OK || acc == null)
276return Wrap(acc, NativeMethods.CHILD_SELF);
307return _idChild == NativeMethods.CHILD_SELF ? GetChildAt(_acc, null, 0) : null;
315return _idChild == NativeMethods.CHILD_SELF ? GetChildAt(_acc, null, Accessible.GetChildCount(_acc) - 1) : null;
384if (_idChild != NativeMethods.CHILD_SELF)
559NativeMethods.Win32Rect rcW32 = GetLocation(_acc, _idChild);
692if (childId == NativeMethods.CHILD_SELF)
749Debug.Assert(_idChild == NativeMethods.CHILD_SELF);
775if (idChild == NativeMethods.CHILD_SELF)
791rval = Wrap((IAccessible)scan, NativeMethods.CHILD_SELF);
824Select(NativeMethods.SELFLAG_TAKEFOCUS);
830Select(NativeMethods.SELFLAG_TAKEFOCUS|NativeMethods.SELFLAG_TAKESELECTION);
838Select(NativeMethods.SELFLAG_TAKEFOCUS|NativeMethods.SELFLAG_ADDSELECTION);
846Select(NativeMethods.SELFLAG_TAKEFOCUS|NativeMethods.SELFLAG_REMOVESELECTION);
864if ( result != NativeMethods.S_OK)
903if (hr != NativeMethods.S_OK || accObject == null)
905return NativeMethods.S_FALSE;
918return NativeMethods.S_FALSE;
940if (UnsafeNativeMethods.AccessibleChildren(accessibleObject, 0, childCount, aChildren, out childrenReturned) == NativeMethods.E_INVALIDARG)
1048NativeMethods.Win32Rect rect1 = GetLocation(_acc, _idChild);
1049NativeMethods.Win32Rect rect2 = GetLocation(acc, idChild);
1104idChild = NativeMethods.CHILD_SELF;
1132idChild = NativeMethods.CHILD_SELF;
1284internal static NativeMethods.Win32Rect GetLocation(IAccessible acc, int idChild)
1287NativeMethods.Win32Rect rect = NativeMethods.Win32Rect.Empty;
1302return NativeMethods.Win32Rect.Empty;
1354case NativeMethods.RPC_E_SERVERFAULT: // The server threw an exception.
1355case NativeMethods.RPC_E_DISCONNECTED: // The object invoked has disconnected from its clients.
1356case NativeMethods.RPC_E_UNAVAILABLE: // The server has disappeared
1357case NativeMethods.DISP_E_BADINDEX: // Index out of Range (Usually means Children have disappeared)
1358case NativeMethods.E_INTERFACEUNKNOWN: // The interface is unknown, usually because things have changed.
1359case NativeMethods.E_UNKNOWNWORDERROR: // An unknown Error code thrown by Word being closed while a search is running
1360case NativeMethods.RPC_E_SYS_CALL_FAILED: // System call failed during RPC.
1363case NativeMethods.E_FAIL:
1366case NativeMethods.E_MEMBERNOTFOUND:
1370case NativeMethods.E_NOTIMPL:
1374case NativeMethods.E_OUTOFMEMORY:
1381case NativeMethods.E_INVALIDARG:
1387case NativeMethods.E_ACCESSDENIED:
1391case NativeMethods.E_UNEXPECTED:
1438NativeMethods.Win32Rect ownLoc = GetLocation(old, NativeMethods.CHILD_SELF);
1439AccessibleRole ownRole = GetRole(old, NativeMethods.CHILD_SELF);
1455AccessibleRole role = GetRole(accChild, NativeMethods.CHILD_SELF);
1459NativeMethods.Win32Rect loc = GetLocation(accChild, NativeMethods.CHILD_SELF);
MS\Internal\AutomationProxies\ClickablePoint.cs (14)
56static internal bool GetPoint(IntPtr hwnd, ArrayList alIn, ArrayList alOut, ref NativeMethods.Win32Point pt)
63for (hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT))
77hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDPREV);
87if (Misc.IsBitSet(Misc.GetWindowStyle(hwndCurrent), NativeMethods.WS_POPUP))
154NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(simple.BoundingRectangle);
202internal CPRect(ref NativeMethods.Win32Rect rc, bool fRiAsInsideRect)
234private static bool ClickableInRect(IntPtr hwnd, ref NativeMethods.Win32Point pt, bool fRiAsInsideRect, ArrayList alIn, ArrayList alOut)
242NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect();
262int lr = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
264if (lr == NativeMethods.HTTRANSPARENT)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (204)
401internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVITEM item)
409return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax);
415return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero,
424return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax);
430internal static unsafe bool SetItem(IntPtr hwnd, int index, NativeMethods.LVITEM item)
438return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()));
444return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()));
450return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()));
456internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.LVITEM_V6 item)
464fixed (NativeMethods.LVITEM_V6 *pItem = &item)
466return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck);
473bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck);
477item = (NativeMethods.LVITEM_V6)item32;
485bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck);
489item = (NativeMethods.LVITEM_V6)item64;
497internal static unsafe bool SetGroupInfo(IntPtr hwnd, NativeMethods.LVGROUP group)
505int result = XSendGetIndex(hwnd, NativeMethods.LVM_SETGROUPINFO,
512int result = XSendGetIndex(hwnd, NativeMethods.LVM_SETGROUPINFO,
519int result = XSendGetIndex(hwnd, NativeMethods.LVM_SETGROUPINFO,
527internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP group)
536fixed (NativeMethods.LVGROUP* pGroup = &group)
538result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO,
549int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO,
553group = (NativeMethods.LVGROUP)group32;
560int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO,
564group = (NativeMethods.LVGROUP)group64;
572internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP_V6 group)
581fixed (NativeMethods.LVGROUP_V6* pGroup = &group)
583result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO,
594int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO,
598group = (NativeMethods.LVGROUP_V6)group32;
605int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO,
609group = (NativeMethods.LVGROUP_V6)group64;
617internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP item)
631return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszHeader), item.cchHeader);
643return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszHeader), item32.cchHeader);
655return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszHeader), item64.cchHeader);
661internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP_V6 item, int mask)
672if (((mask & NativeMethods.LVGF_HEADER) == 0) && ((mask & NativeMethods.LVGF_SUBSET) == 0))
680case NativeMethods.LVGF_HEADER:
685case NativeMethods.LVGF_SUBSET:
690return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true);
698case NativeMethods.LVGF_HEADER:
703case NativeMethods.LVGF_SUBSET:
708return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true);
716case NativeMethods.LVGF_HEADER:
721case NativeMethods.LVGF_SUBSET:
726return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), textAddress, size, true);
742internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TCITEM item)
750fixed (NativeMethods.TCITEM* pItem = &item)
752return XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()));
759bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()));
763item = (NativeMethods.TCITEM)item32;
772bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()));
776item = (NativeMethods.TCITEM)item64;
785internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.TCITEM item)
793return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax);
799return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index),
808return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax);
824internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.HDITEM item)
832fixed (NativeMethods.HDITEM* pItem = &item)
834return XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()));
841bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()));
845item = (NativeMethods.HDITEM)item32;
854bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()));
858item = (NativeMethods.HDITEM)item64;
867internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.HDITEM item)
875return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax);
882hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32),
890return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax);
906internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.TVITEM item)
914fixed (NativeMethods.TVITEM* pItem = &item)
916return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()));
923bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()));
927item = (NativeMethods.TVITEM)item32;
936bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()));
940item = (NativeMethods.TVITEM)item64;
949internal static unsafe bool SetItem(IntPtr hwnd, NativeMethods.TVITEM item)
957return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()));
963return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()));
969return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()));
983NativeMethods.Win32Point clientPoint = new NativeMethods.Win32Point(x, y);
988NativeMethods.TVHITTESTINFO hitTestInfo =
989new NativeMethods.TVHITTESTINFO(clientPoint.x, clientPoint.y, 0);
990if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo),
999if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo32),
1008if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo64),
1020internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TVITEM item)
1028return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax);
1035hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32),
1043return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax);
1059internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TBBUTTON item)
1067fixed (NativeMethods.TBBUTTON* pItem = &item)
1069return XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()), ErrorValue.Zero);
1076bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), ErrorValue.Zero);
1080item = (NativeMethods.TBBUTTON)item32;
1089bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), ErrorValue.Zero);
1093item = (NativeMethods.TBBUTTON)item64;
1111internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TOOLINFO item)
1126hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item),
1134hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item32),
1143hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item64),
1171NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty;
1332private static string ListView_V6_GetGroupTextOnWinXp(IntPtr hwnd, NativeMethods.LVGROUP group)
1352XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck);
1358using (SafeCoTaskMem copyTo = new SafeCoTaskMem(NativeMethods.MAX_PATH))
1367if (Misc.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count))
1400XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck);
1406using (SafeCoTaskMem copyTo = new SafeCoTaskMem(NativeMethods.MAX_PATH))
1415if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count))
1448XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck);
1454using (SafeCoTaskMem copyTo = new SafeCoTaskMem(NativeMethods.MAX_PATH))
1463if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count))
1561internal TCITEM_32(NativeMethods.TCITEM item)
1573static public explicit operator NativeMethods.TCITEM(TCITEM_32 item)
1575NativeMethods.TCITEM nativeItem = new NativeMethods.TCITEM();
1602internal TCITEM_64(NativeMethods.TCITEM item)
1615static public explicit operator NativeMethods.TCITEM(TCITEM_64 item)
1617NativeMethods.TCITEM nativeItem = new NativeMethods.TCITEM();
1647internal HDITEM_32(NativeMethods.HDITEM item)
1663static public explicit operator NativeMethods.HDITEM(HDITEM_32 item)
1665NativeMethods.HDITEM nativeItem = new NativeMethods.HDITEM();
1699internal HDITEM_64(NativeMethods.HDITEM item)
1715static public explicit operator NativeMethods.HDITEM(HDITEM_64 item)
1717NativeMethods.HDITEM nativeItem = new NativeMethods.HDITEM();
1750internal LVITEM_32(NativeMethods.LVITEM item)
1765static public explicit operator NativeMethods.LVITEM(LVITEM_32 item)
1767NativeMethods.LVITEM nativeItem = new NativeMethods.LVITEM();
1800internal LVITEM_64(NativeMethods.LVITEM item)
1816static public explicit operator NativeMethods.LVITEM(LVITEM_64 item)
1818NativeMethods.LVITEM nativeItem = new NativeMethods.LVITEM();
1853internal LVITEM_V6_32(NativeMethods.LVITEM_V6 item)
1871static public explicit operator NativeMethods.LVITEM_V6(LVITEM_V6_32 item)
1873NativeMethods.LVITEM_V6 nativeItem = new NativeMethods.LVITEM_V6();
1913internal LVITEM_V6_64(NativeMethods.LVITEM_V6 item)
1933static public explicit operator NativeMethods.LVITEM_V6(LVITEM_V6_64 item)
1935NativeMethods.LVITEM_V6 nativeItem = new NativeMethods.LVITEM_V6();
1970internal LVGROUP_32(NativeMethods.LVGROUP item)
1985static public explicit operator NativeMethods.LVGROUP(LVGROUP_32 item)
1987NativeMethods.LVGROUP nativeItem = new NativeMethods.LVGROUP();
1989nativeItem.cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP));
2035internal LVGROUP_V6_32(NativeMethods.LVGROUP_V6 item)
2066static public explicit operator NativeMethods.LVGROUP_V6(LVGROUP_V6_32 item)
2068NativeMethods.LVGROUP_V6 nativeItem = new NativeMethods.LVGROUP_V6();
2070nativeItem.cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6));
2117internal LVGROUP_64(NativeMethods.LVGROUP item)
2133static public explicit operator NativeMethods.LVGROUP(LVGROUP_64 item)
2135NativeMethods.LVGROUP nativeItem = new NativeMethods.LVGROUP();
2137nativeItem.cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP));
2184internal LVGROUP_V6_64(NativeMethods.LVGROUP_V6 item)
2216static public explicit operator NativeMethods.LVGROUP_V6(LVGROUP_V6_64 item)
2218NativeMethods.LVGROUP_V6 nativeItem = new NativeMethods.LVGROUP_V6();
2220nativeItem.cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6));
2264internal TBBUTTON_32(NativeMethods.TBBUTTON item)
2277static public explicit operator NativeMethods.TBBUTTON(TBBUTTON_32 item)
2279NativeMethods.TBBUTTON nativeItem = new NativeMethods.TBBUTTON();
2308internal TBBUTTON_64(NativeMethods.TBBUTTON item)
2322static public explicit operator NativeMethods.TBBUTTON(TBBUTTON_64 item)
2324NativeMethods.TBBUTTON nativeItem = new NativeMethods.TBBUTTON();
2355internal TVITEM_32(NativeMethods.TVITEM item)
2375static public explicit operator NativeMethods.TVITEM(TVITEM_32 item)
2377NativeMethods.TVITEM nativeItem = new NativeMethods.TVITEM();
2410internal TVITEM_64(NativeMethods.TVITEM item)
2426static public explicit operator NativeMethods.TVITEM(TVITEM_64 item)
2428NativeMethods.TVITEM nativeItem = new NativeMethods.TVITEM();
2448internal NativeMethods.Win32Point pt;
2461static public explicit operator NativeMethods.TVHITTESTINFO(TVHITTESTINFO_32 hitTestInfo)
2463NativeMethods.TVHITTESTINFO nativeHitTestInfo = new NativeMethods.TVHITTESTINFO();
2475internal NativeMethods.Win32Point pt;
2488static public explicit operator NativeMethods.TVHITTESTINFO(TVHITTESTINFO_64 hitTestInfo64)
2490NativeMethods.TVHITTESTINFO nativeHitTestInfo = new NativeMethods.TVHITTESTINFO();
2505internal NativeMethods.Win32Rect rect;
2511internal TOOLINFO_32(NativeMethods.TOOLINFO item)
2524static public explicit operator NativeMethods.TOOLINFO(TOOLINFO_32 item)
2526NativeMethods.TOOLINFO nativeItem = new NativeMethods.TOOLINFO();
2528nativeItem.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO));
2548internal NativeMethods.Win32Rect rect;
2554internal TOOLINFO_64(NativeMethods.TOOLINFO item)
2567static public explicit operator NativeMethods.TOOLINFO(TOOLINFO_64 item)
2569NativeMethods.TOOLINFO nativeItem = new NativeMethods.TOOLINFO();
2571nativeItem.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO));
MS\Internal\AutomationProxies\Misc.cs (131)
155internal static IntPtr DispatchMessage(ref NativeMethods.MSG msg)
166internal unsafe static bool EnumChildWindows(IntPtr hwnd, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam)
194StringBuilder sb = new StringBuilder(NativeMethods.MAX_PATH + 1);
196int result = UnsafeNativeMethods.GetClassName(hwnd, sb, NativeMethods.MAX_PATH);
233internal static bool GetClientRectInScreenCoordinates(IntPtr hwnd, ref NativeMethods.Win32Rect rc)
235rc = NativeMethods.Win32Rect.Empty;
242NativeMethods.Win32Point leftTop = new NativeMethods.Win32Point(rc.left, rc.top);
248NativeMethods.Win32Point rightBottom = new NativeMethods.Win32Point(rc.right, rc.bottom);
254rc = new NativeMethods.Win32Rect(leftTop.x, leftTop.y, rightBottom.x, rightBottom.y);
258internal static bool GetClientRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc)
275internal static bool GetComboBoxInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbi)
288internal static bool GetCursorPos(ref NativeMethods.Win32Point pt)
319NativeMethods.GUITHREADINFO gui;
331NativeMethods.TOOLINFO tool = new NativeMethods.TOOLINFO();
332tool.Init(Marshal.SizeOf(typeof(NativeMethods.TOOLINFO)));
391while ((peer = NativeMethodsSetLastError.GetWindow(peer, NativeMethods.GW_HWNDPREV)) != IntPtr.Zero)
396int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero);
397if ((code & NativeMethods.DLGC_STATIC) == NativeMethods.DLGC_STATIC)
413int style = UnsafeNativeMethods.GetWindowLong(peer, NativeMethods.GWL_STYLE, out error);
414if ((style & NativeMethods.WS_VISIBLE) != 0)
420if ((style & (NativeMethods.WS_GROUP | NativeMethods.WS_TABSTOP)) != 0)
428internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint item, ref NativeMethods.MENUBARINFO mbi)
454internal static bool GetMenuItemInfo(IntPtr hmenu, int item, bool byPosition, ref NativeMethods.MENUITEMINFO menuItemInfo)
467internal static bool GetMenuItemRect(IntPtr hwnd, IntPtr hmenu, int item, out NativeMethods.Win32Rect rc)
480internal static bool GetMessage(ref NativeMethods.MSG msg, IntPtr hwnd, int msgFilterMin, int msgFilterMax)
494internal static int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf)
509IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT);
520internal static bool GetScrollBarInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollBarInfo sbi)
533internal static bool GetScrollInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollInfo si)
553internal static int GetTextExtentPoint32(IntPtr hdc, string text, int length, out NativeMethods.SIZE size)
635int exstyle = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_EXSTYLE, out lastWin32Error);
649int id = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_ID, out lastWin32Error);
665int result = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_HWNDPARENT, out lastWin32Error);
675internal static bool GetWindowRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc)
691int style = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_STYLE, out lastWin32Error);
737NativeMethods.GUITHREADINFO gui;
738return (ProxyGetGUIThreadInfo(0, out gui) && (IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)));
759hwnd = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT);
770return IsBitSet(exStyle, NativeMethods.WS_EX_LAYOUTRTL) || IsBitSet(exStyle, NativeMethods.WS_EX_RTLREADING);
775return IsBitSet(GetWindowExStyle(hwnd), NativeMethods.WS_EX_LAYOUTRTL);
780return IsBitSet(GetWindowExStyle(hwnd), NativeMethods.WS_EX_RTLREADING);
783internal static bool IntersectRect(ref NativeMethods.Win32Rect rcDest, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2)
818static internal bool IsItemVisible(IntPtr hwnd, ref NativeMethods.Win32Rect itemRect)
820NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect(0, 0, 0, 0);
824NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0);
831static internal bool IsItemVisible(ref NativeMethods.Win32Rect parentRect, ref NativeMethods.Win32Rect itemRect)
833NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0);
840static internal bool IsItemVisible(ref NativeMethods.Win32Rect parentRect, ref Rect itemRect)
842NativeMethods.Win32Rect itemRc = new NativeMethods.Win32Rect(itemRect);
843NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0);
850static internal bool IsItemVisible(ref Rect parentRect, ref NativeMethods.Win32Rect itemRect)
852NativeMethods.Win32Rect parentRc = new NativeMethods.Win32Rect(parentRect);
853NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0);
862NativeMethods.Win32Rect itemRc = new NativeMethods.Win32Rect(itemRect);
863NativeMethods.Win32Rect parentRc = new NativeMethods.Win32Rect(parentRect);
864NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0);
879hwnd = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT);
898internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Rect rect, int cPoints)
923internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Point pt, int cPoints)
959NativeMethods.Win32Point ptPrevious = new NativeMethods.Win32Point();
961bool mouseSwapped = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_SWAPBUTTON) != 0;
1012if (terminationEvent == NativeMethods.WAIT_FAILED)
1070int index = ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true);
1083internal static bool ProxyGetGUIThreadInfo(uint idThread, out NativeMethods.GUITHREADINFO gui)
1085gui = new NativeMethods.GUITHREADINFO();
1176ProxySendMessage(hwnd, NativeMethods.WM_GETTEXT, (IntPtr)str.Capacity, str);
1204IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, NativeMethods.WM_GETTITLEBARINFOEX, IntPtr.Zero, ref ti, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1235NativeMethods.MENUBARINFO mbi;
1236bool retValue = WindowsMenu.GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi);
1335internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, ref NativeMethods.Win32Rect lParam)
1366internal static bool PtInRect(ref NativeMethods.Win32Rect rc, int x, int y)
1379NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect();
1417System.Text.StringBuilder className = new System.Text.StringBuilder(NativeMethods.MAX_PATH + 1);
1419uint result = UnsafeNativeMethods.RealGetWindowClass(hwnd, className, NativeMethods.MAX_PATH);
1475internal static int SendInput(int inputs, ref NativeMethods.INPUT ki, int size)
1580int result = MsgWaitForMultipleObjects(null, false, 2000, NativeMethods.QS_ALLINPUT);
1581if (result == NativeMethods.WAIT_FAILED || result == NativeMethods.WAIT_TIMEOUT)
1584NativeMethods.MSG msg = new NativeMethods.MSG();
1601if (msg.message == NativeMethods.WM_HOTKEY && (short)msg.wParam == atom)
1633internal static IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags)
1737internal static bool UnionRect(out NativeMethods.Win32Rect rcDst, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2)
1876int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero);
1923NativeMethods.TOOLINFO tool = new NativeMethods.TOOLINFO();
1924tool.Init(Marshal.SizeOf(typeof(NativeMethods.TOOLINFO)));
1931tool.uFlags = NativeMethods.TTF_IDISHWND;
1956NativeMethods.SYSTEM_INFO sysInfo;
2000if ((tiDL.rgstate[NativeMethods.INDEX_TITLEBAR_SELF] & (NativeMethods.STATE_SYSTEM_INVISIBLE | NativeMethods.STATE_SYSTEM_OFFSCREEN)) != 0)
2010int buttonWidth = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXSIZE) - 1;
2011int buttonHeight = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSIZE) - 1;
2013Rect[] rects = new Rect[NativeMethods.CCHILDREN_TITLEBAR + 1];
2027for (int i = NativeMethods.INDEX_TITLEBAR_MAC; i > NativeMethods.INDEX_TITLEBAR_SELF; i--)
2029if ((tiDL.rgstate[i] & NativeMethods.STATE_SYSTEM_INVISIBLE) == 0)
2043for (int i = NativeMethods.INDEX_TITLEBAR_MAC; i > NativeMethods.INDEX_TITLEBAR_SELF; i--)
2045if ((tiDL.rgstate[i] & NativeMethods.STATE_SYSTEM_INVISIBLE) == 0)
2071if ((ti.rgstate[NativeMethods.INDEX_TITLEBAR_SELF] & (NativeMethods.STATE_SYSTEM_INVISIBLE | NativeMethods.STATE_SYSTEM_OFFSCREEN)) != 0)
2076Rect[] rects = new Rect[NativeMethods.CCHILDREN_TITLEBAR + 1];
2077for (int i = 0; i <= NativeMethods.CCHILDREN_TITLEBAR; i++)
2080if ((ti.rgstate[i] & NativeMethods.STATE_SYSTEM_INVISIBLE) != 0)
2104private const int _sendMessageFlags = NativeMethods.SMTO_BLOCK;
MS\Internal\AutomationProxies\NonClientArea.cs (57)
90return new int[] { NativeMethods.EventObjectStateChange };
117NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect();
118NativeMethods.Win32Rect windowRect = new NativeMethods.Win32Rect();
192case NativeMethods.OBJID_WINDOW:
196case NativeMethods.OBJID_HSCROLL :
197case NativeMethods.OBJID_VSCROLL :
201case NativeMethods.OBJID_CLIENT:
205case NativeMethods.OBJID_SYSMENU:
206case NativeMethods.OBJID_MENU:
215int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
219case NativeMethods.HTHSCROLL:
225case NativeMethods.HTVSCROLL:
231case NativeMethods.HTCAPTION :
232case NativeMethods.HTMINBUTTON :
233case NativeMethods.HTMAXBUTTON :
234case NativeMethods.HTHELP :
235case NativeMethods.HTCLOSE :
236case NativeMethods.HTSYSMENU :
240case NativeMethods.HTGROWBOX:
243case NativeMethods.HTBOTTOMRIGHT:
246case NativeMethods.HTBOTTOMLEFT:
249case NativeMethods.HTMENU:
252case NativeMethods.HTLEFT:
253case NativeMethods.HTRIGHT:
254case NativeMethods.HTTOP:
255case NativeMethods.HTTOPLEFT:
256case NativeMethods.HTTOPRIGHT:
257case NativeMethods.HTBOTTOM:
258case NativeMethods.HTBORDER:
472return new WindowsListViewScrollBar (_hwnd, this, (int) item, NativeMethods.SB_HORZ);
474return new WindowsScrollBar (_hwnd, this, (int) item, NativeMethods.SB_HORZ);
484return new WindowsListViewScrollBar (_hwnd, this, (int) item, NativeMethods.SB_VERT);
486return new WindowsScrollBar (_hwnd, this, (int) item, NativeMethods.SB_VERT);
508if (Misc.IsBitSet(style, NativeMethods.WS_VSCROLL) && Misc.IsBitSet(style, NativeMethods.WS_HSCROLL))
530if (!Misc.IsBitSet(style, NativeMethods.WS_CHILD))
673if ((idProp == ScrollPattern.VerticalScrollPercentProperty && idObject != NativeMethods.OBJID_VSCROLL) ||
674(idProp == ScrollPattern.HorizontalScrollPercentProperty && idObject != NativeMethods.OBJID_HSCROLL))
685NonClientItem item = idObject == NativeMethods.OBJID_HSCROLL ? NonClientItem.HScrollBar : NonClientItem.VScrollBar;
686int sbFlag = idObject == NativeMethods.OBJID_HSCROLL ? NativeMethods.SB_HORZ : NativeMethods.SB_VERT;
700if (eventId == NativeMethods.EventObjectStateChange && idProp == ValuePattern.IsReadOnlyProperty)
713if (idObject == NativeMethods.OBJID_HSCROLL || idObject == NativeMethods.OBJID_VSCROLL)
715idObject = NativeMethods.OBJID_WINDOW;
722if (idProp == ValuePattern.ValueProperty && eventId == NativeMethods.EVENT_OBJECT_VALUECHANGE)
724NonClientItem item = idObject == NativeMethods.OBJID_HSCROLL ? NonClientItem.HScrollBar : NonClientItem.VScrollBar;
725WindowsScrollBar scrollBar = new WindowsScrollBar(hwnd, el, (int)item, idObject == NativeMethods.OBJID_HSCROLL ? NativeMethods.SB_HORZ : NativeMethods.SB_VERT);
726scrollBar.DispatchEvents(0, ValuePattern.ValueProperty, NativeMethods.OBJID_CLIENT, 0);
745if (eventId == NativeMethods.EventObjectNameChange)
748if (Misc.IsBitSet(style, NativeMethods.WS_CHILD))
MS\Internal\AutomationProxies\ProxyHwnd.cs (34)
168name = GetAccessibleName(NativeMethods.CHILD_SELF);
207name = GetAccessibleName(NativeMethods.CHILD_SELF);
245NativeMethods.Win32Rect parentRect = NativeMethods.Win32Rect.Empty;
359return new int [] { NativeMethods.EventObjectFocus };
363return new int[] { NativeMethods.EventObjectNameChange };
367return new int[] { NativeMethods.EventObjectValueChange };
371return new int[] { NativeMethods.EventObjectLocationChange };
375return new int [] { NativeMethods.EventObjectStateChange,
376NativeMethods.EventObjectShow,
377NativeMethods.EventObjectHide};
386return new int [] { NativeMethods.EventObjectValueChange };
390return new int [] { NativeMethods.EventObjectSelectionAdd,
391NativeMethods.EventObjectSelectionRemove,
392NativeMethods.EventObjectSelection};
396return new int[] { NativeMethods.EventSystemCaptureEnd,
397NativeMethods.EventObjectStateChange };
414new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectSelection, idEvent),
415new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectStateChange, idEvent)
425new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectSelectionAdd, idEvent),
426new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectSelection, idEvent)
431idWinEvent = NativeMethods.EventObjectSelectionRemove;
435idWinEvent = NativeMethods.EventObjectSelectionWithin;
441new WinEventTracker.EvtIdProperty (NativeMethods.EventSystemCaptureEnd, idEvent), // For SysHeaders
442new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectStateChange, idEvent),
443new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectValueChange, idEvent), // For WindowsScrollBarBits
444new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectInvoke, idEvent)
451new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectCreate, idEvent),
452new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectDestroy, idEvent),
453new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectReorder, idEvent)
460new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectLocationChange, idEvent),
461new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectTextSelectionChanged, idEvent)
478NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect ();
MS\Internal\AutomationProxies\WindowsButton.cs (53)
105style = Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK;
109case NativeMethods.BS_PUSHBUTTON:
110case NativeMethods.BS_DEFPUSHBUTTON:
111case NativeMethods.BS_OWNERDRAW:
112case NativeMethods.BS_SPLITBUTTON: // explore back and forward buttons
116case NativeMethods.BS_CHECKBOX:
117case NativeMethods.BS_AUTOCHECKBOX:
118case NativeMethods.BS_3STATE:
119case NativeMethods.BS_AUTO3STATE:
123case NativeMethods.BS_RADIOBUTTON:
124case NativeMethods.BS_AUTORADIOBUTTON:
128case NativeMethods.BS_GROUPBOX:
149if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL)
172eventId = NativeMethods.EventObjectSelectionRemove;
191int state = Misc.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero);
192if (Misc.IsBitSet(state, NativeMethods.BST_PUSHED)
193&& eventId == NativeMethods.EventObjectStateChange)
198else if(eventId == NativeMethods.EventObjectInvoke)
293new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectInvoke, idEvent)
322Accessible.AccessibleObjectFromWindow(hwndRadioButton, NativeMethods.OBJID_CLIENT, ref accRadioButton) != NativeMethods.S_OK ||
332new WindowsButton(hwndRadioButton, null, ButtonType.RadioButton, Misc.GetWindowStyle(hwndRadioButton) & NativeMethods.BS_TYPEMASK, accRadioButton)
397if (Accessible.AccessibleObjectFromWindow(hwndParent, NativeMethods.OBJID_CLIENT, ref accParent) != NativeMethods.S_OK || accParent == null)
404return new WindowsButton(hwndParent, null, ButtonType.GroupBox, Misc.GetWindowStyle(hwndParent) & NativeMethods.BS_TYPEMASK, accParent);
481case NativeMethods.BS_PUSHBUTTON:
482case NativeMethods.BS_DEFPUSHBUTTON:
483case NativeMethods.BS_PUSHBOX:
484case NativeMethods.BS_OWNERDRAW:
485case NativeMethods.BS_USERBUTTON:
486case NativeMethods.BS_CHECKBOX:
487case NativeMethods.BS_AUTOCHECKBOX:
488case NativeMethods.BS_RADIOBUTTON:
489case NativeMethods.BS_AUTORADIOBUTTON:
490case NativeMethods.BS_3STATE:
491case NativeMethods.BS_AUTO3STATE:
492case NativeMethods.BS_SPLITBUTTON: // explore back and forward buttons
498Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero);
512Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true);
519Misc.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true);
605if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_CHILD))
611hwndParent = Misc.GetWindow(hwndRoot, NativeMethods.GW_OWNER);
644int state = Misc.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero);
645if (Misc.IsBitSet(state, NativeMethods.BST_CHECKED))
649else if (Misc.IsBitSet(state, NativeMethods.BST_INDETERMINATE))
669Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound);
683if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK &&
707Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton);
723if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK &&
MS\Internal\AutomationProxies\WindowsComboBox.cs (61)
118NativeMethods.Win32Rect rcCombo = new NativeMethods.Win32Rect (base.BoundingRectangle);
124NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
128NativeMethods.Win32Rect rcList = NativeMethods.Win32Rect.Empty;
250NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
266NativeMethods.Win32Rect rcList = NativeMethods.Win32Rect.Empty;
294NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
331NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
375NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
391IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.CBN_EDITUPDATE));
393Misc.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam, _hwnd);
485return (NativeMethods.CBS_SIMPLE == _comboType);
491return (NativeMethods.CBS_DROPDOWNLIST == _comboType);
508IntPtr hwndEx = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT);
519static internal bool GetComboInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbInfo)
536if (cbInfo.hwndItem == IntPtr.Zero && IsComboEx (NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT)))
549cbInfo.rcItem = NativeMethods.Win32Rect.Empty;
560return Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0;
567NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
575Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero);
580Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero);
636return (Misc.GetWindowStyle(hwnd) & NativeMethods.CBS_COMBOTYPEMASK);
642NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
644if (GetComboInfo(_hwnd, ref cbInfo) && cbInfo.stateButton != NativeMethods.STATE_SYSTEM_INVISIBLE)
655NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
696index = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
703int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero);
717return XSendMessage.GetItemText(hwnd, NativeMethods.WM_USER + NativeMethods.CB_GETLBTEXT, index, len);
721return Misc.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len);
754case NativeMethods.OBJID_CLIENT :
756if (eventId == NativeMethods.EventObjectStateChange && idChild == 2)
763NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
765if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && Misc.IsBitSet(NativeMethods.STATE_SYSTEM_PRESSED, cbInfo.stateButton))
793IntPtr hwndCombo = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT);
833editPortionEvents[c]._evtId = (p == ValuePattern.ValueProperty) ? NativeMethods.EventObjectValueChange : NativeMethods.EventObjectStateChange;
918NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
MS\Internal\AutomationProxies\WindowsEditBox.cs (68)
90if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL)
105IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT);
270if (Misc.IsBitSet(styles, NativeMethods.ES_READONLY))
276if (Misc.IsBitSet(styles, NativeMethods.ES_NUMBER))
290int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
298result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
351NativeMethods.Win32Point clientLocation = (NativeMethods.Win32Point)screenLocation;
360NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect();
435internal void CharFromPos(NativeMethods.Win32Point point, out ushort indexLowWord, out ushort lineLowWord)
443IntPtr lParam = NativeMethods.Util.MAKELPARAM(point.x, point.y);
444int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam);
445indexLowWord = unchecked((ushort)(NativeMethods.Util.LOWORD(result)));
446lineLowWord = unchecked((ushort)(NativeMethods.Util.HIWORD(result)));
450internal int CharFromPosEx(NativeMethods.Win32Point point)
496if (Misc.IsBitSet(style, NativeMethods.ES_PASSWORD))
500else if (Misc.IsBitSet(style, NativeMethods.ES_MULTILINE))
504else if (Misc.IsBitSet(style, NativeMethods.ES_AUTOHSCROLL))
516return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero);
523return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero);
529IntPtr result = Misc.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero);
537result = UnsafeNativeMethods.GetStockObject(NativeMethods.SYSTEM_FONT);
546return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero);
549internal NativeMethods.LOGFONT GetLogfont()
553NativeMethods.LOGFONT logfont = new NativeMethods.LOGFONT();
554int cb = Marshal.SizeOf(typeof(NativeMethods.LOGFONT));
565NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect();
566Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect);
574Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETSEL, out start, out end);
586return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero);
594NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect();
598NativeMethods.SIZE size;
602NativeMethods.Win32Point ptStart = new NativeMethods.Win32Point((int)(rect.left + size.cx / 4), (int)(rect.top + size.cy / 4));
603NativeMethods.Win32Point ptEnd = new NativeMethods.Win32Point((int)(rect.right - size.cx / 8), (int)(rect.bottom - size.cy / 4));
672return (!SafeNativeMethods.IsWindowEnabled(WindowHandle) || Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY));
681return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero);
687int index = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero);
694return 0 != Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical);
702if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_VSCROLL))
705NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo();
706si.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(typeof(NativeMethods.ScrollInfo));
707si.fMask = NativeMethods.SIF_ALL;
708bool ok = Misc.GetScrollInfo(WindowHandle, NativeMethods.SB_VERT, ref si);
717NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect();
721NativeMethods.SIZE size;
741int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero);
746int x = (int)((short)NativeMethods.Util.LOWORD(result));
747int y = (int)((short)NativeMethods.Util.HIWORD(result));
780NativeMethods.SIZE size;
802Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end);
843private int GetTextExtentPoint32(string text, out NativeMethods.SIZE size)
889IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT);
897NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
909IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT);
925IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT);
941IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT);
970int i = NativeMethods.Util.MAKELONG((int)lowWord, (int)hiWord);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (9)
31if (Accessible.AccessibleObjectFromWindow(hwnd, idObject, ref acc) != NativeMethods.S_OK || acc == null)
51return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
59return idChild == NativeMethods.CHILD_SELF ? sb : sb.CreateStatusBarPane(idChild);
77if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) != NativeMethods.S_OK || acc == null)
85return new WindowsButton(hwnd, null, WindowsButton.ButtonType.CheckBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
88return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
91return new WindowsButton(hwnd, null, WindowsButton.ButtonType.PushButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
94return new WindowsButton(hwnd, null, WindowsButton.ButtonType.RadioButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
MS\Internal\AutomationProxies\WindowsGrip.cs (13)
50NativeMethods.Win32Rect client = new NativeMethods.Win32Rect();
53NativeMethods.SIZE sizeGrip = GetGripSize(_hwnd, false);
83NativeMethods.Win32Rect client = new NativeMethods.Win32Rect();
96NativeMethods.SIZE sizeGrip = GetGripSize(hwnd, onStatusBar);
108int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
110return hit == NativeMethods.HTBOTTOMLEFT;
116int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
118return hit == NativeMethods.HTBOTTOMRIGHT;
122internal static NativeMethods.SIZE GetGripSize(IntPtr hwnd, bool onStatusBar)
MS\Internal\AutomationProxies\WindowsHyperlink.cs (27)
62if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL)
133return new WinEventTracker.EvtIdProperty[1] { new WinEventTracker.EvtIdProperty(NativeMethods.EventSystemCaptureEnd, idEvent) };
207HitTestInfo.item.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE;
209HitTestInfo.item.stateMask = NativeMethods.LIS_ENABLED;
216bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
239if (Misc.IsBitSet(_linkItem.state, NativeMethods.LIS_FOCUSED))
272_linkItem.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE;
275_linkItem.stateMask = NativeMethods.LIS_ENABLED;
281return XSendMessage.XSend(_hwnd, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM));
391linkItem.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE;
393linkItem.stateMask = NativeMethods.LIS_FOCUSED;
394linkItem.state = NativeMethods.LIS_FOCUSED;
399return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType()));
439NativeMethods.Win32Rect BoundingRect = NativeMethods.Win32Rect.Empty;
487HitTestInfo.item.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE;
489HitTestInfo.item.stateMask = NativeMethods.LIS_ENABLED;
496bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
508Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
509Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (8)
62if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL)
138Misc.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4));
243IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD);
252hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
260IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD);
263hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
381Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
MS\Internal\AutomationProxies\WindowsListBox.cs (90)
73if (Misc.IsBitSet(style, NativeMethods.LBS_COMBOBOX))
76NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
113case NativeMethods.OBJID_WINDOW:
117case NativeMethods.OBJID_CLIENT:
121case NativeMethods.OBJID_VSCROLL :
122case NativeMethods.OBJID_HSCROLL :
289NativeMethods.Win32Rect listboxrect = new NativeMethods.Win32Rect ();
294int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top));
295if (NativeMethods.Util.HIWORD(ret) == 0)
297int index = NativeMethods.Util.LOWORD(ret);
309int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero);
311if (index != NativeMethods.LB_ERR)
384return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0;
407return new int[] { NativeMethods.EventObjectSelection };
434return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero);
454if ((eventId == NativeMethods.EventObjectSelection || eventId == NativeMethods.EventObjectSelectionAdd) && (idProp as AutomationProperty) == SelectionPattern.IsSelectionRequiredProperty)
457WinEventTracker.EvtIdProperty[] aEvtIdProperties = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectSelection, SelectionPattern.IsSelectionRequiredProperty) };
462else if (eventId == NativeMethods.EventObjectSelection || eventId == NativeMethods.EventObjectSelectionRemove || eventId == NativeMethods.EventObjectSelectionAdd)
468if (eventId == NativeMethods.EventObjectSelection && isMultipleSelection && wlb.HasOtherSelections(idChild - 1))
470eventId = NativeMethods.EventObjectSelectionAdd;
475if ((eventId == NativeMethods.EventObjectSelectionRemove || eventId == NativeMethods.EventObjectSelectionAdd) &&
481eventId = NativeMethods.EventObjectSelection;
485if (selection != NativeMethods.LB_ERR)
500(eventId == NativeMethods.EventObjectDestroy || eventId == NativeMethods.EventObjectCreate))
521if ((eventId == NativeMethods.EventObjectShow || eventId == NativeMethods.EventObjectHide) &&
524if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LBS_COMBOBOX))
527NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
560return NativeMethods.LB_ERR;
565int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero);
566return result != NativeMethods.LB_ERR ? result : 0;
606return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR;
614return (0 != (WindowStyle & (NativeMethods.LBS_MULTIPLESEL | NativeMethods.LBS_EXTENDEDSEL)));
621return ((WindowStyle & NativeMethods.LBS_OWNERDRAWFIXED) == NativeMethods.LBS_OWNERDRAWFIXED) &&
622((WindowStyle & NativeMethods.LBS_WANTKEYBOARDINPUT) == NativeMethods.LBS_WANTKEYBOARDINPUT);
729int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero);
740return XSendMessage.GetItemText(_hwnd, NativeMethods.WM_USER + NativeMethods.LB_GETTEXT, _item, iTextLen);
744string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen);
942Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero);
988return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0;
997SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item));
1001SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero);
1004return NativeMethods.LB_ERR != SendMessageResult;
1016return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR;
1041return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item;
1045return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0;
1059private NativeMethods.Win32Rect BoundingRect()
1061NativeMethods.Win32Rect itemRect = new NativeMethods.Win32Rect();
1062Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect);
1063return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty;
1085if (((int)accChild.get_accState(NativeMethods.CHILD_SELF) & NativeMethods.STATE_SYSTEM_CHECKED) == NativeMethods.STATE_SYSTEM_CHECKED)
1089else if (((int)accChild.get_accState(NativeMethods.CHILD_SELF) & NativeMethods.STATE_SYSTEM_MIXED) == NativeMethods.STATE_SYSTEM_MIXED)
1107NativeMethods.Win32Point pt = new NativeMethods.Win32Point();
1131Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item));
1136Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1139success = (NativeMethods.LB_ERR != sendMessageResult);
1147if (Misc.IsBitSet(listBoxStyle, NativeMethods.LBS_NOTIFY))
1152new IntPtr(NativeMethods.Util.MAKELONG(
1153idListBox, NativeMethods.LBN_SELCHANGE));
1158hwndListBoxParent, NativeMethods.WM_COMMAND, wParam, _hwnd);
1166Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero);
1167success = (NativeMethods.LB_ERR != sendMessageResult);
1171IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.LBN_SELCHANGE));
1174Misc.ProxySendMessageInt(combo._hwnd, NativeMethods.WM_COMMAND, wParam, _hwnd);
1190return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (138)
61_groupEvents [0]._evtId = NativeMethods.EventObjectReorder;
62_groupEvents [1]._evtId = NativeMethods.EventObjectHide;
63_groupEvents [2]._evtId = NativeMethods.EventObjectDestroy;
115case NativeMethods.OBJID_CLIENT :
121case NativeMethods.OBJID_WINDOW :
124if ((eventId == NativeMethods.EventObjectReorder) && (idProp as AutomationEvent) == AutomationElement.StructureChangedEvent)
135case NativeMethods.OBJID_VSCROLL:
136case NativeMethods.OBJID_HSCROLL:
415NativeMethods.Win32Rect rc = manager.GetGroupRcByIndex (i);
426NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest(_hwnd, new NativeMethods.Win32Point(x, y));
433else if (hitTest.flags == NativeMethods.LVHT_NOWHERE && IsDetailMode(_hwnd))
440int xAdjustment = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXBORDER) + UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXFRAME);
451hitTest = WindowsListView.SubitemHitTest(_hwnd, new NativeMethods.Win32Point(x, y));
475int index = GetItemNext(_hwnd, -1, NativeMethods.LVNI_FOCUSED);
502WinEventTracker.EvtIdProperty[] aEvents = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectCreate, TablePattern.ColumnHeadersProperty) };
511WinEventTracker.EvtIdProperty[] aEvents = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectSelection, eventId) };
531WinEventTracker.EvtIdProperty[] aEvents = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectCreate, TablePattern.ColumnHeadersProperty) };
540WinEventTracker.EvtIdProperty[] aEvents = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectSelection, eventId) };
566for (int itemPos = GetItemNext(_hwnd, -1, NativeMethods.LVNI_SELECTED); itemPos != -1; itemPos = GetItemNext(_hwnd, itemPos, NativeMethods.LVNI_SELECTED))
627int cx = NativeMethods.Util.LOWORD (size) /*- 2 * UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXBORDER)*/;
628int cy = NativeMethods.Util.HIWORD (size) /*- 2 * UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CYBORDER)*/;
632bool fHz = SetScrollPercent (horizontalPercent, NativeMethods.SB_HORZ, cx, out dx);
633bool fVt = SetScrollPercent (verticalPercent, NativeMethods.SB_VERT, cy, out dy);
653SetScrollPercent(horizontalPercent, NativeMethods.SB_HORZ, cx, out dx);
654SetScrollPercent(verticalPercent, NativeMethods.SB_VERT, cy, out dy);
882return SetItemState(hwnd, item, NativeMethods.LVIS_FOCUSED, NativeMethods.LVIS_FOCUSED);
888int state = GetItemState(hwnd, item, NativeMethods.LVIS_FOCUSED);
890return (Misc.IsBitSet(state, NativeMethods.LVIS_FOCUSED));
901if (view == NativeMethods.LV_VIEW_TILE)
906if (InReportView(hwnd) || (view == NativeMethods.LV_VIEW_DETAILS))
933if (ListViewList(hwnd) || (NativeMethods.LV_VIEW_LIST == ListViewGetView(hwnd)))
1006int nextItem = GetItemNext(hwnd, curItem, NativeMethods.LVNI_TORIGHT);
1049NativeMethods.Win32Point pt = new NativeMethods.Win32Point (0, 0);
1061int next = GetItemNext(hwnd, current, NativeMethods.LVNI_BELOW);
1086return (ListViewIsGroupViewEnabled(hwnd) && NativeMethods.LV_VIEW_LIST != ListViewGetView(hwnd));
1108case NativeMethods.EventObjectReorder :
1149case NativeMethods.EventObjectDestroy :
1160case NativeMethods.EventObjectHide :
1181return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_REPORT);
1211return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
1221for (int index = GetItemNext(hwnd, -1, NativeMethods.LVNI_SELECTED); index != -1; index = GetItemNext(hwnd, index, NativeMethods.LVNI_SELECTED))
1231return GetItemNext(hwnd, -1, NativeMethods.LVNI_SELECTED);
1239return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags));
1244return ListViewGetView(hwnd) == NativeMethods.LV_VIEW_ICON;
1250return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero);
1256return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1));
1262return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_SCROLL, dx, dy) != 0;
1266static internal unsafe bool GetItemRect (IntPtr hwnd, int item, int lvir, out NativeMethods.Win32Rect itemRectangle)
1268itemRectangle = NativeMethods.Win32Rect.Empty;
1273if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType())))
1285return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0;
1291return SetItemState(hwnd, -1, NativeMethods.LVIS_SELECTED, 0);
1297return SetItemState(hwnd, item, NativeMethods.LVIS_SELECTED, NativeMethods.LVIS_SELECTED);
1303return SetItemState(hwnd, item, NativeMethods.LVIS_SELECTED, 0);
1309return Misc.IsBitSet(GetItemState(hwnd, listItem, NativeMethods.LVIS_SELECTED), NativeMethods.LVIS_SELECTED);
1315return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_EDITLABELS);
1339int flags = NativeMethods.LVS_EX_ONECLICKACTIVATE
1340| NativeMethods.LVS_EX_TWOCLICKACTIVATE
1341| NativeMethods.LVS_EX_UNDERLINEHOT
1342| NativeMethods.LVS_EX_UNDERLINECOLD;
1349return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero);
1355return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_ONECLICKACTIVATE);
1361return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_SINGLESEL);
1367return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_NOSCROLL);
1375return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0;
1381return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero);
1385static internal string GetItemText (IntPtr hwnd, NativeMethods.LVITEM item)
1394static internal NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, NativeMethods.Win32Point pt)
1401static internal NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, int item, NativeMethods.Win32Point pt)
1404NativeMethods.LVHITTESTINFO_INTERNAL hitTest = new NativeMethods.LVHITTESTINFO_INTERNAL ();
1422NativeMethods.LVHITTESTINFO_V6 hitTestNative = new NativeMethods.LVHITTESTINFO_V6(hitTest);
1423result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType()));
1431NativeMethods.LVHITTESTINFO hitTestNative = new NativeMethods.LVHITTESTINFO(hitTest);
1432result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType()));
1451return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
1457return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_CHECKBOXES);
1463int state = GetItemState(hwnd, item, NativeMethods.LVIS_STATEIMAGEMASK);
1471return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_AUTOARRANGE);
1477return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_FULLROWSELECT);
1483return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_JUSTIFYCOLUMNS);
1488static public unsafe bool GetSubItemRect (IntPtr hwnd, int item, int subItem, int lvir, out NativeMethods.Win32Rect itemRectangle)
1490itemRectangle = NativeMethods.Win32Rect.Empty;
1496if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETSUBITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType())))
1507IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
1546return CheckBoxes (_hwnd) ? new int [] { NativeMethods.EventObjectNameChange, NativeMethods.EventObjectStateChange } : new int [] { NativeMethods.EventObjectNameChange };
1550return new int [] { NativeMethods.EventObjectReorder };
1663throw new ArgumentOutOfRangeException(sbFlag == NativeMethods.SB_HORZ ? "horizontalPercent" : "verticalPercent", SR.ScrollBarOutOfRange);
1666int scrollBar = sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_VSCROLL;
1668NativeMethods.ScrollBarInfo scrollBarInfo = new NativeMethods.ScrollBarInfo();
1671(scrollBarInfo.scrollBarInfo & NativeMethods.STATE_SYSTEM_INVISIBLE) != 0 ||
1672(scrollBarInfo.scrollBarInfo & NativeMethods.STATE_SYSTEM_UNAVAILABLE) != 0)
1678NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); // this is used all over
1681si.fMask = NativeMethods.SIF_ALL;
1766int nextItem = GetItemNext(hwnd, curItem, NativeMethods.LVNI_BELOW);
1786return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_LIST);
1790static private unsafe bool GetItemPosition (IntPtr hwnd, int item, out NativeMethods.Win32Point pt)
1797if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMPOSITION, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(pt.GetType())))
1809return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero);
1815return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask));
1820NativeMethods.LVITEM lvitem = new NativeMethods.LVITEM ();
1822lvitem.mask = NativeMethods.LVIF_STATE;
1855if (eventId == NativeMethods.EventObjectSelectionRemove && automationProperty == SelectionItemPattern.IsSelectedProperty)
1864else if (eventId == NativeMethods.EventObjectSelection
1865|| eventId == NativeMethods.EventObjectSelectionRemove
1866|| eventId == NativeMethods.EventObjectSelectionAdd)
1913if (eventId == NativeMethods.EventObjectSelectionRemove && GetSelectedItemCount(hwnd) == 1)
1918eventId = NativeMethods.EventObjectSelection;
1939else if (eventId == NativeMethods.EventObjectReorder && (automationProperty == GridItemPattern.ColumnProperty || automationProperty == GridItemPattern.RowProperty))
1949else if (eventId == NativeMethods.EventObjectNameChange)
1952eventId = NativeMethods.EventObjectValueChange;
1956else if (eventId == NativeMethods.EventObjectStateChange && CheckBoxes(hwnd))
1961eventId = NativeMethods.EventObjectValueChange;
1967else if ((eventId == NativeMethods.EventObjectDestroy || eventId == NativeMethods.EventObjectCreate) && automationEvent == AutomationElement.StructureChangedEvent)
1982if (eventId == NativeMethods.EventObjectCreate && fGroupView)
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (74)
72NativeMethods.Win32Rect itemRectangle = manager.GetGroupRc(ID);
96NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6();
97group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
102return XSendMessage.GetItemText(_hwnd, group, NativeMethods.LVGF_HEADER);
106NativeMethods.LVGROUP group = new NativeMethods.LVGROUP();
107group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP)));
110group.mask = NativeMethods.LVGF_HEADER;
152NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6();
153group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
155group.mask = NativeMethods.LVGF_STATE;
156group.stateMask = NativeMethods.LVGS_SUBSETED;
164if ((group.state & NativeMethods.LVGS_SUBSETED) != 0)
240NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6();
241group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
243group.mask = NativeMethods.LVGF_STATE;
244group.stateMask = NativeMethods.LVGS_SUBSETED;
252if ((group.state & NativeMethods.LVGS_SUBSETED) != 0)
285NativeMethods.Win32Point pt = new NativeMethods.Win32Point (x, y);
286NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest (_hwnd, pt);
288if ((hitTest.flags & NativeMethods.LVHT_EX_GROUP_HEADER) != 0)
293if ((hitTest.flags & NativeMethods.LVHT_ONITEM) != 0 && hitTest.iItem >= 0)
304NativeMethods.LVHITTESTINFO_V6 hitTestNative = new NativeMethods.LVHITTESTINFO_V6(hitTest);
307XSendMessage.XSendGetIndex(_hwnd, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType()));
310if ((hitTestNative.flags & NativeMethods.LVHT_EX_GROUP_SUBSETLINK) != 0)
329int groupIndex = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
332NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6();
333groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
334groupInfo.mask = NativeMethods.LVGF_GROUPID;
338bool lresult = XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
424NativeMethods.LVGROUP group = new NativeMethods.LVGROUP();
425group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP)));
427group.mask = NativeMethods.LVGF_STATE;
428group.stateMask = NativeMethods.LVGS_COLLAPSED;
431isCollapsed = (group.state & NativeMethods.LVGS_COLLAPSED) != 0;
464int index = WindowsListView.GetItemNext(hwnd, -1, NativeMethods.LVNI_FOCUSED);
469NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 ();
471item.mask = NativeMethods.LVIF_GROUPID;
486int groupIndex = (int)Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
489NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6();
490groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
491groupInfo.mask = NativeMethods.LVGF_GROUPID;
495bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
504groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
506groupInfo.mask = NativeMethods.LVGF_STATE;
507groupInfo.stateMask = NativeMethods.LVGS_SUBSETLINKFOCUSED;
512if ((groupInfo.state & NativeMethods.LVGS_SUBSETLINKFOCUSED) != 0)
605NativeMethods.LVGROUP group = new NativeMethods.LVGROUP();
606group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP)));
609group.mask = NativeMethods.LVGF_STATE;
611group.stateMask = NativeMethods.LVGS_COLLAPSED;
612group.state = collapse ? NativeMethods.LVGS_COLLAPSED : 0;
681static private NewItemInDimension IsNewColumn (NativeMethods.Win32Rect rc1, NativeMethods.Win32Rect rc2)
719static private NewItemInDimension IsNewRow (NativeMethods.Win32Rect rc1, NativeMethods.Win32Rect rc2)
788NativeMethods.Win32Rect rc;
789NativeMethods.Win32Rect rcNext;
792if (WindowsListView.GetItemRect(hwnd, items[0], NativeMethods.LVIR_BOUNDS, out rc))
799if (!WindowsListView.GetItemRect(hwnd, items[i], NativeMethods.LVIR_BOUNDS, out rcNext))
848private delegate NewItemInDimension IsNewItemInDimension (NativeMethods.Win32Rect rc1, NativeMethods.Win32Rect rc2);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (55)
124internal NativeMethods.Win32Rect GetGroupRc(int id)
130return NativeMethods.Win32Rect.Empty;
135internal NativeMethods.Win32Rect GetGroupRcByIndex(int index)
139return NativeMethods.Win32Rect.Empty;
205NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 ();
207item.mask = NativeMethods.LVIF_GROUPID;
240return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0;
369NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6();
370item.mask = NativeMethods.LVIF_GROUPID;
377NativeMethods.LVITEMINDEX ii = new NativeMethods.LVITEMINDEX(-1, -1);
379int flags = NativeMethods.LVNI_VISIBLEONLY | NativeMethods.LVNI_VISIBLEORDER;
384while (XSendMessage.XSend (hwnd, NativeMethods.LVM_GETNEXTITEMINDEX, new IntPtr(&ii), flags, Marshal.SizeOf(ii.GetType())))
387NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6();
388groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
389groupInfo.mask = NativeMethods.LVGF_GROUPID;
391bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(ii.iGroup), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
463NativeMethods.LVGROUPMETRICS metric = new NativeMethods.LVGROUPMETRICS (sizeof(NativeMethods.LVGROUPMETRICS), NativeMethods.LVGMF_BORDERSIZE);
464XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPMETRICS, IntPtr.Zero, new IntPtr(&(metric.cbSize)), metric.cbSize, XSendMessage.ErrorValue.NoCheck);
482private NativeMethods.Win32Rect GetGroupRcInternal(Group group)
484NativeMethods.Win32Rect rcGroup = group.GetGroupRect();
615NativeMethods.Win32Rect rc1;
616WindowsListView.GetItemRect(_hwnd, item1, NativeMethods.LVIR_BOUNDS, out rc1);
618NativeMethods.Win32Rect rc2;
619WindowsListView.GetItemRect(_hwnd, item2, NativeMethods.LVIR_BOUNDS, out rc2);
695internal unsafe NativeMethods.Win32Rect GetGroupRect()
697NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect();
699rect.top = isCollapsed ? NativeMethods.LVGGR_HEADER : NativeMethods.LVGGR_GROUP;
700XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT,
708internal NativeMethods.Win32Rect CalculateRectNoHeader()
710NativeMethods.Win32Rect rcLv = NativeMethods.Win32Rect.Empty;
714return NativeMethods.Win32Rect.Empty;
718NativeMethods.Win32Rect item;
719WindowsListView.GetItemRect(_hwnd, _items[0], NativeMethods.LVIR_BOUNDS, out item);
721NativeMethods.Win32Rect groupRc;
732WindowsListView.GetItemRect(_hwnd, _items[count - 1], NativeMethods.LVIR_BOUNDS, out item);
741if (WindowScroll.Scrollable(_hwnd, NativeMethods.SB_VERT))
743NativeMethods.Win32Rect rc = GetScrollbarRect();
809private NativeMethods.Win32Rect GetScrollbarRect()
811NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo ();
814if (Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_VSCROLL, ref sbi))
816return new NativeMethods.Win32Rect(sbi.rcScrollBar.left, sbi.rcScrollBar.top, sbi.rcScrollBar.right, sbi.rcScrollBar.bottom);
819return NativeMethods.Win32Rect.Empty;
MS\Internal\AutomationProxies\WindowsListViewItem.cs (35)
102NativeMethods.Win32Rect itemRectangle = NativeMethods.Win32Rect.Empty;
110itemRectangle.left = NativeMethods.LVIR_BOUNDS;
130NativeMethods.LVITEMINDEX ii = new NativeMethods.LVITEMINDEX();
136if (XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETITEMINDEXRECT, new IntPtr(&ii), new IntPtr(&itemRectangle), Marshal.SizeOf(ii.GetType()), Marshal.SizeOf(itemRectangle.GetType())))
150if (WindowsListView.GetItemRect(_hwnd, _item, NativeMethods.LVIR_BOUNDS, out itemRectangle))
226NativeMethods.Win32Point clickPoint;
342NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (_hwnd, _item);
368int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
530NativeMethods.Win32Point clickPoint;
706NativeMethods.LVITEM lvitem = new NativeMethods.LVITEM ();
708lvitem.mask = NativeMethods.LVIF_TEXT;
733NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 ();
734item.mask = NativeMethods.LVIF_GROUPID;
856NativeMethods.Win32Rect listViewRect = new NativeMethods.Win32Rect();
857NativeMethods.Win32Rect headerRect = new NativeMethods.Win32Rect();
864NativeMethods.Win32Rect itemRect =
865new NativeMethods.Win32Rect(BoundingRectangle);
913private bool GetListviewitemClickablePoint (out NativeMethods.Win32Point clickPoint)
919NativeMethods.Win32Rect itemRectangle;
922if (!WindowsListView.GetItemRect(_hwnd, _item, NativeMethods.LVIR_LABEL, out itemRectangle))
931NativeMethods.Win32Point pt = new NativeMethods.Win32Point (itemRectangle.left, 0);
943if (!WindowsListView.GetItemRect(_hwnd, _item, NativeMethods.LVIR_LABEL, out itemRectangle))
955private void Click (NativeMethods.Win32Point clickPoint)
966IntPtr key = (IntPtr)((setValueSucceeded) ? NativeMethods.VK_RETURN : NativeMethods.VK_ESCAPE);
969int scanCode = SafeNativeMethods.MapVirtualKey (NativeMethods.VK_RETURN, 0);
976Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode));
977Misc.ProxySendMessage(hwnd, NativeMethods.WM_KEYUP, key, keyUpLParam);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (26)
74NativeMethods.Win32Rect itemRect = ListViewCheckBoxRect(_hwnd, _listviewItem);
145internal static NativeMethods.Win32Rect ListViewCheckBoxRect (IntPtr hwnd, int item)
151NativeMethods.Win32Rect controlRectangle = NativeMethods.Win32Rect.Empty;
155return NativeMethods.Win32Rect.Empty;
161NativeMethods.Win32Rect rc;
163if ((WindowsListView.GetItemRect(hwnd, item, NativeMethods.LVIR_ICON, out rc) && rc.left != rc.right) || (WindowsListView.GetItemRect(hwnd, item, NativeMethods.LVIR_LABEL, out rc) && rc.left != rc.right))
167return new NativeMethods.Win32Rect (controlRectangle.left, rc.top, right, rc.bottom);
173NativeMethods.Win32Rect wholeItem;
175if (!WindowsListView.GetItemRect(hwnd, item, NativeMethods.LVIR_BOUNDS, out wholeItem))
177return NativeMethods.Win32Rect.Empty;
180NativeMethods.Win32Rect selectable;
182if (!WindowsListView.GetItemRect(hwnd, item, NativeMethods.LVIR_SELECTBOUNDS, out selectable))
184return NativeMethods.Win32Rect.Empty;
189return new NativeMethods.Win32Rect (selectable.right, wholeItem.top, wholeItem.right, wholeItem.bottom);
193return new NativeMethods.Win32Rect (wholeItem.left, wholeItem.top, selectable.left, wholeItem.bottom);
197return NativeMethods.Win32Rect.Empty;
247NativeMethods.Win32Rect rc = ListViewCheckBoxRect(_hwnd, _listviewItem);
248NativeMethods.Win32Point pt = new NativeMethods.Win32Point((rc.left + rc.right) / 2, (rc.top + rc.bottom) / 2);
253Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
254Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (9)
74NativeMethods.Win32Rect itemRectangle;
78int lvir = (_item == 0) ? NativeMethods.LVIR_SELECTBOUNDS : NativeMethods.LVIR_BOUNDS;
91NativeMethods.Win32Rect itemRectangle1;
93if (!WindowsListView.GetSubItemRect(_hwnd, _itemParent, 1, NativeMethods.LVIR_BOUNDS, out itemRectangle1))
111NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (_hwnd, _itemParent);
349NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest (hwnd, item, new NativeMethods.Win32Point (x, y));
375int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (90)
119System.Diagnostics.Debug.Assert(idObject == NativeMethods.OBJID_MENU || idObject == NativeMethods.OBJID_SYSMENU, "Unexpected idObject");
121if (eventId == NativeMethods.EventObjectInvoke)
213NativeMethods.GUITHREADINFO gui;
231if (!Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE))
293if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE))
302else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_POPUPMENUMODE))
308else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE))
505internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint idItem, out NativeMethods.MENUBARINFO mbi)
507mbi = new NativeMethods.MENUBARINFO();
592NativeMethods.GUITHREADINFO gui;
672if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER))
720return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero);
731NativeMethods.GUITHREADINFO gui;
735return Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE);
748NativeMethods.MENUBARINFO mbi;
750if (GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero)
803NativeMethods.MENUBARINFO mbi;
804if (!GetMenuBarInfo(_hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi))
833NativeMethods.MENUBARINFO mbi;
834if (GetMenuBarInfo(_hwnd, NativeMethods.OBJID_MENU, 0, out mbi))
877NativeMethods.MENUBARINFO mbi;
881if (GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi) &&
899NativeMethods.GUITHREADINFO gui;
923int state = UnsafeNativeMethods.GetMenuState(hmenu, i, NativeMethods.MF_BYPOSITION);
924if (Misc.IsBitSet(state, NativeMethods.MF_HILITE))
956if (eventId == NativeMethods.EventSystemMenuPopupEnd)
1086NativeMethods.GUITHREADINFO gui;
1116new WinEventTracker.EvtIdProperty(NativeMethods.EventSystemMenuPopupStart, ExpandCollapsePattern.ExpandCollapseStateProperty),
1117new WinEventTracker.EvtIdProperty(NativeMethods.EventSystemMenuPopupEnd, ExpandCollapsePattern.ExpandCollapseStateProperty),
1118new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectInvoke, InvokePattern.InvokedEvent)
1249NativeMethods.MENUBARINFO mbi;
1251if (GetMenuBarInfo(_hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi))
1279NativeMethods.Win32Rect rc;
1420NativeMethods.Win32Rect itemWin32Rect = new NativeMethods.Win32Rect(itemRect);
1513while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
1871return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE);
1886return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED);
1891NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO();
1893menuItemInfo.fMask = NativeMethods.MIIM_FTYPE | NativeMethods.MIIM_SUBMENU | NativeMethods.MIIM_STATE;
1900return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero);
1906NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO ();
1908menuItemInfo.fMask = NativeMethods.MIIM_FTYPE | NativeMethods.MIIM_SUBMENU | NativeMethods.MIIM_STATE;
1915return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) ||
1916Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) ||
1917Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK));
1950NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO();
1952menuItemInfo.fMask = NativeMethods.MIIM_FTYPE | NativeMethods.MIIM_SUBMENU | NativeMethods.MIIM_STATE;
1961if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) ||
1962Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) ||
1963Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK))
2124Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' '));
2202for (item = 0; item < cItems && !Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++)
2244NativeMethods.GUITHREADINFO gui;
2337while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
2368if (Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE))
2403Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP))
2540int length = UnsafeNativeMethods.GetMenuString(_hmenu, _item, IntPtr.Zero, 0, NativeMethods.MF_BYPOSITION);
2549if (UnsafeNativeMethods.GetMenuString(_hmenu, _item, strbldr, length + 1, NativeMethods.MF_BYPOSITION) == length)
2557NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO();
2559menuItemInfo.fMask = NativeMethods.MIIM_TYPE | NativeMethods.MIIM_STATE | NativeMethods.MIIM_DATA | NativeMethods.MIIM_ID;
2564if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) ||
2565Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) ||
2566Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK))
2570else if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_OWNERDRAW))
2653int state = UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION);
2656return !(Misc.IsBitSet(state, NativeMethods.MF_DISABLED) | Misc.IsBitSet(state, NativeMethods.MF_GRAYED));
MS\Internal\AutomationProxies\WindowsRebar.cs (19)
58if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL)
123NativeMethods.Win32Rect rebarRect = new NativeMethods.Win32Rect ();
135NativeMethods.Win32Point pt = new NativeMethods.Win32Point (x, y);
194return Misc.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero);
198private unsafe int getRebarBandIDFromPoint (NativeMethods.Win32Point pt)
200NativeMethods.RB_HITTESTINFO rbHitTestInfo = new NativeMethods.RB_HITTESTINFO ();
205return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType()));
287IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
378Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero);
394NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty;
398if (!XSendMessage.XSend(hwnd, NativeMethods.RB_GETRECT, new IntPtr(item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero))
427NativeMethods.REBARBANDINFO rebarBandInfo = new NativeMethods.REBARBANDINFO();
432if (XSendMessage.XSend(_hwnd, NativeMethods.RB_GETBANDINFOA, new IntPtr(_item), new IntPtr(&rebarBandInfo), Marshal.SizeOf(rebarBandInfo.GetType()), XSendMessage.ErrorValue.Zero))
MS\Internal\AutomationProxies\WindowsRichEdit.cs (20)
70if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL)
77if (eventId == NativeMethods.EventObjectLocationChange
78&& idObject == NativeMethods.OBJID_CARET)
168if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY))
174if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(_hwnd))
189int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero);
196result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str));
443return (WindowStyle & NativeMethods.ES_READONLY) == NativeMethods.ES_READONLY;
461Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY));
484if (UnsafeNativeMethods.AccessibleObjectFromWindow(WindowHandle, NativeMethods.OBJID_NATIVEOM, ref UnsafeNativeMethods.IID_IDispatch, ref obj) != NativeMethods.S_OK)
535if (range.GetEmbeddedObject(out embeddedObject) == NativeMethods.S_OK && embeddedObject != null)
572text = acc.get_accName(NativeMethods.CHILD_SELF);
583int hr = NativeMethods.S_FALSE;
593if (hr != NativeMethods.S_OK)
621if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero)
631if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero)
677IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT);
MS\Internal\AutomationProxies\WindowsScroll.cs (64)
36bool isHorizontal = SetScrollPercent (hwnd, horizontalPercent, NativeMethods.SB_HORZ, out resultsNoCheck);
44bool isVertical = SetScrollPercent (hwnd, verticalPercent, NativeMethods.SB_VERT, out resultsNoCheck);
68bool fHz = ScrollCursor(hwnd, HorizontalAmount, NativeMethods.SB_HORZ, fForceResults);
69bool fVt = ScrollCursor (hwnd, VerticalAmount, NativeMethods.SB_VERT, fForceResults);
83return Scrollable (hwnd, NativeMethods.SB_HORZ) ? GetScrollInfo (hwnd, NativeMethods.SB_HORZ) : ScrollPattern.NoScroll;
87return Scrollable (hwnd, NativeMethods.SB_VERT) ? GetScrollInfo (hwnd, NativeMethods.SB_VERT) : ScrollPattern.NoScroll;
91return Scrollable (hwnd, NativeMethods.SB_HORZ) ? ScrollViewSize (hwnd, NativeMethods.SB_HORZ) : 100.0;
95return Scrollable (hwnd, NativeMethods.SB_VERT) ? ScrollViewSize (hwnd, NativeMethods.SB_VERT) : 100.0;
99return Scrollable (hwnd, NativeMethods.SB_HORZ);
103return Scrollable (hwnd, NativeMethods.SB_VERT);
114if ((sbFlag == NativeMethods.SB_HORZ && !Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) ||
115(sbFlag == NativeMethods.SB_VERT && !Misc.IsBitSet(style, NativeMethods.WS_VSCROLL)))
127NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo();
130(sbFlag == NativeMethods.SB_VERT) ? NativeMethods.OBJID_VSCROLL : NativeMethods.OBJID_HSCROLL;
134!Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE);
143NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo ();
145si.fMask = NativeMethods.SIF_ALL;
159bool hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.WS_HSCROLL) || Misc.IsBitSet(style, NativeMethods.WS_VSCROLL);
166hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.ES_MULTILINE);
175return Scrollable(hwnd, NativeMethods.SB_HORZ) || Scrollable(hwnd, NativeMethods.SB_VERT);
192NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo ();
194si.fMask = NativeMethods.SIF_ALL;
249NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo ();
251si.fMask = NativeMethods.SIF_RANGE | NativeMethods.SIF_PAGE;
283throw new ArgumentOutOfRangeException(sbFlag == NativeMethods.SB_HORZ ? "horizontalPercent" : "verticalPercent", SR.ScrollBarOutOfRange);
287NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo ();
288si.fMask = NativeMethods.SIF_ALL;
314int message = sbFlag == NativeMethods.SB_HORZ ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL;
316int wParam = NativeMethods.Util.MAKELONG(NativeMethods.SB_THUMBPOSITION, si.nPos);
361NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo ();
362si.fMask = NativeMethods.SIF_ALL;
377if (sbFlag == NativeMethods.SB_HORZ)
382nAction = NativeMethods.SB_LINELEFT;
386nAction = NativeMethods.SB_PAGELEFT;
390nAction = NativeMethods.SB_LINERIGHT;
394nAction = NativeMethods.SB_PAGERIGHT;
406nAction = NativeMethods.SB_LINEUP;
410nAction = NativeMethods.SB_PAGEUP;
414nAction = NativeMethods.SB_LINEDOWN;
418nAction = NativeMethods.SB_PAGEDOWN;
427int wParam = NativeMethods.Util.MAKELONG (nAction, 0);
428int message = sbFlag == NativeMethods.SB_HORZ ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL;
MS\Internal\AutomationProxies\WindowsScrollBar.cs (71)
47_sAutomationId = sbFlag == NativeMethods.SB_VERT ? "Vertical ScrollBar" : "Horizontal ScrollBar"; // This string is a non-localizable string
70return new WindowsScrollBar(hwnd, null, idChild, NativeMethods.SB_CTL);
78WindowsScrollBar wtv = new WindowsScrollBar (hwnd, null, -1, NativeMethods.SB_CTL);
80if (idChild == 0 && eventId == NativeMethods.EventObjectStateChange && idProp == ValuePattern.IsReadOnlyProperty)
88if (idObject == NativeMethods.OBJID_HSCROLL || idObject == NativeMethods.OBJID_VSCROLL)
90idObject = NativeMethods.OBJID_WINDOW;
101ProxySimple scrollBarBit = WindowsScrollBarBits.CreateFromChildId(hwnd, wtv, idChild, NativeMethods.SB_CTL);
133if (_sbFlag == NativeMethods.SB_CTL)
138NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo ();
141int idObject = _sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : _sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT;
169if (_sbFlag == NativeMethods.SB_VERT)
333NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(WindowsScrollBarBits.GetBoundingRectangle(_hwnd, this, item, _sbFlag));
415return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_VSCROLL);
420return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_HSCROLL);
425if (sbFlag == NativeMethods.SB_CTL)
426return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.SBS_VERT);
428return sbFlag == NativeMethods.SB_VERT;
434NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo ();
436si.fMask = NativeMethods.SIF_RANGE | NativeMethods.SIF_PAGE;
447int idObject = sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT;
448NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo ();
460NativeMethods.SIZE sizeArrow;
522NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo ();
525if (_sbFlag != NativeMethods.SB_CTL || Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_CLIENT, ref sbi))
532private int GetScrollMaxValue(NativeMethods.ScrollInfo si)
572NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo ();
573si.fMask = NativeMethods.SIF_ALL;
587if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent._hwnd)))
623NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo ();
624si.fMask = NativeMethods.SIF_ALL;
686if (_sbFlag == NativeMethods.SB_CTL)
694IsScrollBarVertical(_hwnd, _sbFlag) ? NativeMethods.WM_VSCROLL : NativeMethods.WM_HSCROLL;
698int wParam = NativeMethods.Util.MAKELONG ((short) NativeMethods.SB_THUMBPOSITION, (short) val);
700wParam = NativeMethods.Util.MAKELONG ((short) NativeMethods.SB_THUMBTRACK, (short) val);
709int idObject = sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT;
710NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo ();
725NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo();
728int idObject = NativeMethods.OBJID_CLIENT;
729if (_sbFlag == NativeMethods.SB_VERT)
731idObject = NativeMethods.OBJID_VSCROLL;
733else if (_sbFlag == NativeMethods.SB_HORZ)
735idObject = NativeMethods.OBJID_HSCROLL;
743return !Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE);
762protected int _sbFlag = NativeMethods.SB_CTL;
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (36)
180Scroll(amount, NativeMethods.SBS_VERT);
184Scroll(amount, NativeMethods.SBS_HORZ);
205NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo ();
207si.fMask = NativeMethods.SIF_RANGE;
222int idObject = sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT;
223NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo ();
242if (sbFlag == NativeMethods.SB_VERT)
295static internal Rect GetVerticalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi)
297NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(sbi.rcScrollBar.left, sbi.xyThumbTop, sbi.rcScrollBar.right, sbi.xyThumbBottom);
308NativeMethods.SIZE sizeArrow;
386static internal Rect GetHorizontalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi)
389NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(sbi.xyThumbTop, sbi.rcScrollBar.top, sbi.xyThumbBottom, sbi.rcScrollBar.bottom);
399NativeMethods.SIZE sizeArrow;
517IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(_hwnd) : _hwnd;
523wParam = NativeMethods.SB_PAGEUP;
527wParam = NativeMethods.SB_LINEUP;
531wParam = NativeMethods.SB_PAGEDOWN;
535wParam = NativeMethods.SB_LINEDOWN;
539NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo ();
540si.fMask = NativeMethods.SIF_ALL;
550if ((si.nPos == si.nMax) && (wParam == NativeMethods.SB_PAGEDOWN || wParam == NativeMethods.SB_LINEDOWN))
557if ((si.nPos == si.nMin) && (wParam == NativeMethods.SB_PAGEUP || wParam == NativeMethods.SB_LINEUP))
562int msg = (style == NativeMethods.SBS_HORZ) ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL;
MS\Internal\AutomationProxies\WindowsSlider.cs (26)
62if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL)
138NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SliderItem.GetBoundingRectangle (_hwnd, item, _fHorizontal));
173int msg = IsHorizontalSlider () ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL;
176int wParam = (newVal << 16) | NativeMethods.SB_THUMBPOSITION;
256return (Misc.IsBitSet(WindowStyle, NativeMethods.TBS_VERT));
261int value = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero);
264if ((this.WindowStyle & NativeMethods.TBS_REVERSED) != 0)
266int maxValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
284Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val));
291return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero);
299return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero);
307return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero);
315return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero);
409IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
438IntPtr wParam = (IntPtr) (_item == (int) WindowsSlider.SItem.LargeDecrement ? NativeMethods.VK_PRIOR : NativeMethods.VK_NEXT);
440Misc.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero);
456NativeMethods.Win32Rect rcChannel = new NativeMethods.Win32Rect ();
461XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck);
468NativeMethods.Win32Rect rcThumb = new NativeMethods.Win32Rect();
473XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck);
MS\Internal\AutomationProxies\WindowsStatusBar.cs (24)
63if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL)
75if (eventId == NativeMethods.EventObjectNameChange && idChild == 1)
224NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (WindowsStatusBarPane.GetBoundingRectangle (_hwnd, item));
235NativeMethods.Win32Rect rc = StatusBarGrip.GetBoundingRectangle (_hwnd);
337return Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero);
356Misc.EnumChildWindows(hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindChildFromRect), (void*)&info);
363NativeMethods.Win32Rect rc = NativeMethods.Win32Rect.Empty;
560return XSendMessage.GetItemRect(hwnd, NativeMethods.SB_GETRECT, item);
565if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) != NativeMethods.S_OK || acc == null)
596int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
600int len = NativeMethods.Util.LOWORD(retValue);
601return XSendMessage.GetItemText(_hwnd, NativeMethods.SB_GETTEXTW, _item, len);
789internal static NativeMethods.Win32Rect GetBoundingRectangle (IntPtr hwnd)
793return NativeMethods.Win32Rect.Empty;
796NativeMethods.Win32Rect client = new NativeMethods.Win32Rect();
799return NativeMethods.Win32Rect.Empty;
804NativeMethods.SIZE sizeGrip = WindowsGrip.GetGripSize(hwnd, true);
809return new NativeMethods.Win32Rect(client.left, client.bottom - sizeGrip.cy, client.left + sizeGrip.cx, client.bottom);
813return new NativeMethods.Win32Rect(client.right - sizeGrip.cx, client.bottom - sizeGrip.cy, client.right, client.bottom);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (52)
69if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL)
76IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT);
154NativeMethods.HDHITTESTINFO HitTestInfo = new NativeMethods.HDHITTESTINFO();
156HitTestInfo.pt = new NativeMethods.Win32Point (x, y);
164index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
169if (index != -1 && (NativeMethods.HHT_ONHEADER == (HitTestInfo.flags & 0x000F)))
180int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
196return Misc.IsBitSet(WindowStyle, NativeMethods.HDS_VERT) ? OrientationType.Vertical : OrientationType.Horizontal;
247IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (_hwnd, NativeMethods.GA_PARENT);
287Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero);
295return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.HDS_HIDDEN);
301return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero);
306return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
311NativeMethods.HDITEM item = new NativeMethods.HDITEM();
313item.mask = NativeMethods.HDI_ORDER;
425NativeMethods.Win32Rect itemRect = BoundingRect();
435NativeMethods.Win32Rect parentRect = NativeMethods.Win32Rect.Empty;
477NativeMethods.Win32Point pt;
484IntPtr center = NativeMethods.Util.MAKELPARAM (pt.x, pt.y);
487Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
488Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
531int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
555NativeMethods.HDITEM hdi = new NativeMethods.HDITEM();
557hdi.mask = NativeMethods.HDI_TEXT;
565private NativeMethods.Win32Rect BoundingRect ()
569NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty;
574result = XSendMessage.XSend(_hwnd, NativeMethods.HDM_GETITEMRECT, new IntPtr(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero);
581return NativeMethods.Win32Rect.Empty;
590int cxBorder = 8 * UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXBORDER);
636return NativeMethods.Win32Rect.Empty;
654return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_BUTTONS));
660return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_FILTERBAR));
665private bool GetInvokationPoint (out NativeMethods.Win32Point pt)
680NativeMethods.HDITEM item = new NativeMethods.HDITEM();
682item.mask = NativeMethods.HDI_FORMAT;
687if ((item.fmt & NativeMethods.HDF_SPLITBUTTON) != 0)
699int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero);
726Rect rect = XSendMessage.GetItemRect(_hwnd, NativeMethods.HDM_GETITEMDROPDOWNRECT, _item);
727NativeMethods.Win32Rect rectW32 = new NativeMethods.Win32Rect(rect);
728IntPtr center = NativeMethods.Util.MAKELPARAM (rectW32.left + ((rectW32.right - rectW32.left) / 2), rectW32.top + ((rectW32.bottom - rectW32.top) / 2));
733Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
734Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
MS\Internal\AutomationProxies\WindowsTab.cs (91)
54_upDownEvents[0]._evtId = NativeMethods.EventObjectValueChange;
85case NativeMethods.OBJID_CLIENT :
89if (eventId == NativeMethods.EventObjectSelection || eventId == NativeMethods.EventObjectSelectionRemove || eventId == NativeMethods.EventObjectSelectionAdd)
102if ((idProp == ScrollPattern.VerticalScrollPercentProperty && idObject != NativeMethods.OBJID_VSCROLL) ||
103(idProp == ScrollPattern.HorizontalScrollPercentProperty && idObject != NativeMethods.OBJID_HSCROLL))
260hti.pt = new NativeMethods.Win32Point (x, y);
279index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType()));
293int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero);
444return !Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS);
511int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
512int minPos = NativeMethods.Util.HIWORD(range);
513int maxPos = NativeMethods.Util.LOWORD(range);
519Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos);
520Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
540int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
543int posResult = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
546minPos = NativeMethods.Util.HIWORD(range);
547maxPos = NativeMethods.Util.LOWORD(range);
548currentPos = NativeMethods.Util.LOWORD(posResult);
576NativeMethods.Win32Rect viewable = new NativeMethods.Win32Rect ();
596NativeMethods.Win32Rect rectW32 = new NativeMethods.Win32Rect ();
651int count = Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero);
655NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty;
659result = XSendMessage.XSend(hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(count - 1), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero);
693int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
694int max = NativeMethods.Util.LOWORD(range);
697Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos);
698Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
725if (eventId == NativeMethods.EventObjectValueChange
728IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT);
756IntPtr childHwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD);
772childHwnd = Misc.GetWindow(childHwnd, NativeMethods.GW_HWNDLAST);
787return Misc.IsBitSet(style, NativeMethods.TCS_MULTILINE) &&
788(Misc.IsBitSet(style, NativeMethods.TCS_RIGHT) ||
789Misc.IsBitSet(style, NativeMethods.TCS_VERTICAL));
814int newPos = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
815int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
816int max = NativeMethods.Util.LOWORD(range);
817int min = NativeMethods.Util.HIWORD(range);
819if (NativeMethods.Util.HIWORD (newPos) == 0)
824newPos = NativeMethods.Util.LOWORD (newPos);
854Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos);
855Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
867return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_MULTISELECT));
972IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
999if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_FOCUSNEVER))
1009Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
1105NativeMethods.Win32Point pt = new NativeMethods.Win32Point();
1141NativeMethods.Win32Point pt = new NativeMethods.Win32Point();
1153else if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS))
1155Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero);
1178NativeMethods.TCITEM TCItem = new NativeMethods.TCITEM();
1179TCItem.Init(NativeMethods.TCIF_STATE);
1187return Misc.IsBitSet(TCItem.dwState, NativeMethods.TCIS_BUTTONPRESSED);
1245return Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
1261return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item;
1274private unsafe NativeMethods.Win32Rect BoundingRect()
1276NativeMethods.Win32Rect rectW32 = new NativeMethods.Win32Rect();
1278if (!XSendMessage.XSend(_hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(_item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero))
1280return NativeMethods.Win32Rect.Empty;
1283return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty;
1294if (Misc.IsBitSet(WindowStyle, (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_FOCUSNEVER)))
1299NativeMethods.Win32Point pt = new NativeMethods.Win32Point();
1305Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1306Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1312Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
1346NativeMethods.TCITEM tcitem = new NativeMethods.TCITEM();
1349tcitem.mask = NativeMethods.TCIF_TEXT;
MS\Internal\AutomationProxies\WindowsTitleBar.cs (59)
101return ReturnNextTitleBarChild (true, NativeMethods.INDEX_TITLEBAR_MIC);
107return ReturnNextTitleBarChild (true, NativeMethods.INDEX_TITLEBAR_MAC);
112int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y));
115case NativeMethods.HTCAPTION:
118case NativeMethods.HTMINBUTTON:
119return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_MINBUTTON);
121case NativeMethods.HTMAXBUTTON :
122return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_MAXBUTTON);
124case NativeMethods.HTHELP :
125return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_HELPBUTTON);
127case NativeMethods.HTCLOSE :
128return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON);
130case NativeMethods.HTSYSMENU :
163case NativeMethods.INDEX_TITLEBAR_HELPBUTTON :
164case NativeMethods.INDEX_TITLEBAR_MINBUTTON :
165case NativeMethods.INDEX_TITLEBAR_MAXBUTTON :
166case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON :
202for (int i = start; i >= NativeMethods.INDEX_TITLEBAR_MIC && i <= NativeMethods.INDEX_TITLEBAR_MAC; i += next ? 1 : -1)
206if (!Misc.IsBitSet(ti.rgstate[i], NativeMethods.STATE_SYSTEM_INVISIBLE) || i == _systemMenu)
222return !Misc.IsBitSet(ti.rgstate[0], NativeMethods.STATE_SYSTEM_INVISIBLE);
283case NativeMethods.INDEX_TITLEBAR_HELPBUTTON:
286case NativeMethods.INDEX_TITLEBAR_MINBUTTON:
287if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE))
296case NativeMethods.INDEX_TITLEBAR_MAXBUTTON:
297if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE))
306case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON:
317case NativeMethods.INDEX_TITLEBAR_HELPBUTTON:
318if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_DISABLED))
323return Misc.IsBitSet(WindowExStyle, NativeMethods.WS_EX_CONTEXTHELP);
325case NativeMethods.INDEX_TITLEBAR_MINBUTTON:
329if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED))
334return Misc.IsBitSet(style, NativeMethods.WS_MINIMIZEBOX);
337case NativeMethods.INDEX_TITLEBAR_MAXBUTTON:
341if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED))
346return Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZEBOX);
371case NativeMethods.INDEX_TITLEBAR_MINBUTTON:
372if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE))
377case NativeMethods.INDEX_TITLEBAR_HELPBUTTON:
380case NativeMethods.INDEX_TITLEBAR_MAXBUTTON:
381if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE))
386case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON:
411case NativeMethods.INDEX_TITLEBAR_MINBUTTON :
412if ((WindowStyle & NativeMethods.WS_MINIMIZE) != 0)
413command = NativeMethods.SC_RESTORE;
415command = NativeMethods.SC_MINIMIZE;
418case NativeMethods.INDEX_TITLEBAR_HELPBUTTON :
419command = NativeMethods.SC_CONTEXTHELP;
422case NativeMethods.INDEX_TITLEBAR_MAXBUTTON :
423if ((WindowStyle & NativeMethods.WS_MAXIMIZE) != 0)
424command = NativeMethods.SC_RESTORE;
426command = NativeMethods.SC_MAXIMIZE;
429case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON :
430if ((WindowStyle & NativeMethods.WS_MINIMIZE) != 0)
432Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero);
435command = NativeMethods.SC_CLOSE;
446Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (38)
58Accessible acc = Accessible.CreateNativeFromEvent(hwnd, NativeMethods.OBJID_CLIENT, NativeMethods.CHILD_SELF);
79if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL)
92if (eventId == NativeMethods.EventObjectDestroy && idProp == AutomationElement.StructureChangedEvent)
214NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (ToolbarItem.GetBoundingRectangle (_hwnd, item));
232int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero);
236Accessible acc = Accessible.CreateNativeFromEvent(_hwnd, NativeMethods.OBJID_CLIENT, NativeMethods.CHILD_SELF);
265name = GetAccessibleName(NativeMethods.CHILD_SELF);
286NativeMethods.TBBUTTON tbb = new NativeMethods.TBBUTTON ();
303if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0)
305Accessible acc = Accessible.CreateNativeFromEvent(_hwnd, NativeMethods.OBJID_CLIENT, item + 1);
333return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero);
364NativeMethods.TBBUTTON tbb = new NativeMethods.TBBUTTON();
372bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0;
373int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero);
379if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_SEP))
381else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_CHECK))
390else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_DROPDOWN)
391&& Misc.IsBitSet(exStyle, NativeMethods.TBSTYLE_EX_DRAWDDARROWS))
396else if (!hasImageList || tbb.iBitmap == NativeMethods.I_IMAGENONE)
432if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
472return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0;
518Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero);
564return XSendMessage.GetItemRect(hwnd, NativeMethods.TB_GETITEMRECT, item);
580return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item;
602int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero);
605return XSendMessage.GetItemText(_hwnd, NativeMethods.TB_GETBUTTONTEXT, _idCommand, len);
626NativeMethods.TBBUTTON tbb = new NativeMethods.TBBUTTON();
639IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
647|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
654if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
681if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (28)
64if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL)
145if (idObject != NativeMethods.OBJID_WINDOW)
161if( eventId == NativeMethods.EVENT_OBJECT_HIDE /*|| eventId == NativeMethods.EVENT_OBJECT_DESTROY*/ )
237NativeMethods.Win32Point pt = new NativeMethods.Win32Point();
268case NativeMethods.INDEX_TITLEBAR_MINBUTTON:
269if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE))
274case NativeMethods.INDEX_TITLEBAR_HELPBUTTON:
277case NativeMethods.INDEX_TITLEBAR_MAXBUTTON:
278if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE))
283case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON:
286case NativeMethods.INDEX_TITLEBAR_SELF:
296NativeMethods.Win32Point pt = new NativeMethods.Win32Point();
308int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
312case NativeMethods.HTMINBUTTON:
313if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MINIMIZE))
318case NativeMethods.HTMAXBUTTON:
319if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MAXIMIZE))
324case NativeMethods.HTCLOSE:
325case NativeMethods.HTMDICLOSE:
328case NativeMethods.HTHELP:
331case NativeMethods.HTMDIMINBUTTON:
334case NativeMethods.HTMDIMAXBUTTON:
337case NativeMethods.HTCAPTION:
358new WinEventTracker.EvtIdProperty(NativeMethods.EVENT_OBJECT_HIDE, 0),
MS\Internal\AutomationProxies\WindowsTreeView.cs (88)
66case NativeMethods.OBJID_CLIENT :
71if (idChild != 0 && (eventId == NativeMethods.EventObjectSelection ||
72eventId == NativeMethods.EventObjectSelectionRemove ||
73eventId == NativeMethods.EventObjectSelectionAdd ||
74eventId == NativeMethods.EventObjectStateChange ||
75eventId == NativeMethods.EventObjectDestroy ||
76eventId == NativeMethods.EventObjectCreate ||
77eventId == NativeMethods.EventObjectNameChange))
89case NativeMethods.OBJID_VSCROLL :
90case NativeMethods.OBJID_HSCROLL :
99if (idProp == ExpandCollapsePattern.ExpandCollapseStateProperty && el is TreeViewItem && eventId == NativeMethods.EventObjectStateChange)
106if (((idProp as AutomationEvent) == AutomationElement.StructureChangedEvent && el is TreeViewItem) && !(eventId == NativeMethods.EventObjectDestroy || eventId == NativeMethods.EventObjectCreate))
338return new int[] { NativeMethods.EventObjectNameChange,
339NativeMethods.EventObjectStateChange };
343return new int[] { NativeMethods.EventObjectStateChange };
356new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectStateChange, idEvent),
357new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectCreate, idEvent),
358new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectDestroy, idEvent)
411return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0;
417return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0;
423int expanded = GetItemState(hwnd, treeItem, NativeMethods.TVIS_EXPANDED);
425return (Misc.IsBitSet(expanded, NativeMethods.TVIS_EXPANDED));
436if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0)
442fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0;
451return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_CARET);
461return GetNext(hwnd, treeItem, NativeMethods.TVGN_PARENT);
467return GetNext(hwnd, treeItem, NativeMethods.TVGN_NEXT);
473return GetNext(hwnd, treeItem, NativeMethods.TVGN_PREVIOUS);
479return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_ROOT);
485return GetNext(hwnd, treeItem, NativeMethods.TVGN_CHILD);
495int state = GetItemState(hwnd, treeItem, NativeMethods.TVIS_STATEIMAGEMASK);
507NativeMethods.TVITEM treeItem = new NativeMethods.TVITEM ();
509treeItem.mask = NativeMethods.TVIF_STATE;
511treeItem.stateMask = NativeMethods.TVIS_STATEIMAGEMASK;
523return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem);
529return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask));
535NativeMethods.TVITEM treeItem;
537if (!GetItem(hwnd, item, NativeMethods.TVIF_CHILDREN, out treeItem))
548private static unsafe NativeMethods.Win32Rect GetItemRect (IntPtr hwnd, IntPtr treeItem, bool labelOnly)
550NativeMethods.Win32Rect rc = NativeMethods.Win32Rect.Empty;
560if (!XSendMessage.XSend(hwnd, NativeMethods.TVM_GETITEMRECT, partialDisplay, rectangle, Marshal.SizeOf(rc.GetType())))
562return NativeMethods.Win32Rect.Empty;
569return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty;
575private static bool GetItem (IntPtr hwnd, IntPtr item, int mask, out NativeMethods.TVITEM treeItem)
577treeItem = new NativeMethods.TVITEM ();
586NativeMethods.TVITEM treeItem = new NativeMethods.TVITEM();
588treeItem.mask = NativeMethods.TVIF_TEXT;
600IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item);
611if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1)
614Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero);
622Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero);
648IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero);
659int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero);
820_nativeAcc = Accessible.CreateNativeFromEvent(_hwnd, NativeMethods.OBJID_CLIENT, childId);
849NativeMethods.Win32Rect itemRect = GetItemRect(_hwnd, _hItem, true);
868IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero);
912NativeMethods.Win32Rect itemWin32Rect = new NativeMethods.Win32Rect(itemRect);
943int highPart = NativeMethods.Util.HIDWORD((long)_hItem);
944int lowPart = NativeMethods.Util.LODWORD((long)_hItem);
1233Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem);
1286int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED));
1288return Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED);
1459NativeMethods.Win32Rect rectItem = WindowsTreeView.GetItemRect(_hwnd, _hItem, true);
1467NativeMethods.Win32Point pt = new NativeMethods.Win32Point(((rectItem.left + rectItem.right) / 2), ((rectItem.top + rectItem.bottom) / 2));
1479return Misc.IsBitSet(WindowStyle, NativeMethods.TVS_EDITLABELS);
1485int selected = WindowsTreeView.GetItemState(_hwnd, _hItem, NativeMethods.TVIS_SELECTED);
1487if (Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED))
1499bool isCheckbox = Misc.IsBitSet(WindowStyle, NativeMethods.TVS_CHECKBOXES);
1539private void SimulateClick(NativeMethods.Win32Point pt)
1542Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1543Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
1548NativeMethods.TVITEM treeItem;
1549if (WindowsTreeView.GetItem(_hwnd, _hItem, NativeMethods.TVIF_IMAGE | NativeMethods.TVIF_STATE, out treeItem))
MS\Internal\AutomationProxies\WindowsUpDown.cs (35)
62if(idObject == NativeMethods.OBJID_CLIENT
63&& eventId == NativeMethods.EventObjectInvoke
68else if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL)
90button.DispatchEvents(NativeMethods.EventObjectInvoke, InvokePattern.InvokedEvent, idObject, idChild);
188NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SpinButtonItem.GetBoundingRectangle (_hwnd, item));
227Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0));
230Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero);
293IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT);
308int hr = Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc);
311return hr == NativeMethods.S_OK && acc != null ? acc.Role == AccessibleRole.SpinButton : false;
344int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero);
351return (double)NativeMethods.Util.LOWORD(pos);
357IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero);
381int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
382int min = NativeMethods.Util.HIWORD(range);
383int max = NativeMethods.Util.LOWORD(range);
395int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
396int min = NativeMethods.Util.HIWORD(range);
397int max = NativeMethods.Util.LOWORD(range);
534NativeMethods.Win32Rect updownRect = new NativeMethods.Win32Rect();
543IntPtr center = NativeMethods.Util.MAKELPARAM (x, y);
546Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center);
547Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center);
562NativeMethods.Win32Rect updownRect = new NativeMethods.Win32Rect();
624IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT);
637return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.UDS_HORZ);
MS\Internal\AutomationProxies\WinEventTracker.cs (57)
155NativeMethods.WinEventProcDef proc = new NativeMethods.WinEventProcDef (WinEventProc);
179hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT);
249if (!((idObject == NativeMethods.OBJID_MENU || idObject == NativeMethods.OBJID_SYSMENU) && eventId == NativeMethods.EventObjectInvoke) &&
534NativeMethods.EventSystemSound,
535NativeMethods.EventSystemAlert,
536NativeMethods.EventSystemForeground,
537NativeMethods.EventSystemMenuStart,
538NativeMethods.EventSystemMenuEnd,
539NativeMethods.EventSystemMenuPopupStart,
540NativeMethods.EventSystemMenuPopupEnd,
541NativeMethods.EventSystemCaptureStart,
542NativeMethods.EventSystemCaptureEnd,
543NativeMethods.EventSystemMoveSizeStart,
544NativeMethods.EventSystemMoveSizeEnd,
545NativeMethods.EventSystemContextHelpStart,
546NativeMethods.EventSystemContextHelpEnd,
547NativeMethods.EventSystemDragDropStart,
548NativeMethods.EventSystemDragDropEnd,
549NativeMethods.EventSystemDialogStart,
550NativeMethods.EventSystemDialogEnd,
551NativeMethods.EventSystemScrollingStart,
552NativeMethods.EventSystemScrollingEnd,
553NativeMethods.EventSystemSwitchEnd,
554NativeMethods.EventSystemMinimizeStart,
555NativeMethods.EventSystemMinimizeEnd,
556NativeMethods.EventSystemPaint,
557NativeMethods.EventConsoleCaret,
558NativeMethods.EventConsoleUpdateRegion,
559NativeMethods.EventConsoleUpdateSimple,
560NativeMethods.EventConsoleUpdateScroll,
561NativeMethods.EventConsoleLayout,
562NativeMethods.EventConsoleStartApplication,
563NativeMethods.EventConsoleEndApplication,
564NativeMethods.EventObjectCreate,
565NativeMethods.EventObjectDestroy,
566NativeMethods.EventObjectShow,
567NativeMethods.EventObjectHide,
568NativeMethods.EventObjectReorder,
569NativeMethods.EventObjectFocus,
570NativeMethods.EventObjectSelection,
571NativeMethods.EventObjectSelectionAdd,
572NativeMethods.EventObjectSelectionRemove,
573NativeMethods.EventObjectSelectionWithin,
574NativeMethods.EventObjectStateChange,
575NativeMethods.EventObjectLocationChange,
576NativeMethods.EventObjectNameChange,
577NativeMethods.EventObjectDescriptionChange,
578NativeMethods.EventObjectValueChange,
579NativeMethods.EventObjectParentChange,
580NativeMethods.EventObjectHelpChange,
581NativeMethods.EventObjectDefactionChange,
582NativeMethods.EventObjectAcceleratorChange,
583NativeMethods.EventObjectInvoke,
584NativeMethods.EventObjectTextSelectionChanged
MS\Win32\UnsafeNativeMethods.cs (32)
21internal static extern int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf);
33internal static extern void GetSystemInfo(out NativeMethods.SYSTEM_INFO SystemInfo);
113internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags);
148public static extern bool GetMenuItemInfo(IntPtr hMenu, int uItem, bool fByPosition, [In, Out] ref NativeMethods.MENUITEMINFO menuItemInfo);
150public static extern bool GetMenuItemRect(IntPtr hWnd, IntPtr hMenu, int uItem, out NativeMethods.Win32Rect lprcItem);
158internal static extern IntPtr DispatchMessage([In] ref NativeMethods.MSG msg);
160internal static extern int GetMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hWnd, int uMsgFilterMin, int uMsgFilterMax);
162internal static extern bool PeekMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hwnd, int uMsgFilterMin, int uMsgFilterMax, int wRemoveMsg);
170internal static extern IntPtr SendMessageTimeout(IntPtr hwnd, int uMsg, IntPtr wParam, ref NativeMethods.Win32Rect lParam, int flags, int uTimeout, out IntPtr result);
176internal static extern bool TranslateMessage([In, Out] ref NativeMethods.MSG msg);
184internal static extern IntPtr MonitorFromRect(ref NativeMethods.Win32Rect rect, int dwFlags);
194internal static extern int SendInput (int nInputs, ref NativeMethods.INPUT ki, int cbSize);
227internal static extern bool GetComboBoxInfo(IntPtr hwnd, [In, Out] ref NativeMethods.COMBOBOXINFO cbInfo);
233internal static extern bool GetCursorPos([In, Out] ref NativeMethods.Win32Point pt);
235internal static extern bool GetPhysicalCursorPos([In, Out] ref NativeMethods.Win32Point pt);
247internal static extern bool GetScrollBarInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollBarInfo lpsi);
249internal static extern bool GetScrollInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollInfo lpsi);
255internal unsafe static extern bool EnumChildWindows(IntPtr hwndParent, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam);
261internal static extern bool GetClientRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect);
263internal static extern bool GetGUIThreadInfo(uint idThread, ref NativeMethods.GUITHREADINFO guiThreadInfo);
267internal static extern bool GetWindowRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect);
291internal NativeMethods.Win32Point ptStart;
325internal NativeMethods.Win32Rect rcTitleBar;
326[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = NativeMethods.CCHILDREN_TITLEBAR + 1)]
334internal NativeMethods.Win32Rect rcTitleBar;
335[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = NativeMethods.CCHILDREN_TITLEBAR + 1)]
337[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = NativeMethods.CCHILDREN_TITLEBAR + 1)]
338internal NativeMethods.Win32Rect[] rgrect;
356internal NativeMethods.Win32Rect rc;
387iResult = NativeMethods.IntPtrToInt32(result);
446public NativeMethods.Win32Point pt;
472public NativeMethods.Win32Point pt;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (4)
73public static extern bool GetMenuBarInfo (IntPtr hwnd, int idObject, uint idItem, ref NativeMethods.MENUBARINFO mbi);
76public static extern int GetTextExtentPoint32(IntPtr hdc, [MarshalAs(UnmanagedType.LPWStr)]string lpString, int cbString, out NativeMethods.SIZE lpSize);
85public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Rect rect, int cPoints);
88public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Point pt, int cPoints);