2220 references to NativeMethods
UIAutomationClientsideProviders (2220)
MS\Internal\AutomationProxies\Accessible.cs (53)
177IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject)); 185int hr = NativeMethods.S_FALSE; 225if(hr == NativeMethods.S_OK && acc != null) 232if (hr != NativeMethods.S_OK || acc == null) 286return Wrap(acc, NativeMethods.CHILD_SELF); 317return _idChild == NativeMethods.CHILD_SELF ? GetChildAt(_acc, null, 0) : null; 325return _idChild == NativeMethods.CHILD_SELF ? GetChildAt(_acc, null, Accessible.GetChildCount(_acc) - 1) : null; 394if (_idChild != NativeMethods.CHILD_SELF) 570NativeMethods.Win32Rect rcW32 = GetLocation(_acc, _idChild); 703if (childId == NativeMethods.CHILD_SELF) 761Debug.Assert(_idChild == NativeMethods.CHILD_SELF); 801if (idChild == NativeMethods.CHILD_SELF) 817rval = Wrap((IAccessible)scan, NativeMethods.CHILD_SELF); 850Select(NativeMethods.SELFLAG_TAKEFOCUS); 856Select(NativeMethods.SELFLAG_TAKEFOCUS|NativeMethods.SELFLAG_TAKESELECTION); 864Select(NativeMethods.SELFLAG_TAKEFOCUS|NativeMethods.SELFLAG_ADDSELECTION); 872Select(NativeMethods.SELFLAG_TAKEFOCUS|NativeMethods.SELFLAG_REMOVESELECTION); 890if ( result != NativeMethods.S_OK) 929if (hr != NativeMethods.S_OK || accObject == null) 931return NativeMethods.S_FALSE; 944return NativeMethods.S_FALSE; 966if (UnsafeNativeMethods.AccessibleChildren(accessibleObject, 0, childCount, aChildren, out childrenReturned) == NativeMethods.E_INVALIDARG) 1074NativeMethods.Win32Rect rect1 = GetLocation(_acc, _idChild); 1075NativeMethods.Win32Rect rect2 = GetLocation(acc, idChild); 1130idChild = NativeMethods.CHILD_SELF; 1170idChild = NativeMethods.CHILD_SELF; 1323internal static NativeMethods.Win32Rect GetLocation(IAccessible acc, int idChild) 1326NativeMethods.Win32Rect rect = NativeMethods.Win32Rect.Empty; 1341return NativeMethods.Win32Rect.Empty; 1393case NativeMethods.RPC_E_SERVERFAULT: // The server threw an exception. 1394case NativeMethods.RPC_E_DISCONNECTED: // The object invoked has disconnected from its clients. 1395case NativeMethods.RPC_E_UNAVAILABLE: // The server has disappeared 1396case NativeMethods.DISP_E_BADINDEX: // Index out of Range (Usually means Children have disappeared) 1397case NativeMethods.E_INTERFACEUNKNOWN: // The interface is unknown, usually because things have changed. 1398case NativeMethods.E_UNKNOWNWORDERROR: // An unknown Error code thrown by Word being closed while a search is running 1399case NativeMethods.RPC_E_SYS_CALL_FAILED: // System call failed during RPC. 1402case NativeMethods.E_FAIL: 1405case NativeMethods.E_MEMBERNOTFOUND: 1409case NativeMethods.E_NOTIMPL: 1413case NativeMethods.E_OUTOFMEMORY: 1420case NativeMethods.E_INVALIDARG: 1426case NativeMethods.E_ACCESSDENIED: 1430case NativeMethods.E_UNEXPECTED: 1482NativeMethods.Win32Rect ownLoc = GetLocation(old, NativeMethods.CHILD_SELF); 1483AccessibleRole ownRole = GetRole(old, NativeMethods.CHILD_SELF); 1510AccessibleRole role = GetRole(accChild, NativeMethods.CHILD_SELF); 1514NativeMethods.Win32Rect loc = GetLocation(accChild, NativeMethods.CHILD_SELF);
MS\Internal\AutomationProxies\ClickablePoint.cs (14)
57static internal bool GetPoint(IntPtr hwnd, ArrayList alIn, ArrayList alOut, ref NativeMethods.Win32Point pt) 64for (hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT)) 78hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDPREV); 88if (Misc.IsBitSet(Misc.GetWindowStyle(hwndCurrent), NativeMethods.WS_POPUP)) 155NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(simple.BoundingRectangle); 203internal CPRect(ref NativeMethods.Win32Rect rc, bool fRiAsInsideRect) 235private static bool ClickableInRect(IntPtr hwnd, ref NativeMethods.Win32Point pt, bool fRiAsInsideRect, ArrayList alIn, ArrayList alOut) 243NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(); 263int lr = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 265if (lr == NativeMethods.HTTRANSPARENT)
MS\Internal\AutomationProxies\CommonGetThemePartSize.cs (12)
49internal NativeMethods.SIZE Size (int iPartId, int iStateId) 53NativeMethods.SIZE size = new NativeMethods.SIZE(0, 0); 73size.cx = UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXSIZE); 74size.cy = UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXSIZE); 78size.cx = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXVSCROLL); 79size.cy = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYHSCROLL); 83size.cx = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXHSCROLL); 84size.cy = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYVSCROLL); 91size.cx = UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXSIZE); 92size.cy = UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXSIZE); 202private static unsafe extern IntPtr GetThemePartSize(SafeThemeHandle hTheme, IntPtr hdc, int iPartId, int iStateId, IntPtr prc, int eSize, NativeMethods.SIZE* psz);
MS\Internal\AutomationProxies\CommonXSendMessage.cs (204)
409internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVITEM item) 417return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 423return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, 432return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 438internal static unsafe bool SetItem(IntPtr hwnd, int index, NativeMethods.LVITEM item) 446return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType())); 452return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 458return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 464internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.LVITEM_V6 item) 472fixed (NativeMethods.LVITEM_V6 *pItem = &item) 474return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 481bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 485item = (NativeMethods.LVITEM_V6)item32; 493bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 497item = (NativeMethods.LVITEM_V6)item64; 505internal static unsafe bool SetGroupInfo(IntPtr hwnd, NativeMethods.LVGROUP group) 513int result = XSendGetIndex(hwnd, NativeMethods.LVM_SETGROUPINFO, 520int result = XSendGetIndex(hwnd, NativeMethods.LVM_SETGROUPINFO, 527int result = XSendGetIndex(hwnd, NativeMethods.LVM_SETGROUPINFO, 535internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP group) 544fixed (NativeMethods.LVGROUP* pGroup = &group) 546result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 557int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 561group = (NativeMethods.LVGROUP)group32; 568int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 572group = (NativeMethods.LVGROUP)group64; 580internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP_V6 group) 589fixed (NativeMethods.LVGROUP_V6* pGroup = &group) 591result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 602int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 606group = (NativeMethods.LVGROUP_V6)group32; 613int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 617group = (NativeMethods.LVGROUP_V6)group64; 625internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP item) 639return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszHeader), item.cchHeader); 651return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszHeader), item32.cchHeader); 663return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszHeader), item64.cchHeader); 669internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP_V6 item, int mask) 680if (((mask & NativeMethods.LVGF_HEADER) == 0) && ((mask & NativeMethods.LVGF_SUBSET) == 0)) 688case NativeMethods.LVGF_HEADER: 693case NativeMethods.LVGF_SUBSET: 698return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true); 706case NativeMethods.LVGF_HEADER: 711case NativeMethods.LVGF_SUBSET: 716return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true); 724case NativeMethods.LVGF_HEADER: 729case NativeMethods.LVGF_SUBSET: 734return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), textAddress, size, true); 750internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TCITEM item) 758fixed (NativeMethods.TCITEM* pItem = &item) 760return XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 767bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 771item = (NativeMethods.TCITEM)item32; 780bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 784item = (NativeMethods.TCITEM)item64; 793internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.TCITEM item) 801return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 807return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), 816return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 832internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.HDITEM item) 840fixed (NativeMethods.HDITEM* pItem = &item) 842return XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 849bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 853item = (NativeMethods.HDITEM)item32; 862bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 866item = (NativeMethods.HDITEM)item64; 875internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.HDITEM item) 883return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 890hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), 898return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 914internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.TVITEM item) 922fixed (NativeMethods.TVITEM* pItem = &item) 924return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 931bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 935item = (NativeMethods.TVITEM)item32; 944bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 948item = (NativeMethods.TVITEM)item64; 957internal static unsafe bool SetItem(IntPtr hwnd, NativeMethods.TVITEM item) 965return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 971return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 977return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 991NativeMethods.Win32Point clientPoint = new NativeMethods.Win32Point(x, y); 996NativeMethods.TVHITTESTINFO hitTestInfo = 997new NativeMethods.TVHITTESTINFO(clientPoint.x, clientPoint.y, 0); 998if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo), 1007if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo32), 1016if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo64), 1028internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TVITEM item) 1036return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1043hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), 1051return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1067internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TBBUTTON item) 1075fixed (NativeMethods.TBBUTTON* pItem = &item) 1077return XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()), ErrorValue.Zero); 1084bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), ErrorValue.Zero); 1088item = (NativeMethods.TBBUTTON)item32; 1097bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), ErrorValue.Zero); 1101item = (NativeMethods.TBBUTTON)item64; 1119internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TOOLINFO item) 1134hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item), 1142hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item32), 1151hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item64), 1179NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty; 1340private static string ListView_V6_GetGroupTextOnWinXp(IntPtr hwnd, NativeMethods.LVGROUP group) 1360XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1366using (SafeCoTaskMem copyTo = new SafeCoTaskMem(NativeMethods.MAX_PATH)) 1375if (Misc.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1408XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1414using (SafeCoTaskMem copyTo = new SafeCoTaskMem(NativeMethods.MAX_PATH)) 1423if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1456XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1462using (SafeCoTaskMem copyTo = new SafeCoTaskMem(NativeMethods.MAX_PATH)) 1471if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1569internal TCITEM_32(NativeMethods.TCITEM item) 1581static public explicit operator NativeMethods.TCITEM(TCITEM_32 item) 1583NativeMethods.TCITEM nativeItem = new NativeMethods.TCITEM(); 1610internal TCITEM_64(NativeMethods.TCITEM item) 1623static public explicit operator NativeMethods.TCITEM(TCITEM_64 item) 1625NativeMethods.TCITEM nativeItem = new NativeMethods.TCITEM(); 1655internal HDITEM_32(NativeMethods.HDITEM item) 1671static public explicit operator NativeMethods.HDITEM(HDITEM_32 item) 1673NativeMethods.HDITEM nativeItem = new NativeMethods.HDITEM(); 1707internal HDITEM_64(NativeMethods.HDITEM item) 1723static public explicit operator NativeMethods.HDITEM(HDITEM_64 item) 1725NativeMethods.HDITEM nativeItem = new NativeMethods.HDITEM(); 1758internal LVITEM_32(NativeMethods.LVITEM item) 1773static public explicit operator NativeMethods.LVITEM(LVITEM_32 item) 1775NativeMethods.LVITEM nativeItem = new NativeMethods.LVITEM(); 1808internal LVITEM_64(NativeMethods.LVITEM item) 1824static public explicit operator NativeMethods.LVITEM(LVITEM_64 item) 1826NativeMethods.LVITEM nativeItem = new NativeMethods.LVITEM(); 1861internal LVITEM_V6_32(NativeMethods.LVITEM_V6 item) 1879static public explicit operator NativeMethods.LVITEM_V6(LVITEM_V6_32 item) 1881NativeMethods.LVITEM_V6 nativeItem = new NativeMethods.LVITEM_V6(); 1921internal LVITEM_V6_64(NativeMethods.LVITEM_V6 item) 1941static public explicit operator NativeMethods.LVITEM_V6(LVITEM_V6_64 item) 1943NativeMethods.LVITEM_V6 nativeItem = new NativeMethods.LVITEM_V6(); 1978internal LVGROUP_32(NativeMethods.LVGROUP item) 1993static public explicit operator NativeMethods.LVGROUP(LVGROUP_32 item) 1995NativeMethods.LVGROUP nativeItem = new NativeMethods.LVGROUP(); 1997nativeItem.cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP)); 2043internal LVGROUP_V6_32(NativeMethods.LVGROUP_V6 item) 2074static public explicit operator NativeMethods.LVGROUP_V6(LVGROUP_V6_32 item) 2076NativeMethods.LVGROUP_V6 nativeItem = new NativeMethods.LVGROUP_V6(); 2078nativeItem.cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)); 2125internal LVGROUP_64(NativeMethods.LVGROUP item) 2141static public explicit operator NativeMethods.LVGROUP(LVGROUP_64 item) 2143NativeMethods.LVGROUP nativeItem = new NativeMethods.LVGROUP(); 2145nativeItem.cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP)); 2192internal LVGROUP_V6_64(NativeMethods.LVGROUP_V6 item) 2224static public explicit operator NativeMethods.LVGROUP_V6(LVGROUP_V6_64 item) 2226NativeMethods.LVGROUP_V6 nativeItem = new NativeMethods.LVGROUP_V6(); 2228nativeItem.cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)); 2272internal TBBUTTON_32(NativeMethods.TBBUTTON item) 2285static public explicit operator NativeMethods.TBBUTTON(TBBUTTON_32 item) 2287NativeMethods.TBBUTTON nativeItem = new NativeMethods.TBBUTTON(); 2316internal TBBUTTON_64(NativeMethods.TBBUTTON item) 2330static public explicit operator NativeMethods.TBBUTTON(TBBUTTON_64 item) 2332NativeMethods.TBBUTTON nativeItem = new NativeMethods.TBBUTTON(); 2363internal TVITEM_32(NativeMethods.TVITEM item) 2383static public explicit operator NativeMethods.TVITEM(TVITEM_32 item) 2385NativeMethods.TVITEM nativeItem = new NativeMethods.TVITEM(); 2418internal TVITEM_64(NativeMethods.TVITEM item) 2434static public explicit operator NativeMethods.TVITEM(TVITEM_64 item) 2436NativeMethods.TVITEM nativeItem = new NativeMethods.TVITEM(); 2456internal NativeMethods.Win32Point pt; 2469static public explicit operator NativeMethods.TVHITTESTINFO(TVHITTESTINFO_32 hitTestInfo) 2471NativeMethods.TVHITTESTINFO nativeHitTestInfo = new NativeMethods.TVHITTESTINFO(); 2483internal NativeMethods.Win32Point pt; 2496static public explicit operator NativeMethods.TVHITTESTINFO(TVHITTESTINFO_64 hitTestInfo64) 2498NativeMethods.TVHITTESTINFO nativeHitTestInfo = new NativeMethods.TVHITTESTINFO(); 2513internal NativeMethods.Win32Rect rect; 2519internal TOOLINFO_32(NativeMethods.TOOLINFO item) 2532static public explicit operator NativeMethods.TOOLINFO(TOOLINFO_32 item) 2534NativeMethods.TOOLINFO nativeItem = new NativeMethods.TOOLINFO(); 2536nativeItem.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO)); 2556internal NativeMethods.Win32Rect rect; 2562internal TOOLINFO_64(NativeMethods.TOOLINFO item) 2575static public explicit operator NativeMethods.TOOLINFO(TOOLINFO_64 item) 2577NativeMethods.TOOLINFO nativeItem = new NativeMethods.TOOLINFO(); 2579nativeItem.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO));
MS\Internal\AutomationProxies\EventManager.cs (28)
62case NativeMethods.OBJID_WINDOW: 72case NativeMethods.OBJID_CLIENT: 82case NativeMethods.OBJID_VSCROLL: 83case NativeMethods.OBJID_HSCROLL: 93case NativeMethods.OBJID_CARET: 103case NativeMethods.OBJID_SYSMENU: 104case NativeMethods.OBJID_MENU: 158if (eventId == NativeMethods.EventObjectStateChange) 169if (eventId == NativeMethods.EventObjectReorder) 177if (eventId == NativeMethods.EventObjectLocationChange) 188if (eventId == NativeMethods.EventObjectLocationChange) 329if (eventId == NativeMethods.EventObjectInvoke || 330eventId == NativeMethods.EventObjectStateChange || 331eventId == NativeMethods.EventObjectSelection && el is ListViewItem) 343if (eventId == NativeMethods.EventObjectStateChange) 355if (eventId == NativeMethods.EventSystemCaptureEnd ) 366if (eventId == NativeMethods.EventObjectInvoke) 378if (eventId == NativeMethods.EventObjectSelection || 379eventId == NativeMethods.EventObjectStateChange) 391if (eventId == NativeMethods.EventObjectSelectionAdd) 403if (eventId == NativeMethods.EventObjectSelectionRemove) 411if (eventId == NativeMethods.EventObjectCreate) 415else if (eventId == NativeMethods.EventObjectDestroy) 419else if ( eventId == NativeMethods.EventObjectReorder ) 465if (Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZE)) 469else if (Misc.IsBitSet(style, NativeMethods.WS_MINIMIZE)) 485if (eventId == NativeMethods.EventObjectLocationChange) 510else if (eventId == NativeMethods.EventObjectTextSelectionChanged)
MS\Internal\AutomationProxies\Input.cs (19)
88int vscreenWidth = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXVIRTUALSCREEN); 89int vscreenHeight = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYVIRTUALSCREEN); 90int vscreenLeft = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_XVIRTUALSCREEN); 91int vscreenTop = UnsafeNativeMethods.GetSystemMetrics( NativeMethods.SM_YVIRTUALSCREEN ); 116intflags |= NativeMethods.MOUSEEVENTF_VIRTUALDESK; 119NativeMethods.INPUT mi = new NativeMethods.INPUT(); 120mi.type = NativeMethods.INPUT_MOUSE; 134NativeMethods.INPUT ki = new NativeMethods.INPUT(); 135ki.type = NativeMethods.INPUT_KEYBOARD; 140dwFlags |= NativeMethods.KEYEVENTF_SCANCODE; 142dwFlags |= NativeMethods.KEYEVENTF_KEYUP; 146ki.union.keyboardInput.dwFlags |= NativeMethods.KEYEVENTF_EXTENDEDKEY; 160NativeMethods.INPUT ki = new NativeMethods.INPUT(); 162ki.type = NativeMethods.INPUT_KEYBOARD; 165ki.union.keyboardInput.dwFlags = press ? 0 : NativeMethods.KEYEVENTF_KEYUP; 168ki.union.keyboardInput.dwFlags |= NativeMethods.KEYEVENTF_EXTENDEDKEY;
MS\Internal\AutomationProxies\Misc.cs (131)
166internal static IntPtr DispatchMessage(ref NativeMethods.MSG msg) 177internal unsafe static bool EnumChildWindows(IntPtr hwnd, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam) 205StringBuilder sb = new StringBuilder(NativeMethods.MAX_PATH + 1); 207int result = UnsafeNativeMethods.GetClassName(hwnd, sb, NativeMethods.MAX_PATH); 244internal static bool GetClientRectInScreenCoordinates(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 246rc = NativeMethods.Win32Rect.Empty; 253NativeMethods.Win32Point leftTop = new NativeMethods.Win32Point(rc.left, rc.top); 259NativeMethods.Win32Point rightBottom = new NativeMethods.Win32Point(rc.right, rc.bottom); 265rc = new NativeMethods.Win32Rect(leftTop.x, leftTop.y, rightBottom.x, rightBottom.y); 269internal static bool GetClientRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 286internal static bool GetComboBoxInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbi) 299internal static bool GetCursorPos(ref NativeMethods.Win32Point pt) 330NativeMethods.GUITHREADINFO gui; 342NativeMethods.TOOLINFO tool = new NativeMethods.TOOLINFO(); 343tool.Init(Marshal.SizeOf(typeof(NativeMethods.TOOLINFO))); 402while ((peer = NativeMethodsSetLastError.GetWindow(peer, NativeMethods.GW_HWNDPREV)) != IntPtr.Zero) 407int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero); 408if ((code & NativeMethods.DLGC_STATIC) == NativeMethods.DLGC_STATIC) 424int style = UnsafeNativeMethods.GetWindowLong(peer, NativeMethods.GWL_STYLE, out error); 425if ((style & NativeMethods.WS_VISIBLE) != 0) 431if ((style & (NativeMethods.WS_GROUP | NativeMethods.WS_TABSTOP)) != 0) 439internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint item, ref NativeMethods.MENUBARINFO mbi) 465internal static bool GetMenuItemInfo(IntPtr hmenu, int item, bool byPosition, ref NativeMethods.MENUITEMINFO menuItemInfo) 478internal static bool GetMenuItemRect(IntPtr hwnd, IntPtr hmenu, int item, out NativeMethods.Win32Rect rc) 491internal static bool GetMessage(ref NativeMethods.MSG msg, IntPtr hwnd, int msgFilterMin, int msgFilterMax) 505internal static int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf) 520IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 531internal static bool GetScrollBarInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollBarInfo sbi) 544internal static bool GetScrollInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollInfo si) 564internal static int GetTextExtentPoint32(IntPtr hdc, string text, int length, out NativeMethods.SIZE size) 646int exstyle = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_EXSTYLE, out lastWin32Error); 660int id = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_ID, out lastWin32Error); 676int result = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_HWNDPARENT, out lastWin32Error); 686internal static bool GetWindowRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 702int style = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_STYLE, out lastWin32Error); 748NativeMethods.GUITHREADINFO gui; 749return (ProxyGetGUIThreadInfo(0, out gui) && (IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE))); 771hwnd = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 782return IsBitSet(exStyle, NativeMethods.WS_EX_LAYOUTRTL) || IsBitSet(exStyle, NativeMethods.WS_EX_RTLREADING); 787return IsBitSet(GetWindowExStyle(hwnd), NativeMethods.WS_EX_LAYOUTRTL); 792return IsBitSet(GetWindowExStyle(hwnd), NativeMethods.WS_EX_RTLREADING); 795internal static bool IntersectRect(ref NativeMethods.Win32Rect rcDest, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2) 830static internal bool IsItemVisible(IntPtr hwnd, ref NativeMethods.Win32Rect itemRect) 832NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect(0, 0, 0, 0); 836NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 843static internal bool IsItemVisible(ref NativeMethods.Win32Rect parentRect, ref NativeMethods.Win32Rect itemRect) 845NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 852static internal bool IsItemVisible(ref NativeMethods.Win32Rect parentRect, ref Rect itemRect) 854NativeMethods.Win32Rect itemRc = new NativeMethods.Win32Rect(itemRect); 855NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 862static internal bool IsItemVisible(ref Rect parentRect, ref NativeMethods.Win32Rect itemRect) 864NativeMethods.Win32Rect parentRc = new NativeMethods.Win32Rect(parentRect); 865NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 874NativeMethods.Win32Rect itemRc = new NativeMethods.Win32Rect(itemRect); 875NativeMethods.Win32Rect parentRc = new NativeMethods.Win32Rect(parentRect); 876NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 891hwnd = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 910internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Rect rect, int cPoints) 935internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Point pt, int cPoints) 971NativeMethods.Win32Point ptPrevious = new NativeMethods.Win32Point(); 973bool mouseSwapped = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_SWAPBUTTON) != 0; 1026if (terminationEvent == NativeMethods.WAIT_FAILED) 1083int index = ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 1096internal static bool ProxyGetGUIThreadInfo(uint idThread, out NativeMethods.GUITHREADINFO gui) 1098gui = new NativeMethods.GUITHREADINFO(); 1189ProxySendMessage(hwnd, NativeMethods.WM_GETTEXT, (IntPtr)str.Capacity, str); 1217IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, NativeMethods.WM_GETTITLEBARINFOEX, IntPtr.Zero, ref ti, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1248NativeMethods.MENUBARINFO mbi; 1249bool retValue = WindowsMenu.GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi); 1348internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, ref NativeMethods.Win32Rect lParam) 1379internal static bool PtInRect(ref NativeMethods.Win32Rect rc, int x, int y) 1392NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(); 1430System.Text.StringBuilder className = new System.Text.StringBuilder(NativeMethods.MAX_PATH + 1); 1432uint result = UnsafeNativeMethods.RealGetWindowClass(hwnd, className, NativeMethods.MAX_PATH); 1488internal static int SendInput(int inputs, ref NativeMethods.INPUT ki, int size) 1593int result = MsgWaitForMultipleObjects(null, false, 2000, NativeMethods.QS_ALLINPUT); 1594if (result == NativeMethods.WAIT_FAILED || result == NativeMethods.WAIT_TIMEOUT) 1597NativeMethods.MSG msg = new NativeMethods.MSG(); 1614if (msg.message == NativeMethods.WM_HOTKEY && (short)msg.wParam == atom) 1646internal static IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags) 1750internal static bool UnionRect(out NativeMethods.Win32Rect rcDst, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2) 1889int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 1936NativeMethods.TOOLINFO tool = new NativeMethods.TOOLINFO(); 1937tool.Init(Marshal.SizeOf(typeof(NativeMethods.TOOLINFO))); 1944tool.uFlags = NativeMethods.TTF_IDISHWND; 1969NativeMethods.SYSTEM_INFO sysInfo; 2013if ((tiDL.rgstate[NativeMethods.INDEX_TITLEBAR_SELF] & (NativeMethods.STATE_SYSTEM_INVISIBLE | NativeMethods.STATE_SYSTEM_OFFSCREEN)) != 0) 2023int buttonWidth = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXSIZE) - 1; 2024int buttonHeight = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSIZE) - 1; 2026Rect[] rects = new Rect[NativeMethods.CCHILDREN_TITLEBAR + 1]; 2040for (int i = NativeMethods.INDEX_TITLEBAR_MAC; i > NativeMethods.INDEX_TITLEBAR_SELF; i--) 2042if ((tiDL.rgstate[i] & NativeMethods.STATE_SYSTEM_INVISIBLE) == 0) 2056for (int i = NativeMethods.INDEX_TITLEBAR_MAC; i > NativeMethods.INDEX_TITLEBAR_SELF; i--) 2058if ((tiDL.rgstate[i] & NativeMethods.STATE_SYSTEM_INVISIBLE) == 0) 2084if ((ti.rgstate[NativeMethods.INDEX_TITLEBAR_SELF] & (NativeMethods.STATE_SYSTEM_INVISIBLE | NativeMethods.STATE_SYSTEM_OFFSCREEN)) != 0) 2089Rect[] rects = new Rect[NativeMethods.CCHILDREN_TITLEBAR + 1]; 2090for (int i = 0; i <= NativeMethods.CCHILDREN_TITLEBAR; i++) 2093if ((ti.rgstate[i] & NativeMethods.STATE_SYSTEM_INVISIBLE) != 0) 2117private const int _sendMessageFlags = NativeMethods.SMTO_BLOCK;
MS\Internal\AutomationProxies\MSAAEventDispatcher.cs (22)
37: base(NativeMethods.EVENT_OBJECT_CREATE, NativeMethods.EVENT_OBJECT_ACCELERATORCHANGE) 181if (idObject <= NativeMethods.OBJID_WINDOW 182&& idObject != NativeMethods.OBJID_CLIENT) 197case NativeMethods.EVENT_OBJECT_CREATE: 198case NativeMethods.EVENT_OBJECT_SHOW: 200case NativeMethods.EVENT_OBJECT_HIDE: 201case NativeMethods.EVENT_OBJECT_REORDER: 205case NativeMethods.EVENT_OBJECT_PARENTCHANGE: 210case NativeMethods.EVENT_OBJECT_LOCATIONCHANGE: 216case NativeMethods.EVENT_OBJECT_NAMECHANGE: 220case NativeMethods.EVENT_OBJECT_SELECTION: 225case NativeMethods.EVENT_OBJECT_SELECTIONADD: 229case NativeMethods.EVENT_OBJECT_SELECTIONREMOVE: 241case NativeMethods.EVENT_OBJECT_VALUECHANGE: 245case NativeMethods.EVENT_OBJECT_HELPCHANGE: 277return idObject == NativeMethods.OBJID_CLIENT && idChild == NativeMethods.CHILD_SELF; 337case NativeMethods.EVENT_OBJECT_CREATE: 338case NativeMethods.EVENT_OBJECT_SHOW: 359case NativeMethods.EVENT_OBJECT_HIDE: 371Debug.Assert(eventId == NativeMethods.EVENT_OBJECT_REORDER);
MS\Internal\AutomationProxies\MSAANativeProvider.cs (6)
171int index = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 202if (idObject == NativeMethods.OBJID_CLIENT && idChild == NativeMethods.CHILD_SELF) 1113_knownRoot = (MsaaNativeProvider)Create(_hwnd, NativeMethods.CHILD_SELF, NativeMethods.OBJID_CLIENT); 1207if (childAcc.ChildId != NativeMethods.CHILD_SELF)
MS\Internal\AutomationProxies\MSAAWinEventWrap.cs (3)
182_winEventProc = new NativeMethods.WinEventProcDef(WinEventReentrancyFilter); 187_fFlags = NativeMethods.WINEVENT_OUTOFCONTEXT; 234private NativeMethods.WinEventProcDef _winEventProc; // the callback handed to USER for WinEvents
MS\Internal\AutomationProxies\NonClientArea.cs (57)
91return new int[] { NativeMethods.EventObjectStateChange }; 118NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect(); 119NativeMethods.Win32Rect windowRect = new NativeMethods.Win32Rect(); 193case NativeMethods.OBJID_WINDOW: 197case NativeMethods.OBJID_HSCROLL : 198case NativeMethods.OBJID_VSCROLL : 202case NativeMethods.OBJID_CLIENT: 206case NativeMethods.OBJID_SYSMENU: 207case NativeMethods.OBJID_MENU: 216int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 220case NativeMethods.HTHSCROLL: 226case NativeMethods.HTVSCROLL: 232case NativeMethods.HTCAPTION : 233case NativeMethods.HTMINBUTTON : 234case NativeMethods.HTMAXBUTTON : 235case NativeMethods.HTHELP : 236case NativeMethods.HTCLOSE : 237case NativeMethods.HTSYSMENU : 241case NativeMethods.HTGROWBOX: 244case NativeMethods.HTBOTTOMRIGHT: 247case NativeMethods.HTBOTTOMLEFT: 250case NativeMethods.HTMENU: 253case NativeMethods.HTLEFT: 254case NativeMethods.HTRIGHT: 255case NativeMethods.HTTOP: 256case NativeMethods.HTTOPLEFT: 257case NativeMethods.HTTOPRIGHT: 258case NativeMethods.HTBOTTOM: 259case NativeMethods.HTBORDER: 473return new WindowsListViewScrollBar (_hwnd, this, (int) item, NativeMethods.SB_HORZ); 475return new WindowsScrollBar (_hwnd, this, (int) item, NativeMethods.SB_HORZ); 485return new WindowsListViewScrollBar (_hwnd, this, (int) item, NativeMethods.SB_VERT); 487return new WindowsScrollBar (_hwnd, this, (int) item, NativeMethods.SB_VERT); 509if (Misc.IsBitSet(style, NativeMethods.WS_VSCROLL) && Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) 531if (!Misc.IsBitSet(style, NativeMethods.WS_CHILD)) 674if ((idProp == ScrollPattern.VerticalScrollPercentProperty && idObject != NativeMethods.OBJID_VSCROLL) || 675(idProp == ScrollPattern.HorizontalScrollPercentProperty && idObject != NativeMethods.OBJID_HSCROLL)) 686NonClientItem item = idObject == NativeMethods.OBJID_HSCROLL ? NonClientItem.HScrollBar : NonClientItem.VScrollBar; 687int sbFlag = idObject == NativeMethods.OBJID_HSCROLL ? NativeMethods.SB_HORZ : NativeMethods.SB_VERT; 701if (eventId == NativeMethods.EventObjectStateChange && idProp == ValuePattern.IsReadOnlyProperty) 714if (idObject == NativeMethods.OBJID_HSCROLL || idObject == NativeMethods.OBJID_VSCROLL) 716idObject = NativeMethods.OBJID_WINDOW; 723if (idProp == ValuePattern.ValueProperty && eventId == NativeMethods.EVENT_OBJECT_VALUECHANGE) 725NonClientItem item = idObject == NativeMethods.OBJID_HSCROLL ? NonClientItem.HScrollBar : NonClientItem.VScrollBar; 726WindowsScrollBar scrollBar = new WindowsScrollBar(hwnd, el, (int)item, idObject == NativeMethods.OBJID_HSCROLL ? NativeMethods.SB_HORZ : NativeMethods.SB_VERT); 727scrollBar.DispatchEvents(0, ValuePattern.ValueProperty, NativeMethods.OBJID_CLIENT, 0); 746if (eventId == NativeMethods.EventObjectNameChange) 749if (Misc.IsBitSet(style, NativeMethods.WS_CHILD))
MS\Internal\AutomationProxies\ProxyHwnd.cs (34)
184name = GetAccessibleName(NativeMethods.CHILD_SELF); 223name = GetAccessibleName(NativeMethods.CHILD_SELF); 261NativeMethods.Win32Rect parentRect = NativeMethods.Win32Rect.Empty; 375return new int [] { NativeMethods.EventObjectFocus }; 379return new int[] { NativeMethods.EventObjectNameChange }; 383return new int[] { NativeMethods.EventObjectValueChange }; 387return new int[] { NativeMethods.EventObjectLocationChange }; 391return new int [] { NativeMethods.EventObjectStateChange, 392NativeMethods.EventObjectShow, 393NativeMethods.EventObjectHide}; 402return new int [] { NativeMethods.EventObjectValueChange }; 406return new int [] { NativeMethods.EventObjectSelectionAdd, 407NativeMethods.EventObjectSelectionRemove, 408NativeMethods.EventObjectSelection}; 412return new int[] { NativeMethods.EventSystemCaptureEnd, 413NativeMethods.EventObjectStateChange }; 430new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectSelection, idEvent), 431new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectStateChange, idEvent) 441new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectSelectionAdd, idEvent), 442new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectSelection, idEvent) 447idWinEvent = NativeMethods.EventObjectSelectionRemove; 451idWinEvent = NativeMethods.EventObjectSelectionWithin; 457new WinEventTracker.EvtIdProperty (NativeMethods.EventSystemCaptureEnd, idEvent), // For SysHeaders 458new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectStateChange, idEvent), 459new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectValueChange, idEvent), // For WindowsScrollBarBits 460new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectInvoke, idEvent) 467new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectCreate, idEvent), 468new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectDestroy, idEvent), 469new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectReorder, idEvent) 476new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectLocationChange, idEvent), 477new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectTextSelectionChanged, idEvent) 494NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect ();
MS\Internal\AutomationProxies\ProxySimple.cs (14)
112NativeMethods.Win32Rect controlRectangle = NativeMethods.Win32Rect.Empty; 237NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 300if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_TABSTOP)) 346NativeMethods.Win32Rect itemWin32Rect = new NativeMethods.Win32Rect(itemRect); 586internal bool GetClickablePoint(out NativeMethods.Win32Point pt, bool fClipClientRect) 588NativeMethods.Win32Rect rcItem = new NativeMethods.Win32Rect(BoundingRectangle); 594NativeMethods.Win32Rect rcOutside = new NativeMethods.Win32Rect(); 656_IAccessible = Accessible.AccessibleObjectFromWindow(_hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK ? acc.IAccessible : null;
MS\Internal\AutomationProxies\QueueProcessor.cs (8)
103NativeMethods.MSG msg = new NativeMethods.MSG(); 110while (UnsafeNativeMethods.PeekMessage (ref msg, IntPtr.Zero, 0, 0, NativeMethods.PM_REMOVE)) 112if (msg.message == NativeMethods.WM_QUIT) 132int result = Misc.MsgWaitForMultipleObjects(handle, false, NativeMethods.INFINITE, NativeMethods.QS_ALLINPUT); 133if (result == NativeMethods.WAIT_FAILED || result == NativeMethods.WAIT_TIMEOUT)
MS\Internal\AutomationProxies\SafeProcessHandle.cs (4)
46SetHandle(Misc.OpenProcess(NativeMethods.PROCESS_QUERY_INFORMATION | NativeMethods.PROCESS_VM_OPERATION | NativeMethods.PROCESS_VM_READ | NativeMethods.PROCESS_VM_WRITE, false, processId, hwnd));
MS\Internal\AutomationProxies\SafeThemeHandle.cs (1)
46return !IsInvalid ? CloseThemeData(handle) == (IntPtr)NativeMethods.S_OK : true;
MS\Internal\AutomationProxies\WindowsAltTab.cs (11)
95if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 145NativeMethods.Win32Point pt = new NativeMethods.Win32Point(x, y); 149NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect(); 392private NativeMethods.Win32Rect GetBoundingRect() 399NativeMethods.Win32Point ptStart = this._altTab._altTabInfo.ptStart; 403NativeMethods.Win32Rect itemRect = 404new NativeMethods.Win32Rect(left, top, left + cxItem, top + cyItem); 409itemRect = NativeMethods.Win32Rect.Empty;
MS\Internal\AutomationProxies\WindowsButton.cs (53)
121style = Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK; 125case NativeMethods.BS_PUSHBUTTON: 126case NativeMethods.BS_DEFPUSHBUTTON: 127case NativeMethods.BS_OWNERDRAW: 128case NativeMethods.BS_SPLITBUTTON: // explore back and forward buttons 132case NativeMethods.BS_CHECKBOX: 133case NativeMethods.BS_AUTOCHECKBOX: 134case NativeMethods.BS_3STATE: 135case NativeMethods.BS_AUTO3STATE: 139case NativeMethods.BS_RADIOBUTTON: 140case NativeMethods.BS_AUTORADIOBUTTON: 144case NativeMethods.BS_GROUPBOX: 165if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 188eventId = NativeMethods.EventObjectSelectionRemove; 207int state = Misc.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero); 208if (Misc.IsBitSet(state, NativeMethods.BST_PUSHED) 209&& eventId == NativeMethods.EventObjectStateChange) 214else if(eventId == NativeMethods.EventObjectInvoke) 309new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectInvoke, idEvent) 338Accessible.AccessibleObjectFromWindow(hwndRadioButton, NativeMethods.OBJID_CLIENT, ref accRadioButton) != NativeMethods.S_OK || 348new WindowsButton(hwndRadioButton, null, ButtonType.RadioButton, Misc.GetWindowStyle(hwndRadioButton) & NativeMethods.BS_TYPEMASK, accRadioButton) 413if (Accessible.AccessibleObjectFromWindow(hwndParent, NativeMethods.OBJID_CLIENT, ref accParent) != NativeMethods.S_OK || accParent == null) 420return new WindowsButton(hwndParent, null, ButtonType.GroupBox, Misc.GetWindowStyle(hwndParent) & NativeMethods.BS_TYPEMASK, accParent); 497case NativeMethods.BS_PUSHBUTTON: 498case NativeMethods.BS_DEFPUSHBUTTON: 499case NativeMethods.BS_PUSHBOX: 500case NativeMethods.BS_OWNERDRAW: 501case NativeMethods.BS_USERBUTTON: 502case NativeMethods.BS_CHECKBOX: 503case NativeMethods.BS_AUTOCHECKBOX: 504case NativeMethods.BS_RADIOBUTTON: 505case NativeMethods.BS_AUTORADIOBUTTON: 506case NativeMethods.BS_3STATE: 507case NativeMethods.BS_AUTO3STATE: 508case NativeMethods.BS_SPLITBUTTON: // explore back and forward buttons 514Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 528Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 535Misc.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true); 621if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_CHILD)) 627hwndParent = Misc.GetWindow(hwndRoot, NativeMethods.GW_OWNER); 660int state = Misc.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero); 661if (Misc.IsBitSet(state, NativeMethods.BST_CHECKED)) 665else if (Misc.IsBitSet(state, NativeMethods.BST_INDETERMINATE)) 685Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound); 699if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK && 723Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton); 739if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK &&
MS\Internal\AutomationProxies\WindowsComboBox.cs (61)
135NativeMethods.Win32Rect rcCombo = new NativeMethods.Win32Rect (base.BoundingRectangle); 141NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 145NativeMethods.Win32Rect rcList = NativeMethods.Win32Rect.Empty; 267NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 283NativeMethods.Win32Rect rcList = NativeMethods.Win32Rect.Empty; 311NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 348NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 392NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 408IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.CBN_EDITUPDATE)); 410Misc.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam, _hwnd); 502return (NativeMethods.CBS_SIMPLE == _comboType); 508return (NativeMethods.CBS_DROPDOWNLIST == _comboType); 525IntPtr hwndEx = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 536static internal bool GetComboInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbInfo) 553if (cbInfo.hwndItem == IntPtr.Zero && IsComboEx (NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT))) 566cbInfo.rcItem = NativeMethods.Win32Rect.Empty; 577return Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0; 584NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 592Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 597Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 653return (Misc.GetWindowStyle(hwnd) & NativeMethods.CBS_COMBOTYPEMASK); 659NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 661if (GetComboInfo(_hwnd, ref cbInfo) && cbInfo.stateButton != NativeMethods.STATE_SYSTEM_INVISIBLE) 672NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 713index = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 720int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 734return XSendMessage.GetItemText(hwnd, NativeMethods.WM_USER + NativeMethods.CB_GETLBTEXT, index, len); 738return Misc.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len); 771case NativeMethods.OBJID_CLIENT : 773if (eventId == NativeMethods.EventObjectStateChange && idChild == 2) 780NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 782if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && Misc.IsBitSet(NativeMethods.STATE_SYSTEM_PRESSED, cbInfo.stateButton)) 810IntPtr hwndCombo = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 850editPortionEvents[c]._evtId = (p == ValuePattern.ValueProperty) ? NativeMethods.EventObjectValueChange : NativeMethods.EventObjectStateChange; 935NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
MS\Internal\AutomationProxies\WindowsContainer.cs (5)
145return Misc.IsBitSet(style, NativeMethods.WS_CAPTION) || 146Misc.IsBitSet(style, NativeMethods.WS_POPUP); 154return Misc.IsBitSet(style, NativeMethods.DS_CONTROL) && 155Misc.IsBitSet(style, NativeMethods.WS_CHILD) && 156Misc.IsBitSet(exstyle, NativeMethods.WS_EX_CONTROLPARENT);
MS\Internal\AutomationProxies\WindowsEditBox.cs (68)
108if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 123IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 308if (Misc.IsBitSet(styles, NativeMethods.ES_READONLY)) 314if (Misc.IsBitSet(styles, NativeMethods.ES_NUMBER)) 329int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 337result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 390NativeMethods.Win32Point clientLocation = (NativeMethods.Win32Point)screenLocation; 399NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect(); 500internal void CharFromPos(NativeMethods.Win32Point point, out ushort indexLowWord, out ushort lineLowWord) 508IntPtr lParam = NativeMethods.Util.MAKELPARAM(point.x, point.y); 509int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam); 510indexLowWord = unchecked((ushort)(NativeMethods.Util.LOWORD(result))); 511lineLowWord = unchecked((ushort)(NativeMethods.Util.HIWORD(result))); 515internal int CharFromPosEx(NativeMethods.Win32Point point) 561if (Misc.IsBitSet(style, NativeMethods.ES_PASSWORD)) 565else if (Misc.IsBitSet(style, NativeMethods.ES_MULTILINE)) 569else if (Misc.IsBitSet(style, NativeMethods.ES_AUTOHSCROLL)) 581return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 588return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 594IntPtr result = Misc.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero); 602result = UnsafeNativeMethods.GetStockObject(NativeMethods.SYSTEM_FONT); 611return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero); 614internal NativeMethods.LOGFONT GetLogfont() 618NativeMethods.LOGFONT logfont = new NativeMethods.LOGFONT(); 619int cb = Marshal.SizeOf(typeof(NativeMethods.LOGFONT)); 630NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect(); 631Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect); 639Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETSEL, out start, out end); 651return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero); 659NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect(); 663NativeMethods.SIZE size; 667NativeMethods.Win32Point ptStart = new NativeMethods.Win32Point((int)(rect.left + size.cx / 4), (int)(rect.top + size.cy / 4)); 668NativeMethods.Win32Point ptEnd = new NativeMethods.Win32Point((int)(rect.right - size.cx / 8), (int)(rect.bottom - size.cy / 4)); 737return (!SafeNativeMethods.IsWindowEnabled(WindowHandle) || Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 746return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero); 752int index = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero); 759return 0 != Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical); 767if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_VSCROLL)) 770NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo(); 771si.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(typeof(NativeMethods.ScrollInfo)); 772si.fMask = NativeMethods.SIF_ALL; 773bool ok = Misc.GetScrollInfo(WindowHandle, NativeMethods.SB_VERT, ref si); 782NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect(); 786NativeMethods.SIZE size; 806int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero); 811int x = (int)((short)NativeMethods.Util.LOWORD(result)); 812int y = (int)((short)NativeMethods.Util.HIWORD(result)); 845NativeMethods.SIZE size; 867Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end); 908private int GetTextExtentPoint32(string text, out NativeMethods.SIZE size) 954IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 962NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 974IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 990IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 1006IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 1035int i = NativeMethods.Util.MAKELONG((int)lowWord, (int)hiWord);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (13)
264NativeMethods.Win32Point w32point; 750if (Misc.IsBitSet(style, NativeMethods.ES_CENTER)) 754else if (Misc.IsBitSet(style, NativeMethods.ES_RIGHT)) 767return Misc.IsBitSet(style, NativeMethods.ES_UPPERCASE) ? CapStyle.AllCap : CapStyle.None; 781return SafeNativeMethods.GetSysColor(NativeMethods.COLOR_WINDOW); 785private static object GetFontName(NativeMethods.LOGFONT logfont) 791private static object GetFontSize(NativeMethods.LOGFONT logfont) 800int lpy = UnsafeNativeMethods.GetDeviceCaps(hdc, NativeMethods.LOGPIXELSY); 806private static object GetFontWeight(NativeMethods.LOGFONT logfont) 816return SafeNativeMethods.GetSysColor(NativeMethods.COLOR_WINDOWTEXT); 820private static object GetItalic(NativeMethods.LOGFONT logfont) 826private static object GetStrikethroughStyle(NativeMethods.LOGFONT logfont) 832private static object GetUnderlineStyle(NativeMethods.LOGFONT logfont)
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (9)
41if (Accessible.AccessibleObjectFromWindow(hwnd, idObject, ref acc) != NativeMethods.S_OK || acc == null) 61return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 69return idChild == NativeMethods.CHILD_SELF ? sb : sb.CreateStatusBarPane(idChild); 87if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) != NativeMethods.S_OK || acc == null) 95return new WindowsButton(hwnd, null, WindowsButton.ButtonType.CheckBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 98return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 101return new WindowsButton(hwnd, null, WindowsButton.ButtonType.PushButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 104return new WindowsButton(hwnd, null, WindowsButton.ButtonType.RadioButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (5)
71if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 97return new WinEventTracker.EvtIdProperty[1] { new WinEventTracker.EvtIdProperty(NativeMethods.EventSystemCaptureEnd, idEvent) }; 145NativeMethods.Win32Point pt = new NativeMethods.Win32Point();
MS\Internal\AutomationProxies\WindowsGrip.cs (13)
64NativeMethods.Win32Rect client = new NativeMethods.Win32Rect(); 67NativeMethods.SIZE sizeGrip = GetGripSize(_hwnd, false); 97NativeMethods.Win32Rect client = new NativeMethods.Win32Rect(); 110NativeMethods.SIZE sizeGrip = GetGripSize(hwnd, onStatusBar); 122int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 124return hit == NativeMethods.HTBOTTOMLEFT; 130int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 132return hit == NativeMethods.HTBOTTOMRIGHT; 136internal static NativeMethods.SIZE GetGripSize(IntPtr hwnd, bool onStatusBar)
MS\Internal\AutomationProxies\WindowsHyperlink.cs (27)
71if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 143return new WinEventTracker.EvtIdProperty[1] { new WinEventTracker.EvtIdProperty(NativeMethods.EventSystemCaptureEnd, idEvent) }; 218HitTestInfo.item.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE; 220HitTestInfo.item.stateMask = NativeMethods.LIS_ENABLED; 227bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 251if (Misc.IsBitSet(_linkItem.state, NativeMethods.LIS_FOCUSED)) 284_linkItem.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE; 287_linkItem.stateMask = NativeMethods.LIS_ENABLED; 293return XSendMessage.XSend(_hwnd, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM)); 404linkItem.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE; 406linkItem.stateMask = NativeMethods.LIS_FOCUSED; 407linkItem.state = NativeMethods.LIS_FOCUSED; 412return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 453NativeMethods.Win32Rect BoundingRect = NativeMethods.Win32Rect.Empty; 502HitTestInfo.item.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE; 504HitTestInfo.item.stateMask = NativeMethods.LIS_ENABLED; 511bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 523Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 524Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (8)
76if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 152Misc.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4)); 257IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 266hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 274IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 277hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 398Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
MS\Internal\AutomationProxies\WindowsListBox.cs (90)
85if (Misc.IsBitSet(style, NativeMethods.LBS_COMBOBOX)) 88NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 125case NativeMethods.OBJID_WINDOW: 129case NativeMethods.OBJID_CLIENT: 133case NativeMethods.OBJID_VSCROLL : 134case NativeMethods.OBJID_HSCROLL : 301NativeMethods.Win32Rect listboxrect = new NativeMethods.Win32Rect (); 306int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top)); 307if (NativeMethods.Util.HIWORD(ret) == 0) 309int index = NativeMethods.Util.LOWORD(ret); 321int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero); 323if (index != NativeMethods.LB_ERR) 396return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0; 419return new int[] { NativeMethods.EventObjectSelection }; 446return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero); 466if ((eventId == NativeMethods.EventObjectSelection || eventId == NativeMethods.EventObjectSelectionAdd) && (idProp as AutomationProperty) == SelectionPattern.IsSelectionRequiredProperty) 469WinEventTracker.EvtIdProperty[] aEvtIdProperties = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectSelection, SelectionPattern.IsSelectionRequiredProperty) }; 474else if (eventId == NativeMethods.EventObjectSelection || eventId == NativeMethods.EventObjectSelectionRemove || eventId == NativeMethods.EventObjectSelectionAdd) 480if (eventId == NativeMethods.EventObjectSelection && isMultipleSelection && wlb.HasOtherSelections(idChild - 1)) 482eventId = NativeMethods.EventObjectSelectionAdd; 487if ((eventId == NativeMethods.EventObjectSelectionRemove || eventId == NativeMethods.EventObjectSelectionAdd) && 493eventId = NativeMethods.EventObjectSelection; 497if (selection != NativeMethods.LB_ERR) 512(eventId == NativeMethods.EventObjectDestroy || eventId == NativeMethods.EventObjectCreate)) 533if ((eventId == NativeMethods.EventObjectShow || eventId == NativeMethods.EventObjectHide) && 536if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LBS_COMBOBOX)) 539NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 572return NativeMethods.LB_ERR; 577int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero); 578return result != NativeMethods.LB_ERR ? result : 0; 618return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 626return (0 != (WindowStyle & (NativeMethods.LBS_MULTIPLESEL | NativeMethods.LBS_EXTENDEDSEL))); 633return ((WindowStyle & NativeMethods.LBS_OWNERDRAWFIXED) == NativeMethods.LBS_OWNERDRAWFIXED) && 634((WindowStyle & NativeMethods.LBS_WANTKEYBOARDINPUT) == NativeMethods.LBS_WANTKEYBOARDINPUT); 741int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 752return XSendMessage.GetItemText(_hwnd, NativeMethods.WM_USER + NativeMethods.LB_GETTEXT, _item, iTextLen); 756string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen); 954Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 1000return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 1009SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item)); 1013SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1016return NativeMethods.LB_ERR != SendMessageResult; 1028return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR; 1053return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item; 1057return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1071private NativeMethods.Win32Rect BoundingRect() 1073NativeMethods.Win32Rect itemRect = new NativeMethods.Win32Rect(); 1074Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect); 1075return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty; 1097if (((int)accChild.get_accState(NativeMethods.CHILD_SELF) & NativeMethods.STATE_SYSTEM_CHECKED) == NativeMethods.STATE_SYSTEM_CHECKED) 1101else if (((int)accChild.get_accState(NativeMethods.CHILD_SELF) & NativeMethods.STATE_SYSTEM_MIXED) == NativeMethods.STATE_SYSTEM_MIXED) 1119NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 1143Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item)); 1148Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1151success = (NativeMethods.LB_ERR != sendMessageResult); 1159if (Misc.IsBitSet(listBoxStyle, NativeMethods.LBS_NOTIFY)) 1164new IntPtr(NativeMethods.Util.MAKELONG( 1165idListBox, NativeMethods.LBN_SELCHANGE)); 1170hwndListBoxParent, NativeMethods.WM_COMMAND, wParam, _hwnd); 1178Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1179success = (NativeMethods.LB_ERR != sendMessageResult); 1183IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.LBN_SELCHANGE)); 1186Misc.ProxySendMessageInt(combo._hwnd, NativeMethods.WM_COMMAND, wParam, _hwnd); 1202return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (138)
71_groupEvents [0]._evtId = NativeMethods.EventObjectReorder; 72_groupEvents [1]._evtId = NativeMethods.EventObjectHide; 73_groupEvents [2]._evtId = NativeMethods.EventObjectDestroy; 125case NativeMethods.OBJID_CLIENT : 131case NativeMethods.OBJID_WINDOW : 134if ((eventId == NativeMethods.EventObjectReorder) && (idProp as AutomationEvent) == AutomationElement.StructureChangedEvent) 145case NativeMethods.OBJID_VSCROLL: 146case NativeMethods.OBJID_HSCROLL: 425NativeMethods.Win32Rect rc = manager.GetGroupRcByIndex (i); 436NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest(_hwnd, new NativeMethods.Win32Point(x, y)); 443else if (hitTest.flags == NativeMethods.LVHT_NOWHERE && IsDetailMode(_hwnd)) 450int xAdjustment = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXBORDER) + UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXFRAME); 461hitTest = WindowsListView.SubitemHitTest(_hwnd, new NativeMethods.Win32Point(x, y)); 485int index = GetItemNext(_hwnd, -1, NativeMethods.LVNI_FOCUSED); 512WinEventTracker.EvtIdProperty[] aEvents = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectCreate, TablePattern.ColumnHeadersProperty) }; 521WinEventTracker.EvtIdProperty[] aEvents = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectSelection, eventId) }; 541WinEventTracker.EvtIdProperty[] aEvents = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectCreate, TablePattern.ColumnHeadersProperty) }; 550WinEventTracker.EvtIdProperty[] aEvents = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectSelection, eventId) }; 576for (int itemPos = GetItemNext(_hwnd, -1, NativeMethods.LVNI_SELECTED); itemPos != -1; itemPos = GetItemNext(_hwnd, itemPos, NativeMethods.LVNI_SELECTED)) 637int cx = NativeMethods.Util.LOWORD (size) /*- 2 * UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXBORDER)*/; 638int cy = NativeMethods.Util.HIWORD (size) /*- 2 * UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CYBORDER)*/; 642bool fHz = SetScrollPercent (horizontalPercent, NativeMethods.SB_HORZ, cx, out dx); 643bool fVt = SetScrollPercent (verticalPercent, NativeMethods.SB_VERT, cy, out dy); 663SetScrollPercent(horizontalPercent, NativeMethods.SB_HORZ, cx, out dx); 664SetScrollPercent(verticalPercent, NativeMethods.SB_VERT, cy, out dy); 893return SetItemState(hwnd, item, NativeMethods.LVIS_FOCUSED, NativeMethods.LVIS_FOCUSED); 899int state = GetItemState(hwnd, item, NativeMethods.LVIS_FOCUSED); 901return (Misc.IsBitSet(state, NativeMethods.LVIS_FOCUSED)); 912if (view == NativeMethods.LV_VIEW_TILE) 917if (InReportView(hwnd) || (view == NativeMethods.LV_VIEW_DETAILS)) 944if (ListViewList(hwnd) || (NativeMethods.LV_VIEW_LIST == ListViewGetView(hwnd))) 1017int nextItem = GetItemNext(hwnd, curItem, NativeMethods.LVNI_TORIGHT); 1060NativeMethods.Win32Point pt = new NativeMethods.Win32Point (0, 0); 1072int next = GetItemNext(hwnd, current, NativeMethods.LVNI_BELOW); 1097return (ListViewIsGroupViewEnabled(hwnd) && NativeMethods.LV_VIEW_LIST != ListViewGetView(hwnd)); 1119case NativeMethods.EventObjectReorder : 1160case NativeMethods.EventObjectDestroy : 1171case NativeMethods.EventObjectHide : 1192return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_REPORT); 1222return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1232for (int index = GetItemNext(hwnd, -1, NativeMethods.LVNI_SELECTED); index != -1; index = GetItemNext(hwnd, index, NativeMethods.LVNI_SELECTED)) 1242return GetItemNext(hwnd, -1, NativeMethods.LVNI_SELECTED); 1250return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags)); 1255return ListViewGetView(hwnd) == NativeMethods.LV_VIEW_ICON; 1261return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero); 1267return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1)); 1273return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_SCROLL, dx, dy) != 0; 1277static internal unsafe bool GetItemRect (IntPtr hwnd, int item, int lvir, out NativeMethods.Win32Rect itemRectangle) 1279itemRectangle = NativeMethods.Win32Rect.Empty; 1284if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1296return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0; 1302return SetItemState(hwnd, -1, NativeMethods.LVIS_SELECTED, 0); 1308return SetItemState(hwnd, item, NativeMethods.LVIS_SELECTED, NativeMethods.LVIS_SELECTED); 1314return SetItemState(hwnd, item, NativeMethods.LVIS_SELECTED, 0); 1320return Misc.IsBitSet(GetItemState(hwnd, listItem, NativeMethods.LVIS_SELECTED), NativeMethods.LVIS_SELECTED); 1326return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_EDITLABELS); 1350int flags = NativeMethods.LVS_EX_ONECLICKACTIVATE 1351| NativeMethods.LVS_EX_TWOCLICKACTIVATE 1352| NativeMethods.LVS_EX_UNDERLINEHOT 1353| NativeMethods.LVS_EX_UNDERLINECOLD; 1360return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1366return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_ONECLICKACTIVATE); 1372return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_SINGLESEL); 1378return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_NOSCROLL); 1386return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0; 1392return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 1396static internal string GetItemText (IntPtr hwnd, NativeMethods.LVITEM item) 1405static internal NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, NativeMethods.Win32Point pt) 1412static internal NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, int item, NativeMethods.Win32Point pt) 1415NativeMethods.LVHITTESTINFO_INTERNAL hitTest = new NativeMethods.LVHITTESTINFO_INTERNAL (); 1433NativeMethods.LVHITTESTINFO_V6 hitTestNative = new NativeMethods.LVHITTESTINFO_V6(hitTest); 1434result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1441NativeMethods.LVHITTESTINFO hitTestNative = new NativeMethods.LVHITTESTINFO(hitTest); 1442result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1460return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1466return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_CHECKBOXES); 1472int state = GetItemState(hwnd, item, NativeMethods.LVIS_STATEIMAGEMASK); 1480return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_AUTOARRANGE); 1486return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_FULLROWSELECT); 1492return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_JUSTIFYCOLUMNS); 1497static public unsafe bool GetSubItemRect (IntPtr hwnd, int item, int subItem, int lvir, out NativeMethods.Win32Rect itemRectangle) 1499itemRectangle = NativeMethods.Win32Rect.Empty; 1505if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETSUBITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1516IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1555return CheckBoxes (_hwnd) ? new int [] { NativeMethods.EventObjectNameChange, NativeMethods.EventObjectStateChange } : new int [] { NativeMethods.EventObjectNameChange }; 1559return new int [] { NativeMethods.EventObjectReorder }; 1672throw new ArgumentOutOfRangeException(sbFlag == NativeMethods.SB_HORZ ? "horizontalPercent" : "verticalPercent", SR.Get(SRID.ScrollBarOutOfRange)); 1675int scrollBar = sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_VSCROLL; 1677NativeMethods.ScrollBarInfo scrollBarInfo = new NativeMethods.ScrollBarInfo(); 1680(scrollBarInfo.scrollBarInfo & NativeMethods.STATE_SYSTEM_INVISIBLE) != 0 || 1681(scrollBarInfo.scrollBarInfo & NativeMethods.STATE_SYSTEM_UNAVAILABLE) != 0) 1687NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); // this is used all over 1690si.fMask = NativeMethods.SIF_ALL; 1775int nextItem = GetItemNext(hwnd, curItem, NativeMethods.LVNI_BELOW); 1795return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_LIST); 1799static private unsafe bool GetItemPosition (IntPtr hwnd, int item, out NativeMethods.Win32Point pt) 1806if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMPOSITION, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(pt.GetType()))) 1818return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero); 1824return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask)); 1829NativeMethods.LVITEM lvitem = new NativeMethods.LVITEM (); 1831lvitem.mask = NativeMethods.LVIF_STATE; 1864if (eventId == NativeMethods.EventObjectSelectionRemove && automationProperty == SelectionItemPattern.IsSelectedProperty) 1873else if (eventId == NativeMethods.EventObjectSelection 1874|| eventId == NativeMethods.EventObjectSelectionRemove 1875|| eventId == NativeMethods.EventObjectSelectionAdd) 1922if (eventId == NativeMethods.EventObjectSelectionRemove && GetSelectedItemCount(hwnd) == 1) 1927eventId = NativeMethods.EventObjectSelection; 1948else if (eventId == NativeMethods.EventObjectReorder && (automationProperty == GridItemPattern.ColumnProperty || automationProperty == GridItemPattern.RowProperty)) 1958else if (eventId == NativeMethods.EventObjectNameChange) 1961eventId = NativeMethods.EventObjectValueChange; 1965else if (eventId == NativeMethods.EventObjectStateChange && CheckBoxes(hwnd)) 1970eventId = NativeMethods.EventObjectValueChange; 1976else if ((eventId == NativeMethods.EventObjectDestroy || eventId == NativeMethods.EventObjectCreate) && automationEvent == AutomationElement.StructureChangedEvent) 1991if (eventId == NativeMethods.EventObjectCreate && fGroupView)
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (74)
81NativeMethods.Win32Rect itemRectangle = manager.GetGroupRc(ID); 105NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6(); 106group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 111return XSendMessage.GetItemText(_hwnd, group, NativeMethods.LVGF_HEADER); 115NativeMethods.LVGROUP group = new NativeMethods.LVGROUP(); 116group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP))); 119group.mask = NativeMethods.LVGF_HEADER; 161NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6(); 162group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 164group.mask = NativeMethods.LVGF_STATE; 165group.stateMask = NativeMethods.LVGS_SUBSETED; 173if ((group.state & NativeMethods.LVGS_SUBSETED) != 0) 249NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6(); 250group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 252group.mask = NativeMethods.LVGF_STATE; 253group.stateMask = NativeMethods.LVGS_SUBSETED; 261if ((group.state & NativeMethods.LVGS_SUBSETED) != 0) 294NativeMethods.Win32Point pt = new NativeMethods.Win32Point (x, y); 295NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest (_hwnd, pt); 297if ((hitTest.flags & NativeMethods.LVHT_EX_GROUP_HEADER) != 0) 302if ((hitTest.flags & NativeMethods.LVHT_ONITEM) != 0 && hitTest.iItem >= 0) 313NativeMethods.LVHITTESTINFO_V6 hitTestNative = new NativeMethods.LVHITTESTINFO_V6(hitTest); 316XSendMessage.XSendGetIndex(_hwnd, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 319if ((hitTestNative.flags & NativeMethods.LVHT_EX_GROUP_SUBSETLINK) != 0) 338int groupIndex = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 341NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6(); 342groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 343groupInfo.mask = NativeMethods.LVGF_GROUPID; 347bool lresult = XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 433NativeMethods.LVGROUP group = new NativeMethods.LVGROUP(); 434group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP))); 436group.mask = NativeMethods.LVGF_STATE; 437group.stateMask = NativeMethods.LVGS_COLLAPSED; 440isCollapsed = (group.state & NativeMethods.LVGS_COLLAPSED) != 0; 473int index = WindowsListView.GetItemNext(hwnd, -1, NativeMethods.LVNI_FOCUSED); 478NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 (); 480item.mask = NativeMethods.LVIF_GROUPID; 495int groupIndex = (int)Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 498NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6(); 499groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 500groupInfo.mask = NativeMethods.LVGF_GROUPID; 504bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 513groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 515groupInfo.mask = NativeMethods.LVGF_STATE; 516groupInfo.stateMask = NativeMethods.LVGS_SUBSETLINKFOCUSED; 521if ((groupInfo.state & NativeMethods.LVGS_SUBSETLINKFOCUSED) != 0) 614NativeMethods.LVGROUP group = new NativeMethods.LVGROUP(); 615group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP))); 618group.mask = NativeMethods.LVGF_STATE; 620group.stateMask = NativeMethods.LVGS_COLLAPSED; 621group.state = collapse ? NativeMethods.LVGS_COLLAPSED : 0; 690static private NewItemInDimension IsNewColumn (NativeMethods.Win32Rect rc1, NativeMethods.Win32Rect rc2) 728static private NewItemInDimension IsNewRow (NativeMethods.Win32Rect rc1, NativeMethods.Win32Rect rc2) 797NativeMethods.Win32Rect rc; 798NativeMethods.Win32Rect rcNext; 801if (WindowsListView.GetItemRect(hwnd, items[0], NativeMethods.LVIR_BOUNDS, out rc)) 808if (!WindowsListView.GetItemRect(hwnd, items[i], NativeMethods.LVIR_BOUNDS, out rcNext)) 857private delegate NewItemInDimension IsNewItemInDimension (NativeMethods.Win32Rect rc1, NativeMethods.Win32Rect rc2);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (55)
137internal NativeMethods.Win32Rect GetGroupRc(int id) 143return NativeMethods.Win32Rect.Empty; 148internal NativeMethods.Win32Rect GetGroupRcByIndex(int index) 152return NativeMethods.Win32Rect.Empty; 218NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 (); 220item.mask = NativeMethods.LVIF_GROUPID; 253return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 383NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6(); 384item.mask = NativeMethods.LVIF_GROUPID; 391NativeMethods.LVITEMINDEX ii = new NativeMethods.LVITEMINDEX(-1, -1); 393int flags = NativeMethods.LVNI_VISIBLEONLY | NativeMethods.LVNI_VISIBLEORDER; 398while (XSendMessage.XSend (hwnd, NativeMethods.LVM_GETNEXTITEMINDEX, new IntPtr(&ii), flags, Marshal.SizeOf(ii.GetType()))) 401NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6(); 402groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 403groupInfo.mask = NativeMethods.LVGF_GROUPID; 405bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(ii.iGroup), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 477NativeMethods.LVGROUPMETRICS metric = new NativeMethods.LVGROUPMETRICS (sizeof(NativeMethods.LVGROUPMETRICS), NativeMethods.LVGMF_BORDERSIZE); 478XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPMETRICS, IntPtr.Zero, new IntPtr(&(metric.cbSize)), metric.cbSize, XSendMessage.ErrorValue.NoCheck); 496private NativeMethods.Win32Rect GetGroupRcInternal(Group group) 498NativeMethods.Win32Rect rcGroup = group.GetGroupRect(); 630NativeMethods.Win32Rect rc1; 631WindowsListView.GetItemRect(_hwnd, item1, NativeMethods.LVIR_BOUNDS, out rc1); 633NativeMethods.Win32Rect rc2; 634WindowsListView.GetItemRect(_hwnd, item2, NativeMethods.LVIR_BOUNDS, out rc2); 711internal unsafe NativeMethods.Win32Rect GetGroupRect() 713NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect(); 715rect.top = isCollapsed ? NativeMethods.LVGGR_HEADER : NativeMethods.LVGGR_GROUP; 716XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, 724internal NativeMethods.Win32Rect CalculateRectNoHeader() 726NativeMethods.Win32Rect rcLv = NativeMethods.Win32Rect.Empty; 730return NativeMethods.Win32Rect.Empty; 734NativeMethods.Win32Rect item; 735WindowsListView.GetItemRect(_hwnd, _items[0], NativeMethods.LVIR_BOUNDS, out item); 737NativeMethods.Win32Rect groupRc; 748WindowsListView.GetItemRect(_hwnd, _items[count - 1], NativeMethods.LVIR_BOUNDS, out item); 757if (WindowScroll.Scrollable(_hwnd, NativeMethods.SB_VERT)) 759NativeMethods.Win32Rect rc = GetScrollbarRect(); 825private NativeMethods.Win32Rect GetScrollbarRect() 827NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 830if (Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_VSCROLL, ref sbi)) 832return new NativeMethods.Win32Rect(sbi.rcScrollBar.left, sbi.rcScrollBar.top, sbi.rcScrollBar.right, sbi.rcScrollBar.bottom); 835return NativeMethods.Win32Rect.Empty;
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (15)
77NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect(); 78rect.top = NativeMethods.LVGGR_SUBSETLINK; 79XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, new IntPtr(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType())); 89NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6(); 90groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 92groupInfo.mask = NativeMethods.LVGF_STATE; 93groupInfo.stateMask = NativeMethods.LVGS_SUBSETLINKFOCUSED; 98return (groupInfo.state & NativeMethods.LVGS_SUBSETLINKFOCUSED) != 0; 106NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6(); 107group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 112return XSendMessage.GetItemText(_hwnd, group, NativeMethods.LVGF_SUBSET); 122NativeMethods.Win32Point pt;
MS\Internal\AutomationProxies\WindowsListViewItem.cs (35)
110NativeMethods.Win32Rect itemRectangle = NativeMethods.Win32Rect.Empty; 118itemRectangle.left = NativeMethods.LVIR_BOUNDS; 138NativeMethods.LVITEMINDEX ii = new NativeMethods.LVITEMINDEX(); 144if (XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETITEMINDEXRECT, new IntPtr(&ii), new IntPtr(&itemRectangle), Marshal.SizeOf(ii.GetType()), Marshal.SizeOf(itemRectangle.GetType()))) 158if (WindowsListView.GetItemRect(_hwnd, _item, NativeMethods.LVIR_BOUNDS, out itemRectangle)) 234NativeMethods.Win32Point clickPoint; 350NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (_hwnd, _item); 376int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero); 538NativeMethods.Win32Point clickPoint; 714NativeMethods.LVITEM lvitem = new NativeMethods.LVITEM (); 716lvitem.mask = NativeMethods.LVIF_TEXT; 741NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 (); 742item.mask = NativeMethods.LVIF_GROUPID; 867NativeMethods.Win32Rect listViewRect = new NativeMethods.Win32Rect(); 868NativeMethods.Win32Rect headerRect = new NativeMethods.Win32Rect(); 875NativeMethods.Win32Rect itemRect = 876new NativeMethods.Win32Rect(BoundingRectangle); 924private bool GetListviewitemClickablePoint (out NativeMethods.Win32Point clickPoint) 930NativeMethods.Win32Rect itemRectangle; 933if (!WindowsListView.GetItemRect(_hwnd, _item, NativeMethods.LVIR_LABEL, out itemRectangle)) 942NativeMethods.Win32Point pt = new NativeMethods.Win32Point (itemRectangle.left, 0); 954if (!WindowsListView.GetItemRect(_hwnd, _item, NativeMethods.LVIR_LABEL, out itemRectangle)) 966private void Click (NativeMethods.Win32Point clickPoint) 977IntPtr key = (IntPtr)((setValueSucceeded) ? NativeMethods.VK_RETURN : NativeMethods.VK_ESCAPE); 980int scanCode = SafeNativeMethods.MapVirtualKey (NativeMethods.VK_RETURN, 0); 987Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode)); 988Misc.ProxySendMessage(hwnd, NativeMethods.WM_KEYUP, key, keyUpLParam);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (26)
81NativeMethods.Win32Rect itemRect = ListViewCheckBoxRect(_hwnd, _listviewItem); 152internal static NativeMethods.Win32Rect ListViewCheckBoxRect (IntPtr hwnd, int item) 158NativeMethods.Win32Rect controlRectangle = NativeMethods.Win32Rect.Empty; 162return NativeMethods.Win32Rect.Empty; 168NativeMethods.Win32Rect rc; 170if ((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)) 174return new NativeMethods.Win32Rect (controlRectangle.left, rc.top, right, rc.bottom); 180NativeMethods.Win32Rect wholeItem; 182if (!WindowsListView.GetItemRect(hwnd, item, NativeMethods.LVIR_BOUNDS, out wholeItem)) 184return NativeMethods.Win32Rect.Empty; 187NativeMethods.Win32Rect selectable; 189if (!WindowsListView.GetItemRect(hwnd, item, NativeMethods.LVIR_SELECTBOUNDS, out selectable)) 191return NativeMethods.Win32Rect.Empty; 196return new NativeMethods.Win32Rect (selectable.right, wholeItem.top, wholeItem.right, wholeItem.bottom); 200return new NativeMethods.Win32Rect (wholeItem.left, wholeItem.top, selectable.left, wholeItem.bottom); 204return NativeMethods.Win32Rect.Empty; 254NativeMethods.Win32Rect rc = ListViewCheckBoxRect(_hwnd, _listviewItem); 255NativeMethods.Win32Point pt = new NativeMethods.Win32Point((rc.left + rc.right) / 2, (rc.top + rc.bottom) / 2); 260Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 261Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (7)
64NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 65si.fMask = NativeMethods.SIF_ALL; 103int cPelsAll = NativeMethods.Util.LOWORD (size); 109int cPelsAll = NativeMethods.Util.HIWORD (size); 128int cPelsAll = NativeMethods.Util.LOWORD (size); 134int cPelsAll = NativeMethods.Util.HIWORD (size);
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (9)
82NativeMethods.Win32Rect itemRectangle; 86int lvir = (_item == 0) ? NativeMethods.LVIR_SELECTBOUNDS : NativeMethods.LVIR_BOUNDS; 99NativeMethods.Win32Rect itemRectangle1; 101if (!WindowsListView.GetSubItemRect(_hwnd, _itemParent, 1, NativeMethods.LVIR_BOUNDS, out itemRectangle1)) 119NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (_hwnd, _itemParent); 357NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest (hwnd, item, new NativeMethods.Win32Point (x, y)); 383int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (90)
132System.Diagnostics.Debug.Assert(idObject == NativeMethods.OBJID_MENU || idObject == NativeMethods.OBJID_SYSMENU, "Unexpected idObject"); 134if (eventId == NativeMethods.EventObjectInvoke) 226NativeMethods.GUITHREADINFO gui; 244if (!Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 306if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE)) 315else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_POPUPMENUMODE)) 321else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 518internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint idItem, out NativeMethods.MENUBARINFO mbi) 520mbi = new NativeMethods.MENUBARINFO(); 605NativeMethods.GUITHREADINFO gui; 685if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER)) 733return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero); 744NativeMethods.GUITHREADINFO gui; 748return Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE); 761NativeMethods.MENUBARINFO mbi; 763if (GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero) 816NativeMethods.MENUBARINFO mbi; 817if (!GetMenuBarInfo(_hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi)) 846NativeMethods.MENUBARINFO mbi; 847if (GetMenuBarInfo(_hwnd, NativeMethods.OBJID_MENU, 0, out mbi)) 890NativeMethods.MENUBARINFO mbi; 894if (GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi) && 912NativeMethods.GUITHREADINFO gui; 937int state = UnsafeNativeMethods.GetMenuState(hmenu, i, NativeMethods.MF_BYPOSITION); 938if (Misc.IsBitSet(state, NativeMethods.MF_HILITE)) 970if (eventId == NativeMethods.EventSystemMenuPopupEnd) 1101NativeMethods.GUITHREADINFO gui; 1131new WinEventTracker.EvtIdProperty(NativeMethods.EventSystemMenuPopupStart, ExpandCollapsePattern.ExpandCollapseStateProperty), 1132new WinEventTracker.EvtIdProperty(NativeMethods.EventSystemMenuPopupEnd, ExpandCollapsePattern.ExpandCollapseStateProperty), 1133new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectInvoke, InvokePattern.InvokedEvent) 1264NativeMethods.MENUBARINFO mbi; 1266if (GetMenuBarInfo(_hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi)) 1294NativeMethods.Win32Rect rc; 1435NativeMethods.Win32Rect itemWin32Rect = new NativeMethods.Win32Rect(itemRect); 1528while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 1886return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); 1901return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED); 1906NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO(); 1908menuItemInfo.fMask = NativeMethods.MIIM_FTYPE | NativeMethods.MIIM_SUBMENU | NativeMethods.MIIM_STATE; 1915return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero); 1921NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO (); 1923menuItemInfo.fMask = NativeMethods.MIIM_FTYPE | NativeMethods.MIIM_SUBMENU | NativeMethods.MIIM_STATE; 1930return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1931Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1932Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)); 1965NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO(); 1967menuItemInfo.fMask = NativeMethods.MIIM_FTYPE | NativeMethods.MIIM_SUBMENU | NativeMethods.MIIM_STATE; 1976if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1977Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1978Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 2139Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' ')); 2217for (item = 0; item < cItems && !Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++) 2259NativeMethods.GUITHREADINFO gui; 2352while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 2383if (Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE)) 2418Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP)) 2555int length = UnsafeNativeMethods.GetMenuString(_hmenu, _item, IntPtr.Zero, 0, NativeMethods.MF_BYPOSITION); 2564if (UnsafeNativeMethods.GetMenuString(_hmenu, _item, strbldr, length + 1, NativeMethods.MF_BYPOSITION) == length) 2572NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO(); 2574menuItemInfo.fMask = NativeMethods.MIIM_TYPE | NativeMethods.MIIM_STATE | NativeMethods.MIIM_DATA | NativeMethods.MIIM_ID; 2579if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 2580Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 2581Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 2585else if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_OWNERDRAW)) 2668int state = UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION); 2671return !(Misc.IsBitSet(state, NativeMethods.MF_DISABLED) | Misc.IsBitSet(state, NativeMethods.MF_GRAYED));
MS\Internal\AutomationProxies\WindowsProgressbar.cs (5)
73if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 171int cur = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 172int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero); 173int max = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (19)
76if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 141NativeMethods.Win32Rect rebarRect = new NativeMethods.Win32Rect (); 153NativeMethods.Win32Point pt = new NativeMethods.Win32Point (x, y); 212return Misc.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero); 216private unsafe int getRebarBandIDFromPoint (NativeMethods.Win32Point pt) 218NativeMethods.RB_HITTESTINFO rbHitTestInfo = new NativeMethods.RB_HITTESTINFO (); 223return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 305IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 396Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero); 412NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty; 416if (!XSendMessage.XSend(hwnd, NativeMethods.RB_GETRECT, new IntPtr(item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 445NativeMethods.REBARBANDINFO rebarBandInfo = new NativeMethods.REBARBANDINFO(); 450if (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)
86if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 93if (eventId == NativeMethods.EventObjectLocationChange 94&& idObject == NativeMethods.OBJID_CARET) 184if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)) 190if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(_hwnd)) 205int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 212result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 487return (WindowStyle & NativeMethods.ES_READONLY) == NativeMethods.ES_READONLY; 505Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 528if (UnsafeNativeMethods.AccessibleObjectFromWindow(WindowHandle, NativeMethods.OBJID_NATIVEOM, ref UnsafeNativeMethods.IID_IDispatch, ref obj) != NativeMethods.S_OK) 581if (range.GetEmbeddedObject(out embeddedObject) == NativeMethods.S_OK && embeddedObject != null) 618text = acc.get_accName(NativeMethods.CHILD_SELF); 629int hr = NativeMethods.S_FALSE; 639if (hr != NativeMethods.S_OK) 667if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 677if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 723IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (4)
193NativeMethods.Win32Rect w32rect = new NativeMethods.Win32Rect(); 656return SafeNativeMethods.GetSysColor(NativeMethods.COLOR_WINDOW); 797return SafeNativeMethods.GetSysColor(NativeMethods.COLOR_WINDOWTEXT);
MS\Internal\AutomationProxies\WindowsScroll.cs (64)
46bool isHorizontal = SetScrollPercent (hwnd, horizontalPercent, NativeMethods.SB_HORZ, out resultsNoCheck); 54bool isVertical = SetScrollPercent (hwnd, verticalPercent, NativeMethods.SB_VERT, out resultsNoCheck); 78bool fHz = ScrollCursor(hwnd, HorizontalAmount, NativeMethods.SB_HORZ, fForceResults); 79bool fVt = ScrollCursor (hwnd, VerticalAmount, NativeMethods.SB_VERT, fForceResults); 93return Scrollable (hwnd, NativeMethods.SB_HORZ) ? GetScrollInfo (hwnd, NativeMethods.SB_HORZ) : ScrollPattern.NoScroll; 97return Scrollable (hwnd, NativeMethods.SB_VERT) ? GetScrollInfo (hwnd, NativeMethods.SB_VERT) : ScrollPattern.NoScroll; 101return Scrollable (hwnd, NativeMethods.SB_HORZ) ? ScrollViewSize (hwnd, NativeMethods.SB_HORZ) : 100.0; 105return Scrollable (hwnd, NativeMethods.SB_VERT) ? ScrollViewSize (hwnd, NativeMethods.SB_VERT) : 100.0; 109return Scrollable (hwnd, NativeMethods.SB_HORZ); 113return Scrollable (hwnd, NativeMethods.SB_VERT); 124if ((sbFlag == NativeMethods.SB_HORZ && !Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) || 125(sbFlag == NativeMethods.SB_VERT && !Misc.IsBitSet(style, NativeMethods.WS_VSCROLL))) 137NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo(); 140(sbFlag == NativeMethods.SB_VERT) ? NativeMethods.OBJID_VSCROLL : NativeMethods.OBJID_HSCROLL; 144!Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE); 153NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 155si.fMask = NativeMethods.SIF_ALL; 169bool hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.WS_HSCROLL) || Misc.IsBitSet(style, NativeMethods.WS_VSCROLL); 176hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.ES_MULTILINE); 185return Scrollable(hwnd, NativeMethods.SB_HORZ) || Scrollable(hwnd, NativeMethods.SB_VERT); 202NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 204si.fMask = NativeMethods.SIF_ALL; 259NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 261si.fMask = NativeMethods.SIF_RANGE | NativeMethods.SIF_PAGE; 293throw new ArgumentOutOfRangeException(sbFlag == NativeMethods.SB_HORZ ? "horizontalPercent" : "verticalPercent", SR.Get(SRID.ScrollBarOutOfRange)); 297NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 298si.fMask = NativeMethods.SIF_ALL; 324int message = sbFlag == NativeMethods.SB_HORZ ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL; 326int wParam = NativeMethods.Util.MAKELONG(NativeMethods.SB_THUMBPOSITION, si.nPos); 371NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 372si.fMask = NativeMethods.SIF_ALL; 387if (sbFlag == NativeMethods.SB_HORZ) 392nAction = NativeMethods.SB_LINELEFT; 396nAction = NativeMethods.SB_PAGELEFT; 400nAction = NativeMethods.SB_LINERIGHT; 404nAction = NativeMethods.SB_PAGERIGHT; 416nAction = NativeMethods.SB_LINEUP; 420nAction = NativeMethods.SB_PAGEUP; 424nAction = NativeMethods.SB_LINEDOWN; 428nAction = NativeMethods.SB_PAGEDOWN; 437int wParam = NativeMethods.Util.MAKELONG (nAction, 0); 438int message = sbFlag == NativeMethods.SB_HORZ ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL;
MS\Internal\AutomationProxies\WindowsScrollBar.cs (71)
57_sAutomationId = sbFlag == NativeMethods.SB_VERT ? "Vertical ScrollBar" : "Horizontal ScrollBar"; // This string is a non-localizable string 84return new WindowsScrollBar(hwnd, null, idChild, NativeMethods.SB_CTL); 92WindowsScrollBar wtv = new WindowsScrollBar (hwnd, null, -1, NativeMethods.SB_CTL); 94if (idChild == 0 && eventId == NativeMethods.EventObjectStateChange && idProp == ValuePattern.IsReadOnlyProperty) 102if (idObject == NativeMethods.OBJID_HSCROLL || idObject == NativeMethods.OBJID_VSCROLL) 104idObject = NativeMethods.OBJID_WINDOW; 115ProxySimple scrollBarBit = WindowsScrollBarBits.CreateFromChildId(hwnd, wtv, idChild, NativeMethods.SB_CTL); 147if (_sbFlag == NativeMethods.SB_CTL) 152NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 155int idObject = _sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : _sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT; 183if (_sbFlag == NativeMethods.SB_VERT) 348NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(WindowsScrollBarBits.GetBoundingRectangle(_hwnd, this, item, _sbFlag)); 430return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_VSCROLL); 435return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_HSCROLL); 440if (sbFlag == NativeMethods.SB_CTL) 441return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.SBS_VERT); 443return sbFlag == NativeMethods.SB_VERT; 449NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 451si.fMask = NativeMethods.SIF_RANGE | NativeMethods.SIF_PAGE; 462int idObject = sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT; 463NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 475NativeMethods.SIZE sizeArrow; 537NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 540if (_sbFlag != NativeMethods.SB_CTL || Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_CLIENT, ref sbi)) 547private int GetScrollMaxValue(NativeMethods.ScrollInfo si) 587NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 588si.fMask = NativeMethods.SIF_ALL; 602if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent._hwnd))) 638NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 639si.fMask = NativeMethods.SIF_ALL; 701if (_sbFlag == NativeMethods.SB_CTL) 709IsScrollBarVertical(_hwnd, _sbFlag) ? NativeMethods.WM_VSCROLL : NativeMethods.WM_HSCROLL; 713int wParam = NativeMethods.Util.MAKELONG ((short) NativeMethods.SB_THUMBPOSITION, (short) val); 715wParam = NativeMethods.Util.MAKELONG ((short) NativeMethods.SB_THUMBTRACK, (short) val); 724int idObject = sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT; 725NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 740NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo(); 743int idObject = NativeMethods.OBJID_CLIENT; 744if (_sbFlag == NativeMethods.SB_VERT) 746idObject = NativeMethods.OBJID_VSCROLL; 748else if (_sbFlag == NativeMethods.SB_HORZ) 750idObject = NativeMethods.OBJID_HSCROLL; 758return !Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE); 777protected int _sbFlag = NativeMethods.SB_CTL;
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (36)
189Scroll(amount, NativeMethods.SBS_VERT); 193Scroll(amount, NativeMethods.SBS_HORZ); 214NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 216si.fMask = NativeMethods.SIF_RANGE; 231int idObject = sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT; 232NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 251if (sbFlag == NativeMethods.SB_VERT) 304static internal Rect GetVerticalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi) 306NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(sbi.rcScrollBar.left, sbi.xyThumbTop, sbi.rcScrollBar.right, sbi.xyThumbBottom); 317NativeMethods.SIZE sizeArrow; 395static internal Rect GetHorizontalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi) 398NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(sbi.xyThumbTop, sbi.rcScrollBar.top, sbi.xyThumbBottom, sbi.rcScrollBar.bottom); 408NativeMethods.SIZE sizeArrow; 526IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(_hwnd) : _hwnd; 532wParam = NativeMethods.SB_PAGEUP; 536wParam = NativeMethods.SB_LINEUP; 540wParam = NativeMethods.SB_PAGEDOWN; 544wParam = NativeMethods.SB_LINEDOWN; 548NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 549si.fMask = NativeMethods.SIF_ALL; 559if ((si.nPos == si.nMax) && (wParam == NativeMethods.SB_PAGEDOWN || wParam == NativeMethods.SB_LINEDOWN)) 566if ((si.nPos == si.nMin) && (wParam == NativeMethods.SB_PAGEUP || wParam == NativeMethods.SB_LINEUP)) 571int msg = (style == NativeMethods.SBS_HORZ) ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL;
MS\Internal\AutomationProxies\WindowsSlider.cs (26)
78if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 154NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SliderItem.GetBoundingRectangle (_hwnd, item, _fHorizontal)); 189int msg = IsHorizontalSlider () ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL; 192int wParam = (newVal << 16) | NativeMethods.SB_THUMBPOSITION; 272return (Misc.IsBitSet(WindowStyle, NativeMethods.TBS_VERT)); 277int value = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 280if ((this.WindowStyle & NativeMethods.TBS_REVERSED) != 0) 282int maxValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 300Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val)); 307return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero); 315return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero); 323return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 331return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero); 425IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 454IntPtr wParam = (IntPtr) (_item == (int) WindowsSlider.SItem.LargeDecrement ? NativeMethods.VK_PRIOR : NativeMethods.VK_NEXT); 456Misc.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero); 472NativeMethods.Win32Rect rcChannel = new NativeMethods.Win32Rect (); 477XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 484NativeMethods.Win32Rect rcThumb = new NativeMethods.Win32Rect(); 489XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck);
MS\Internal\AutomationProxies\WindowsSpinner.cs (6)
78hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 100if (idObject == NativeMethods.OBJID_VSCROLL || idObject == NativeMethods.OBJID_HSCROLL) 294IntPtr hwndChild = Misc.GetWindow(hwndParent, NativeMethods.GW_CHILD); 300IntPtr hwndBuddy = Misc.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 306hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
MS\Internal\AutomationProxies\WindowsStatic.cs (24)
100style = Misc.GetWindowStyle(hwnd) & NativeMethods.SS_TYPEMASK; 120if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 186return Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK && acc != null && acc.ChildCount > 0; 194case NativeMethods.SS_ICON: 198case NativeMethods.SS_BITMAP: 202case NativeMethods.SS_LEFT: 203case NativeMethods.SS_CENTER: 204case NativeMethods.SS_RIGHT: 205case NativeMethods.SS_BLACKRECT: 206case NativeMethods.SS_GRAYRECT: 207case NativeMethods.SS_WHITERECT: 208case NativeMethods.SS_BLACKFRAME: 209case NativeMethods.SS_GRAYFRAME: 210case NativeMethods.SS_WHITEFRAME: 211case NativeMethods.SS_SIMPLE: 212case NativeMethods.SS_LEFTNOWORDWRAP: 213case NativeMethods.SS_ETCHEDHORZ: 214case NativeMethods.SS_ETCHEDVERT: 215case NativeMethods.SS_ETCHEDFRAME: 216case NativeMethods.SS_OWNERDRAW: 220case NativeMethods.SS_ENHMETAFILE: 221case NativeMethods.SS_USERITEM:
MS\Internal\AutomationProxies\WindowsStatusBar.cs (24)
77if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 89if (eventId == NativeMethods.EventObjectNameChange && idChild == 1) 238NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (WindowsStatusBarPane.GetBoundingRectangle (_hwnd, item)); 249NativeMethods.Win32Rect rc = StatusBarGrip.GetBoundingRectangle (_hwnd); 351return Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero); 370Misc.EnumChildWindows(hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindChildFromRect), (void*)&info); 377NativeMethods.Win32Rect rc = NativeMethods.Win32Rect.Empty; 574return XSendMessage.GetItemRect(hwnd, NativeMethods.SB_GETRECT, item); 579if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) != NativeMethods.S_OK || acc == null) 610int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero); 614int len = NativeMethods.Util.LOWORD(retValue); 615return XSendMessage.GetItemText(_hwnd, NativeMethods.SB_GETTEXTW, _item, len); 803internal static NativeMethods.Win32Rect GetBoundingRectangle (IntPtr hwnd) 807return NativeMethods.Win32Rect.Empty; 810NativeMethods.Win32Rect client = new NativeMethods.Win32Rect(); 813return NativeMethods.Win32Rect.Empty; 818NativeMethods.SIZE sizeGrip = WindowsGrip.GetGripSize(hwnd, true); 823return new NativeMethods.Win32Rect(client.left, client.bottom - sizeGrip.cy, client.left + sizeGrip.cx, client.bottom); 827return new NativeMethods.Win32Rect(client.right - sizeGrip.cx, client.bottom - sizeGrip.cy, client.right, client.bottom);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (52)
82if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 89IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 167NativeMethods.HDHITTESTINFO HitTestInfo = new NativeMethods.HDHITTESTINFO(); 169HitTestInfo.pt = new NativeMethods.Win32Point (x, y); 177index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 182if (index != -1 && (NativeMethods.HHT_ONHEADER == (HitTestInfo.flags & 0x000F))) 193int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 209return Misc.IsBitSet(WindowStyle, NativeMethods.HDS_VERT) ? OrientationType.Vertical : OrientationType.Horizontal; 260IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (_hwnd, NativeMethods.GA_PARENT); 300Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 308return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.HDS_HIDDEN); 314return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 319return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 324NativeMethods.HDITEM item = new NativeMethods.HDITEM(); 326item.mask = NativeMethods.HDI_ORDER; 438NativeMethods.Win32Rect itemRect = BoundingRect(); 448NativeMethods.Win32Rect parentRect = NativeMethods.Win32Rect.Empty; 490NativeMethods.Win32Point pt; 497IntPtr center = NativeMethods.Util.MAKELPARAM (pt.x, pt.y); 500Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 501Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 544int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 568NativeMethods.HDITEM hdi = new NativeMethods.HDITEM(); 570hdi.mask = NativeMethods.HDI_TEXT; 578private NativeMethods.Win32Rect BoundingRect () 582NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty; 587result = XSendMessage.XSend(_hwnd, NativeMethods.HDM_GETITEMRECT, new IntPtr(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 594return NativeMethods.Win32Rect.Empty; 603int cxBorder = 8 * UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXBORDER); 649return NativeMethods.Win32Rect.Empty; 667return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_BUTTONS)); 673return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_FILTERBAR)); 678private bool GetInvokationPoint (out NativeMethods.Win32Point pt) 693NativeMethods.HDITEM item = new NativeMethods.HDITEM(); 695item.mask = NativeMethods.HDI_FORMAT; 700if ((item.fmt & NativeMethods.HDF_SPLITBUTTON) != 0) 712int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 739Rect rect = XSendMessage.GetItemRect(_hwnd, NativeMethods.HDM_GETITEMDROPDOWNRECT, _item); 740NativeMethods.Win32Rect rectW32 = new NativeMethods.Win32Rect(rect); 741IntPtr center = NativeMethods.Util.MAKELPARAM (rectW32.left + ((rectW32.right - rectW32.left) / 2), rectW32.top + ((rectW32.bottom - rectW32.top) / 2)); 746Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 747Misc.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)
113return ReturnNextTitleBarChild (true, NativeMethods.INDEX_TITLEBAR_MIC); 119return ReturnNextTitleBarChild (true, NativeMethods.INDEX_TITLEBAR_MAC); 124int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y)); 127case NativeMethods.HTCAPTION: 130case NativeMethods.HTMINBUTTON: 131return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_MINBUTTON); 133case NativeMethods.HTMAXBUTTON : 134return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_MAXBUTTON); 136case NativeMethods.HTHELP : 137return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_HELPBUTTON); 139case NativeMethods.HTCLOSE : 140return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON); 142case NativeMethods.HTSYSMENU : 175case NativeMethods.INDEX_TITLEBAR_HELPBUTTON : 176case NativeMethods.INDEX_TITLEBAR_MINBUTTON : 177case NativeMethods.INDEX_TITLEBAR_MAXBUTTON : 178case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON : 214for (int i = start; i >= NativeMethods.INDEX_TITLEBAR_MIC && i <= NativeMethods.INDEX_TITLEBAR_MAC; i += next ? 1 : -1) 218if (!Misc.IsBitSet(ti.rgstate[i], NativeMethods.STATE_SYSTEM_INVISIBLE) || i == _systemMenu) 234return !Misc.IsBitSet(ti.rgstate[0], NativeMethods.STATE_SYSTEM_INVISIBLE); 295case NativeMethods.INDEX_TITLEBAR_HELPBUTTON: 298case NativeMethods.INDEX_TITLEBAR_MINBUTTON: 299if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 308case NativeMethods.INDEX_TITLEBAR_MAXBUTTON: 309if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 318case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON: 329case NativeMethods.INDEX_TITLEBAR_HELPBUTTON: 330if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_DISABLED)) 335return Misc.IsBitSet(WindowExStyle, NativeMethods.WS_EX_CONTEXTHELP); 337case NativeMethods.INDEX_TITLEBAR_MINBUTTON: 341if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 346return Misc.IsBitSet(style, NativeMethods.WS_MINIMIZEBOX); 349case NativeMethods.INDEX_TITLEBAR_MAXBUTTON: 353if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 358return Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZEBOX); 383case NativeMethods.INDEX_TITLEBAR_MINBUTTON: 384if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 389case NativeMethods.INDEX_TITLEBAR_HELPBUTTON: 392case NativeMethods.INDEX_TITLEBAR_MAXBUTTON: 393if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 398case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON: 423case NativeMethods.INDEX_TITLEBAR_MINBUTTON : 424if ((WindowStyle & NativeMethods.WS_MINIMIZE) != 0) 425command = NativeMethods.SC_RESTORE; 427command = NativeMethods.SC_MINIMIZE; 430case NativeMethods.INDEX_TITLEBAR_HELPBUTTON : 431command = NativeMethods.SC_CONTEXTHELP; 434case NativeMethods.INDEX_TITLEBAR_MAXBUTTON : 435if ((WindowStyle & NativeMethods.WS_MAXIMIZE) != 0) 436command = NativeMethods.SC_RESTORE; 438command = NativeMethods.SC_MAXIMIZE; 441case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON : 442if ((WindowStyle & NativeMethods.WS_MINIMIZE) != 0) 444Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero); 447command = NativeMethods.SC_CLOSE; 458Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (38)
68Accessible acc = Accessible.CreateNativeFromEvent(hwnd, NativeMethods.OBJID_CLIENT, NativeMethods.CHILD_SELF); 89if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 102if (eventId == NativeMethods.EventObjectDestroy && idProp == AutomationElement.StructureChangedEvent) 224NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (ToolbarItem.GetBoundingRectangle (_hwnd, item)); 242int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero); 246Accessible acc = Accessible.CreateNativeFromEvent(_hwnd, NativeMethods.OBJID_CLIENT, NativeMethods.CHILD_SELF); 275name = GetAccessibleName(NativeMethods.CHILD_SELF); 296NativeMethods.TBBUTTON tbb = new NativeMethods.TBBUTTON (); 313if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 315Accessible acc = Accessible.CreateNativeFromEvent(_hwnd, NativeMethods.OBJID_CLIENT, item + 1); 343return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero); 375NativeMethods.TBBUTTON tbb = new NativeMethods.TBBUTTON(); 383bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0; 384int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero); 390if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_SEP)) 392else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_CHECK)) 401else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_DROPDOWN) 402&& Misc.IsBitSet(exStyle, NativeMethods.TBSTYLE_EX_DRAWDDARROWS)) 407else if (!hasImageList || tbb.iBitmap == NativeMethods.I_IMAGENONE) 443if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 483return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 529Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 575return XSendMessage.GetItemRect(hwnd, NativeMethods.TB_GETITEMRECT, item); 591return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item; 613int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 616return XSendMessage.GetItemText(_hwnd, NativeMethods.TB_GETBUTTONTEXT, _idCommand, len); 637NativeMethods.TBBUTTON tbb = new NativeMethods.TBBUTTON(); 650IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 658|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 665if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 692if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
80if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 86if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (28)
79if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 160if (idObject != NativeMethods.OBJID_WINDOW) 176if( eventId == NativeMethods.EVENT_OBJECT_HIDE /*|| eventId == NativeMethods.EVENT_OBJECT_DESTROY*/ ) 253NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 284case NativeMethods.INDEX_TITLEBAR_MINBUTTON: 285if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 290case NativeMethods.INDEX_TITLEBAR_HELPBUTTON: 293case NativeMethods.INDEX_TITLEBAR_MAXBUTTON: 294if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 299case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON: 302case NativeMethods.INDEX_TITLEBAR_SELF: 312NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 324int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 328case NativeMethods.HTMINBUTTON: 329if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MINIMIZE)) 334case NativeMethods.HTMAXBUTTON: 335if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MAXIMIZE)) 340case NativeMethods.HTCLOSE: 341case NativeMethods.HTMDICLOSE: 344case NativeMethods.HTHELP: 347case NativeMethods.HTMDIMINBUTTON: 350case NativeMethods.HTMDIMAXBUTTON: 353case NativeMethods.HTCAPTION: 374new WinEventTracker.EvtIdProperty(NativeMethods.EVENT_OBJECT_HIDE, 0),
MS\Internal\AutomationProxies\WindowsTreeView.cs (88)
77case NativeMethods.OBJID_CLIENT : 82if (idChild != 0 && (eventId == NativeMethods.EventObjectSelection || 83eventId == NativeMethods.EventObjectSelectionRemove || 84eventId == NativeMethods.EventObjectSelectionAdd || 85eventId == NativeMethods.EventObjectStateChange || 86eventId == NativeMethods.EventObjectDestroy || 87eventId == NativeMethods.EventObjectCreate || 88eventId == NativeMethods.EventObjectNameChange)) 100case NativeMethods.OBJID_VSCROLL : 101case NativeMethods.OBJID_HSCROLL : 110if (idProp == ExpandCollapsePattern.ExpandCollapseStateProperty && el is TreeViewItem && eventId == NativeMethods.EventObjectStateChange) 117if (((idProp as AutomationEvent) == AutomationElement.StructureChangedEvent && el is TreeViewItem) && !(eventId == NativeMethods.EventObjectDestroy || eventId == NativeMethods.EventObjectCreate)) 349return new int[] { NativeMethods.EventObjectNameChange, 350NativeMethods.EventObjectStateChange }; 354return new int[] { NativeMethods.EventObjectStateChange }; 367new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectStateChange, idEvent), 368new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectCreate, idEvent), 369new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectDestroy, idEvent) 422return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0; 428return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0; 434int expanded = GetItemState(hwnd, treeItem, NativeMethods.TVIS_EXPANDED); 436return (Misc.IsBitSet(expanded, NativeMethods.TVIS_EXPANDED)); 447if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0) 453fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0; 462return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_CARET); 472return GetNext(hwnd, treeItem, NativeMethods.TVGN_PARENT); 478return GetNext(hwnd, treeItem, NativeMethods.TVGN_NEXT); 484return GetNext(hwnd, treeItem, NativeMethods.TVGN_PREVIOUS); 490return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_ROOT); 496return GetNext(hwnd, treeItem, NativeMethods.TVGN_CHILD); 506int state = GetItemState(hwnd, treeItem, NativeMethods.TVIS_STATEIMAGEMASK); 518NativeMethods.TVITEM treeItem = new NativeMethods.TVITEM (); 520treeItem.mask = NativeMethods.TVIF_STATE; 522treeItem.stateMask = NativeMethods.TVIS_STATEIMAGEMASK; 534return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem); 540return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask)); 546NativeMethods.TVITEM treeItem; 548if (!GetItem(hwnd, item, NativeMethods.TVIF_CHILDREN, out treeItem)) 559private static unsafe NativeMethods.Win32Rect GetItemRect (IntPtr hwnd, IntPtr treeItem, bool labelOnly) 561NativeMethods.Win32Rect rc = NativeMethods.Win32Rect.Empty; 571if (!XSendMessage.XSend(hwnd, NativeMethods.TVM_GETITEMRECT, partialDisplay, rectangle, Marshal.SizeOf(rc.GetType()))) 573return NativeMethods.Win32Rect.Empty; 580return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty; 586private static bool GetItem (IntPtr hwnd, IntPtr item, int mask, out NativeMethods.TVITEM treeItem) 588treeItem = new NativeMethods.TVITEM (); 597NativeMethods.TVITEM treeItem = new NativeMethods.TVITEM(); 599treeItem.mask = NativeMethods.TVIF_TEXT; 611IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item); 622if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1) 625Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero); 633Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero); 659IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 670int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 831_nativeAcc = Accessible.CreateNativeFromEvent(_hwnd, NativeMethods.OBJID_CLIENT, childId); 860NativeMethods.Win32Rect itemRect = GetItemRect(_hwnd, _hItem, true); 879IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 923NativeMethods.Win32Rect itemWin32Rect = new NativeMethods.Win32Rect(itemRect); 954int highPart = NativeMethods.Util.HIDWORD((long)_hItem); 955int lowPart = NativeMethods.Util.LODWORD((long)_hItem); 1244Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem); 1297int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED)); 1299return Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED); 1470NativeMethods.Win32Rect rectItem = WindowsTreeView.GetItemRect(_hwnd, _hItem, true); 1478NativeMethods.Win32Point pt = new NativeMethods.Win32Point(((rectItem.left + rectItem.right) / 2), ((rectItem.top + rectItem.bottom) / 2)); 1490return Misc.IsBitSet(WindowStyle, NativeMethods.TVS_EDITLABELS); 1496int selected = WindowsTreeView.GetItemState(_hwnd, _hItem, NativeMethods.TVIS_SELECTED); 1498if (Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED)) 1510bool isCheckbox = Misc.IsBitSet(WindowStyle, NativeMethods.TVS_CHECKBOXES); 1550private void SimulateClick(NativeMethods.Win32Point pt) 1553Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1554Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1559NativeMethods.TVITEM treeItem; 1560if (WindowsTreeView.GetItem(_hwnd, _hItem, NativeMethods.TVIF_IMAGE | NativeMethods.TVIF_STATE, out treeItem))
MS\Internal\AutomationProxies\WindowsUpDown.cs (35)
79if(idObject == NativeMethods.OBJID_CLIENT 80&& eventId == NativeMethods.EventObjectInvoke 85else if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 107button.DispatchEvents(NativeMethods.EventObjectInvoke, InvokePattern.InvokedEvent, idObject, idChild); 205NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SpinButtonItem.GetBoundingRectangle (_hwnd, item)); 244Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0)); 247Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 310IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 325int hr = Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc); 328return hr == NativeMethods.S_OK && acc != null ? acc.Role == AccessibleRole.SpinButton : false; 361int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 368return (double)NativeMethods.Util.LOWORD(pos); 374IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 398int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 399int min = NativeMethods.Util.HIWORD(range); 400int max = NativeMethods.Util.LOWORD(range); 412int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 413int min = NativeMethods.Util.HIWORD(range); 414int max = NativeMethods.Util.LOWORD(range); 551NativeMethods.Win32Rect updownRect = new NativeMethods.Win32Rect(); 560IntPtr center = NativeMethods.Util.MAKELPARAM (x, y); 563Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center); 564Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center); 579NativeMethods.Win32Rect updownRect = new NativeMethods.Win32Rect(); 641IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 654return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.UDS_HORZ);
MS\Internal\AutomationProxies\WinEventTracker.cs (57)
164NativeMethods.WinEventProcDef proc = new NativeMethods.WinEventProcDef (WinEventProc); 188hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); 258if (!((idObject == NativeMethods.OBJID_MENU || idObject == NativeMethods.OBJID_SYSMENU) && eventId == NativeMethods.EventObjectInvoke) && 543NativeMethods.EventSystemSound, 544NativeMethods.EventSystemAlert, 545NativeMethods.EventSystemForeground, 546NativeMethods.EventSystemMenuStart, 547NativeMethods.EventSystemMenuEnd, 548NativeMethods.EventSystemMenuPopupStart, 549NativeMethods.EventSystemMenuPopupEnd, 550NativeMethods.EventSystemCaptureStart, 551NativeMethods.EventSystemCaptureEnd, 552NativeMethods.EventSystemMoveSizeStart, 553NativeMethods.EventSystemMoveSizeEnd, 554NativeMethods.EventSystemContextHelpStart, 555NativeMethods.EventSystemContextHelpEnd, 556NativeMethods.EventSystemDragDropStart, 557NativeMethods.EventSystemDragDropEnd, 558NativeMethods.EventSystemDialogStart, 559NativeMethods.EventSystemDialogEnd, 560NativeMethods.EventSystemScrollingStart, 561NativeMethods.EventSystemScrollingEnd, 562NativeMethods.EventSystemSwitchEnd, 563NativeMethods.EventSystemMinimizeStart, 564NativeMethods.EventSystemMinimizeEnd, 565NativeMethods.EventSystemPaint, 566NativeMethods.EventConsoleCaret, 567NativeMethods.EventConsoleUpdateRegion, 568NativeMethods.EventConsoleUpdateSimple, 569NativeMethods.EventConsoleUpdateScroll, 570NativeMethods.EventConsoleLayout, 571NativeMethods.EventConsoleStartApplication, 572NativeMethods.EventConsoleEndApplication, 573NativeMethods.EventObjectCreate, 574NativeMethods.EventObjectDestroy, 575NativeMethods.EventObjectShow, 576NativeMethods.EventObjectHide, 577NativeMethods.EventObjectReorder, 578NativeMethods.EventObjectFocus, 579NativeMethods.EventObjectSelection, 580NativeMethods.EventObjectSelectionAdd, 581NativeMethods.EventObjectSelectionRemove, 582NativeMethods.EventObjectSelectionWithin, 583NativeMethods.EventObjectStateChange, 584NativeMethods.EventObjectLocationChange, 585NativeMethods.EventObjectNameChange, 586NativeMethods.EventObjectDescriptionChange, 587NativeMethods.EventObjectValueChange, 588NativeMethods.EventObjectParentChange, 589NativeMethods.EventObjectHelpChange, 590NativeMethods.EventObjectDefactionChange, 591NativeMethods.EventObjectAcceleratorChange, 592NativeMethods.EventObjectInvoke, 593NativeMethods.EventObjectTextSelectionChanged
MS\Internal\AutomationProxies\WinFormsSpinner.cs (5)
140IntPtr hwndFirstChild = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 147IntPtr hwndLastChild = Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDLAST); 154if (Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDNEXT) != hwndLastChild) 191if (Accessible.AccessibleObjectFromWindow(hwndSpin, NativeMethods.OBJID_CLIENT, ref acc) != NativeMethods.S_OK || acc == null)
MS\Win32\NativeMethods.cs (2)
1505internal static int comboboxInfoSize = Marshal.SizeOf(typeof(NativeMethods.COMBOBOXINFO)); 1907internal NativeMethods.Win32Point pt;
MS\Win32\SafeNativeMethods.cs (6)
33public static extern bool IntersectRect (ref NativeMethods.Win32Rect rcDest, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2); 43internal static extern bool UnionRect (out NativeMethods.Win32Rect rcDst, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2);
MS\Win32\UnsafeNativeMethods.cs (32)
33internal static extern int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf); 47internal static extern void GetSystemInfo(out NativeMethods.SYSTEM_INFO SystemInfo); 127internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags); 162public static extern bool GetMenuItemInfo(IntPtr hMenu, int uItem, bool fByPosition, [In, Out] ref NativeMethods.MENUITEMINFO menuItemInfo); 164public static extern bool GetMenuItemRect(IntPtr hWnd, IntPtr hMenu, int uItem, out NativeMethods.Win32Rect lprcItem); 172internal static extern IntPtr DispatchMessage([In] ref NativeMethods.MSG msg); 174internal static extern int GetMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hWnd, int uMsgFilterMin, int uMsgFilterMax); 176internal static extern bool PeekMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hwnd, int uMsgFilterMin, int uMsgFilterMax, int wRemoveMsg); 184internal static extern IntPtr SendMessageTimeout(IntPtr hwnd, int uMsg, IntPtr wParam, ref NativeMethods.Win32Rect lParam, int flags, int uTimeout, out IntPtr result); 190internal static extern bool TranslateMessage([In, Out] ref NativeMethods.MSG msg); 198internal static extern IntPtr MonitorFromRect(ref NativeMethods.Win32Rect rect, int dwFlags); 208internal static extern int SendInput (int nInputs, ref NativeMethods.INPUT ki, int cbSize); 241internal static extern bool GetComboBoxInfo(IntPtr hwnd, [In, Out] ref NativeMethods.COMBOBOXINFO cbInfo); 247internal static extern bool GetCursorPos([In, Out] ref NativeMethods.Win32Point pt); 249internal static extern bool GetPhysicalCursorPos([In, Out] ref NativeMethods.Win32Point pt); 261internal static extern bool GetScrollBarInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollBarInfo lpsi); 263internal static extern bool GetScrollInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollInfo lpsi); 269internal unsafe static extern bool EnumChildWindows(IntPtr hwndParent, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam); 275internal static extern bool GetClientRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect); 277internal static extern bool GetGUIThreadInfo(uint idThread, ref NativeMethods.GUITHREADINFO guiThreadInfo); 281internal static extern bool GetWindowRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect); 305internal NativeMethods.Win32Point ptStart; 339internal NativeMethods.Win32Rect rcTitleBar; 340[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = NativeMethods.CCHILDREN_TITLEBAR + 1)] 348internal NativeMethods.Win32Rect rcTitleBar; 349[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = NativeMethods.CCHILDREN_TITLEBAR + 1)] 351[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = NativeMethods.CCHILDREN_TITLEBAR + 1)] 352internal NativeMethods.Win32Rect[] rgrect; 370internal NativeMethods.Win32Rect rc; 401iResult = NativeMethods.IntPtrToInt32(result); 460public NativeMethods.Win32Point pt; 486public NativeMethods.Win32Point pt;
parent\parent\Shared\MS\Win32\NativeMethodsSetLastError.cs (4)
93public static extern bool GetMenuBarInfo (IntPtr hwnd, int idObject, uint idItem, ref NativeMethods.MENUBARINFO mbi); 96public static extern int GetTextExtentPoint32(IntPtr hdc, [MarshalAs(UnmanagedType.LPWStr)]string lpString, int cbString, out NativeMethods.SIZE lpSize); 105public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Rect rect, int cPoints); 108public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Point pt, int cPoints);