2220 references to NativeMethods
UIAutomationClientSideProviders (2220)
MS\Internal\AutomationProxies\Accessible.cs (53)
162IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject)); 170int hr = NativeMethods.S_FALSE; 210if(hr == NativeMethods.S_OK && acc != null) 217if (hr != NativeMethods.S_OK || acc == null) 271return Wrap(acc, NativeMethods.CHILD_SELF); 302return _idChild == NativeMethods.CHILD_SELF ? GetChildAt(_acc, null, 0) : null; 310return _idChild == NativeMethods.CHILD_SELF ? GetChildAt(_acc, null, Accessible.GetChildCount(_acc) - 1) : null; 379if (_idChild != NativeMethods.CHILD_SELF) 543NativeMethods.Win32Rect rcW32 = GetLocation(_acc, _idChild); 674if (childId == NativeMethods.CHILD_SELF) 728Debug.Assert(_idChild == NativeMethods.CHILD_SELF); 752if (idChild == NativeMethods.CHILD_SELF) 768rval = Wrap((IAccessible)scan, NativeMethods.CHILD_SELF); 801Select(NativeMethods.SELFLAG_TAKEFOCUS); 807Select(NativeMethods.SELFLAG_TAKEFOCUS|NativeMethods.SELFLAG_TAKESELECTION); 815Select(NativeMethods.SELFLAG_TAKEFOCUS|NativeMethods.SELFLAG_ADDSELECTION); 823Select(NativeMethods.SELFLAG_TAKEFOCUS|NativeMethods.SELFLAG_REMOVESELECTION); 841if ( result != NativeMethods.S_OK) 877if (hr != NativeMethods.S_OK || accObject == null) 879return NativeMethods.S_FALSE; 892return NativeMethods.S_FALSE; 914if (UnsafeNativeMethods.AccessibleChildren(accessibleObject, 0, childCount, aChildren, out childrenReturned) == NativeMethods.E_INVALIDARG) 1019NativeMethods.Win32Rect rect1 = GetLocation(_acc, _idChild); 1020NativeMethods.Win32Rect rect2 = GetLocation(acc, idChild); 1075idChild = NativeMethods.CHILD_SELF; 1103idChild = NativeMethods.CHILD_SELF; 1255internal static NativeMethods.Win32Rect GetLocation(IAccessible acc, int idChild) 1258NativeMethods.Win32Rect rect = NativeMethods.Win32Rect.Empty; 1273return NativeMethods.Win32Rect.Empty; 1325case NativeMethods.RPC_E_SERVERFAULT: // The server threw an exception. 1326case NativeMethods.RPC_E_DISCONNECTED: // The object invoked has disconnected from its clients. 1327case NativeMethods.RPC_E_UNAVAILABLE: // The server has disappeared 1328case NativeMethods.DISP_E_BADINDEX: // Index out of Range (Usually means Children have disappeared) 1329case NativeMethods.E_INTERFACEUNKNOWN: // The interface is unknown, usually because things have changed. 1330case NativeMethods.E_UNKNOWNWORDERROR: // An unknown Error code thrown by Word being closed while a search is running 1331case NativeMethods.RPC_E_SYS_CALL_FAILED: // System call failed during RPC. 1334case NativeMethods.E_FAIL: 1337case NativeMethods.E_MEMBERNOTFOUND: 1341case NativeMethods.E_NOTIMPL: 1345case NativeMethods.E_OUTOFMEMORY: 1352case NativeMethods.E_INVALIDARG: 1358case NativeMethods.E_ACCESSDENIED: 1362case NativeMethods.E_UNEXPECTED: 1409NativeMethods.Win32Rect ownLoc = GetLocation(old, NativeMethods.CHILD_SELF); 1410AccessibleRole ownRole = GetRole(old, NativeMethods.CHILD_SELF); 1426AccessibleRole role = GetRole(accChild, NativeMethods.CHILD_SELF); 1430NativeMethods.Win32Rect loc = GetLocation(accChild, NativeMethods.CHILD_SELF);
MS\Internal\AutomationProxies\ClickablePoint.cs (14)
53internal static bool GetPoint(IntPtr hwnd, List<CPRect> listIn, List<CPRect> listOut, ref NativeMethods.Win32Point pt) 60for (hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT)) 74hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDPREV); 84if (Misc.IsBitSet(Misc.GetWindowStyle(hwndCurrent), NativeMethods.WS_POPUP)) 151NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(simple.BoundingRectangle); 199internal CPRect(ref NativeMethods.Win32Rect rc, bool fRiAsInsideRect) 231private static bool ClickableInRect(IntPtr hwnd, ref NativeMethods.Win32Point pt, bool fRiAsInsideRect, List<CPRect> listIn, List<CPRect> listOut) 239NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(); 259int lr = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 261if (lr == NativeMethods.HTTRANSPARENT)
MS\Internal\AutomationProxies\CommonGetThemePartSize.cs (12)
48internal NativeMethods.SIZE Size (int iPartId, int iStateId) 52NativeMethods.SIZE size = new NativeMethods.SIZE(0, 0); 72size.cx = UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXSIZE); 73size.cy = UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXSIZE); 77size.cx = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXVSCROLL); 78size.cy = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYHSCROLL); 82size.cx = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXHSCROLL); 83size.cy = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYVSCROLL); 90size.cx = UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXSIZE); 91size.cy = UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXSIZE); 201private static extern unsafe IntPtr GetThemePartSize(SafeThemeHandle hTheme, IntPtr hdc, int iPartId, int iStateId, IntPtr prc, int eSize, NativeMethods.SIZE* psz);
MS\Internal\AutomationProxies\CommonXSendMessage.cs (204)
400internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVITEM item) 408return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 414return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, 423return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 429internal static unsafe bool SetItem(IntPtr hwnd, int index, NativeMethods.LVITEM item) 437return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType())); 443return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 449return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 455internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.LVITEM_V6 item) 463fixed (NativeMethods.LVITEM_V6 *pItem = &item) 465return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 472bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 476item = (NativeMethods.LVITEM_V6)item32; 484bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 488item = (NativeMethods.LVITEM_V6)item64; 496internal static unsafe bool SetGroupInfo(IntPtr hwnd, NativeMethods.LVGROUP group) 504int result = XSendGetIndex(hwnd, NativeMethods.LVM_SETGROUPINFO, 511int result = XSendGetIndex(hwnd, NativeMethods.LVM_SETGROUPINFO, 518int result = XSendGetIndex(hwnd, NativeMethods.LVM_SETGROUPINFO, 526internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP group) 535fixed (NativeMethods.LVGROUP* pGroup = &group) 537result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 548int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 552group = (NativeMethods.LVGROUP)group32; 559int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 563group = (NativeMethods.LVGROUP)group64; 571internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP_V6 group) 580fixed (NativeMethods.LVGROUP_V6* pGroup = &group) 582result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 593int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 597group = (NativeMethods.LVGROUP_V6)group32; 604int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 608group = (NativeMethods.LVGROUP_V6)group64; 616internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP item) 630return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszHeader), item.cchHeader); 642return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszHeader), item32.cchHeader); 654return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszHeader), item64.cchHeader); 660internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP_V6 item, int mask) 671if (((mask & NativeMethods.LVGF_HEADER) == 0) && ((mask & NativeMethods.LVGF_SUBSET) == 0)) 679case NativeMethods.LVGF_HEADER: 684case NativeMethods.LVGF_SUBSET: 689return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true); 697case NativeMethods.LVGF_HEADER: 702case NativeMethods.LVGF_SUBSET: 707return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true); 715case NativeMethods.LVGF_HEADER: 720case NativeMethods.LVGF_SUBSET: 725return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), textAddress, size, true); 741internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TCITEM item) 749fixed (NativeMethods.TCITEM* pItem = &item) 751return XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 758bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 762item = (NativeMethods.TCITEM)item32; 771bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 775item = (NativeMethods.TCITEM)item64; 784internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.TCITEM item) 792return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 798return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), 807return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 823internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.HDITEM item) 831fixed (NativeMethods.HDITEM* pItem = &item) 833return XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 840bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 844item = (NativeMethods.HDITEM)item32; 853bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 857item = (NativeMethods.HDITEM)item64; 866internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.HDITEM item) 874return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 881hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), 889return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 905internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.TVITEM item) 913fixed (NativeMethods.TVITEM* pItem = &item) 915return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 922bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 926item = (NativeMethods.TVITEM)item32; 935bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 939item = (NativeMethods.TVITEM)item64; 948internal static unsafe bool SetItem(IntPtr hwnd, NativeMethods.TVITEM item) 956return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 962return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 968return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 982NativeMethods.Win32Point clientPoint = new NativeMethods.Win32Point(x, y); 987NativeMethods.TVHITTESTINFO hitTestInfo = 988new NativeMethods.TVHITTESTINFO(clientPoint.x, clientPoint.y, 0); 989if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo), 998if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo32), 1007if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo64), 1019internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TVITEM item) 1027return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1034hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), 1042return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1058internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TBBUTTON item) 1066fixed (NativeMethods.TBBUTTON* pItem = &item) 1068return XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()), ErrorValue.Zero); 1075bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), ErrorValue.Zero); 1079item = (NativeMethods.TBBUTTON)item32; 1088bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), ErrorValue.Zero); 1092item = (NativeMethods.TBBUTTON)item64; 1110internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TOOLINFO item) 1125hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item), 1133hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item32), 1142hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item64), 1170NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty; 1331private static string ListView_V6_GetGroupTextOnWinXp(IntPtr hwnd, NativeMethods.LVGROUP group) 1351XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1357using (SafeCoTaskMem copyTo = new SafeCoTaskMem(NativeMethods.MAX_PATH)) 1366if (Misc.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1399XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1405using (SafeCoTaskMem copyTo = new SafeCoTaskMem(NativeMethods.MAX_PATH)) 1414if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1447XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1453using (SafeCoTaskMem copyTo = new SafeCoTaskMem(NativeMethods.MAX_PATH)) 1462if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1560internal TCITEM_32(NativeMethods.TCITEM item) 1572public static explicit operator NativeMethods.TCITEM(TCITEM_32 item) 1574NativeMethods.TCITEM nativeItem = new NativeMethods.TCITEM 1602internal TCITEM_64(NativeMethods.TCITEM item) 1615public static explicit operator NativeMethods.TCITEM(TCITEM_64 item) 1617NativeMethods.TCITEM nativeItem = new NativeMethods.TCITEM 1648internal HDITEM_32(NativeMethods.HDITEM item) 1664public static explicit operator NativeMethods.HDITEM(HDITEM_32 item) 1666NativeMethods.HDITEM nativeItem = new NativeMethods.HDITEM 1701internal HDITEM_64(NativeMethods.HDITEM item) 1717public static explicit operator NativeMethods.HDITEM(HDITEM_64 item) 1719NativeMethods.HDITEM nativeItem = new NativeMethods.HDITEM 1753internal LVITEM_32(NativeMethods.LVITEM item) 1768public static explicit operator NativeMethods.LVITEM(LVITEM_32 item) 1770NativeMethods.LVITEM nativeItem = new NativeMethods.LVITEM 1804internal LVITEM_64(NativeMethods.LVITEM item) 1820public static explicit operator NativeMethods.LVITEM(LVITEM_64 item) 1822NativeMethods.LVITEM nativeItem = new NativeMethods.LVITEM 1858internal LVITEM_V6_32(NativeMethods.LVITEM_V6 item) 1876public static explicit operator NativeMethods.LVITEM_V6(LVITEM_V6_32 item) 1878NativeMethods.LVITEM_V6 nativeItem = new NativeMethods.LVITEM_V6 1919internal LVITEM_V6_64(NativeMethods.LVITEM_V6 item) 1939public static explicit operator NativeMethods.LVITEM_V6(LVITEM_V6_64 item) 1941NativeMethods.LVITEM_V6 nativeItem = new NativeMethods.LVITEM_V6 1977internal LVGROUP_32(NativeMethods.LVGROUP item) 1992public static explicit operator NativeMethods.LVGROUP(LVGROUP_32 item) 1994NativeMethods.LVGROUP nativeItem = new NativeMethods.LVGROUP 1996cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP)), 2043internal LVGROUP_V6_32(NativeMethods.LVGROUP_V6 item) 2074public static explicit operator NativeMethods.LVGROUP_V6(LVGROUP_V6_32 item) 2076NativeMethods.LVGROUP_V6 nativeItem = new NativeMethods.LVGROUP_V6 2078cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)), 2126internal LVGROUP_64(NativeMethods.LVGROUP item) 2142public static explicit operator NativeMethods.LVGROUP(LVGROUP_64 item) 2144NativeMethods.LVGROUP nativeItem = new NativeMethods.LVGROUP 2146cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP)), 2194internal LVGROUP_V6_64(NativeMethods.LVGROUP_V6 item) 2226public static explicit operator NativeMethods.LVGROUP_V6(LVGROUP_V6_64 item) 2228NativeMethods.LVGROUP_V6 nativeItem = new NativeMethods.LVGROUP_V6 2230cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)), 2275internal TBBUTTON_32(NativeMethods.TBBUTTON item) 2288public static explicit operator NativeMethods.TBBUTTON(TBBUTTON_32 item) 2290NativeMethods.TBBUTTON nativeItem = new NativeMethods.TBBUTTON 2320internal TBBUTTON_64(NativeMethods.TBBUTTON item) 2334public static explicit operator NativeMethods.TBBUTTON(TBBUTTON_64 item) 2336NativeMethods.TBBUTTON nativeItem = new NativeMethods.TBBUTTON 2368internal TVITEM_32(NativeMethods.TVITEM item) 2388public static explicit operator NativeMethods.TVITEM(TVITEM_32 item) 2390NativeMethods.TVITEM nativeItem = new NativeMethods.TVITEM 2424internal TVITEM_64(NativeMethods.TVITEM item) 2440public static explicit operator NativeMethods.TVITEM(TVITEM_64 item) 2442NativeMethods.TVITEM nativeItem = new NativeMethods.TVITEM 2463internal NativeMethods.Win32Point pt; 2476public static explicit operator NativeMethods.TVHITTESTINFO(TVHITTESTINFO_32 hitTestInfo) 2478NativeMethods.TVHITTESTINFO nativeHitTestInfo = new NativeMethods.TVHITTESTINFO 2492internal NativeMethods.Win32Point pt; 2505public static explicit operator NativeMethods.TVHITTESTINFO(TVHITTESTINFO_64 hitTestInfo64) 2507NativeMethods.TVHITTESTINFO nativeHitTestInfo = new NativeMethods.TVHITTESTINFO 2524internal NativeMethods.Win32Rect rect; 2530internal TOOLINFO_32(NativeMethods.TOOLINFO item) 2543public static explicit operator NativeMethods.TOOLINFO(TOOLINFO_32 item) 2545NativeMethods.TOOLINFO nativeItem = new NativeMethods.TOOLINFO 2547cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO)), 2568internal NativeMethods.Win32Rect rect; 2574internal TOOLINFO_64(NativeMethods.TOOLINFO item) 2587public static explicit operator NativeMethods.TOOLINFO(TOOLINFO_64 item) 2589NativeMethods.TOOLINFO nativeItem = new NativeMethods.TOOLINFO 2591cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO)),
MS\Internal\AutomationProxies\EventManager.cs (28)
48case NativeMethods.OBJID_WINDOW: 58case NativeMethods.OBJID_CLIENT: 68case NativeMethods.OBJID_VSCROLL: 69case NativeMethods.OBJID_HSCROLL: 79case NativeMethods.OBJID_CARET: 89case NativeMethods.OBJID_SYSMENU: 90case NativeMethods.OBJID_MENU: 144if (eventId == NativeMethods.EventObjectStateChange) 155if (eventId == NativeMethods.EventObjectReorder) 163if (eventId == NativeMethods.EventObjectLocationChange) 174if (eventId == NativeMethods.EventObjectLocationChange) 315if (eventId == NativeMethods.EventObjectInvoke || 316eventId == NativeMethods.EventObjectStateChange || 317eventId == NativeMethods.EventObjectSelection && el is ListViewItem) 329if (eventId == NativeMethods.EventObjectStateChange) 341if (eventId == NativeMethods.EventSystemCaptureEnd ) 352if (eventId == NativeMethods.EventObjectInvoke) 364if (eventId == NativeMethods.EventObjectSelection || 365eventId == NativeMethods.EventObjectStateChange) 377if (eventId == NativeMethods.EventObjectSelectionAdd) 389if (eventId == NativeMethods.EventObjectSelectionRemove) 397if (eventId == NativeMethods.EventObjectCreate) 401else if (eventId == NativeMethods.EventObjectDestroy) 405else if ( eventId == NativeMethods.EventObjectReorder ) 451if (Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZE)) 455else if (Misc.IsBitSet(style, NativeMethods.WS_MINIMIZE)) 471if (eventId == NativeMethods.EventObjectLocationChange) 496else if (eventId == NativeMethods.EventObjectTextSelectionChanged)
MS\Internal\AutomationProxies\Input.cs (19)
78int vscreenWidth = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXVIRTUALSCREEN); 79int vscreenHeight = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYVIRTUALSCREEN); 80int vscreenLeft = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_XVIRTUALSCREEN); 81int vscreenTop = UnsafeNativeMethods.GetSystemMetrics( NativeMethods.SM_YVIRTUALSCREEN ); 106intflags |= NativeMethods.MOUSEEVENTF_VIRTUALDESK; 109NativeMethods.INPUT mi = new NativeMethods.INPUT 111type = NativeMethods.INPUT_MOUSE 126NativeMethods.INPUT ki = new NativeMethods.INPUT 128type = NativeMethods.INPUT_KEYBOARD 134dwFlags |= NativeMethods.KEYEVENTF_SCANCODE; 136dwFlags |= NativeMethods.KEYEVENTF_KEYUP; 140ki.union.keyboardInput.dwFlags |= NativeMethods.KEYEVENTF_EXTENDEDKEY; 154NativeMethods.INPUT ki = new NativeMethods.INPUT 156type = NativeMethods.INPUT_KEYBOARD 160ki.union.keyboardInput.dwFlags = press ? 0 : NativeMethods.KEYEVENTF_KEYUP; 163ki.union.keyboardInput.dwFlags |= NativeMethods.KEYEVENTF_EXTENDEDKEY;
MS\Internal\AutomationProxies\Misc.cs (131)
150internal static IntPtr DispatchMessage(ref NativeMethods.MSG msg) 160internal static unsafe bool EnumChildWindows(IntPtr hwnd, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam) 188StringBuilder sb = new StringBuilder(NativeMethods.MAX_PATH + 1); 190int result = UnsafeNativeMethods.GetClassName(hwnd, sb, NativeMethods.MAX_PATH); 227internal static bool GetClientRectInScreenCoordinates(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 229rc = NativeMethods.Win32Rect.Empty; 236NativeMethods.Win32Point leftTop = new NativeMethods.Win32Point(rc.left, rc.top); 242NativeMethods.Win32Point rightBottom = new NativeMethods.Win32Point(rc.right, rc.bottom); 248rc = new NativeMethods.Win32Rect(leftTop.x, leftTop.y, rightBottom.x, rightBottom.y); 252internal static bool GetClientRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 269internal static bool GetComboBoxInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbi) 282internal static bool GetCursorPos(ref NativeMethods.Win32Point pt) 313NativeMethods.GUITHREADINFO gui; 325NativeMethods.TOOLINFO tool = new NativeMethods.TOOLINFO(); 326tool.Init(Marshal.SizeOf(typeof(NativeMethods.TOOLINFO))); 386while ((peer = NativeMethodsSetLastError.GetWindow(peer, NativeMethods.GW_HWNDPREV)) != IntPtr.Zero) 391int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero); 392if ((code & NativeMethods.DLGC_STATIC) == NativeMethods.DLGC_STATIC) 407int style = UnsafeNativeMethods.GetWindowLong(peer, NativeMethods.GWL_STYLE, out error); 408if ((style & NativeMethods.WS_VISIBLE) != 0) 414if ((style & (NativeMethods.WS_GROUP | NativeMethods.WS_TABSTOP)) != 0) 422internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint item, ref NativeMethods.MENUBARINFO mbi) 448internal static bool GetMenuItemInfo(IntPtr hmenu, int item, bool byPosition, ref NativeMethods.MENUITEMINFO menuItemInfo) 461internal static bool GetMenuItemRect(IntPtr hwnd, IntPtr hmenu, int item, out NativeMethods.Win32Rect rc) 474internal static bool GetMessage(ref NativeMethods.MSG msg, IntPtr hwnd, int msgFilterMin, int msgFilterMax) 488internal static int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf) 503IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 514internal static bool GetScrollBarInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollBarInfo sbi) 527internal static bool GetScrollInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollInfo si) 547internal static int GetTextExtentPoint32(IntPtr hdc, string text, int length, out NativeMethods.SIZE size) 629int exstyle = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_EXSTYLE, out lastWin32Error); 643int id = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_ID, out lastWin32Error); 659int result = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_HWNDPARENT, out lastWin32Error); 669internal static bool GetWindowRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 685int style = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_STYLE, out lastWin32Error); 729NativeMethods.GUITHREADINFO gui; 730return (ProxyGetGUIThreadInfo(0, out gui) && (IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE))); 751hwnd = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 762return IsBitSet(exStyle, NativeMethods.WS_EX_LAYOUTRTL) || IsBitSet(exStyle, NativeMethods.WS_EX_RTLREADING); 767return IsBitSet(GetWindowExStyle(hwnd), NativeMethods.WS_EX_LAYOUTRTL); 772return IsBitSet(GetWindowExStyle(hwnd), NativeMethods.WS_EX_RTLREADING); 775internal static bool IntersectRect(ref NativeMethods.Win32Rect rcDest, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2) 810internal static bool IsItemVisible(IntPtr hwnd, ref NativeMethods.Win32Rect itemRect) 812NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect(0, 0, 0, 0); 816NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 823internal static bool IsItemVisible(ref NativeMethods.Win32Rect parentRect, ref NativeMethods.Win32Rect itemRect) 825NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 832internal static bool IsItemVisible(ref NativeMethods.Win32Rect parentRect, ref Rect itemRect) 834NativeMethods.Win32Rect itemRc = new NativeMethods.Win32Rect(itemRect); 835NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 842internal static bool IsItemVisible(ref Rect parentRect, ref NativeMethods.Win32Rect itemRect) 844NativeMethods.Win32Rect parentRc = new NativeMethods.Win32Rect(parentRect); 845NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 854NativeMethods.Win32Rect itemRc = new NativeMethods.Win32Rect(itemRect); 855NativeMethods.Win32Rect parentRc = new NativeMethods.Win32Rect(parentRect); 856NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 871hwnd = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 890internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Rect rect, int cPoints) 915internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Point pt, int cPoints) 951NativeMethods.Win32Point ptPrevious = new NativeMethods.Win32Point(); 953bool mouseSwapped = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_SWAPBUTTON) != 0; 1004if (terminationEvent == NativeMethods.WAIT_FAILED) 1062int index = ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 1075internal static bool ProxyGetGUIThreadInfo(uint idThread, out NativeMethods.GUITHREADINFO gui) 1077gui = new NativeMethods.GUITHREADINFO(); 1168ProxySendMessage(hwnd, NativeMethods.WM_GETTEXT, (IntPtr)str.Capacity, str); 1196IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, NativeMethods.WM_GETTITLEBARINFOEX, IntPtr.Zero, ref ti, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1227NativeMethods.MENUBARINFO mbi; 1228bool retValue = WindowsMenu.GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi); 1327internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, ref NativeMethods.Win32Rect lParam) 1358internal static bool PtInRect(ref NativeMethods.Win32Rect rc, int x, int y) 1371NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(); 1409System.Text.StringBuilder className = new System.Text.StringBuilder(NativeMethods.MAX_PATH + 1); 1411uint result = UnsafeNativeMethods.RealGetWindowClass(hwnd, className, NativeMethods.MAX_PATH); 1462internal static int SendInput(int inputs, ref NativeMethods.INPUT ki, int size) 1567int result = MsgWaitForMultipleObjects(null, false, 2000, NativeMethods.QS_ALLINPUT); 1568if (result == NativeMethods.WAIT_FAILED || result == NativeMethods.WAIT_TIMEOUT) 1571NativeMethods.MSG msg = new NativeMethods.MSG(); 1584if (msg.message == NativeMethods.WM_HOTKEY && (short)msg.wParam == atom) 1616internal static IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags) 1716internal static bool UnionRect(out NativeMethods.Win32Rect rcDst, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2) 1855int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 1902NativeMethods.TOOLINFO tool = new NativeMethods.TOOLINFO(); 1903tool.Init(Marshal.SizeOf(typeof(NativeMethods.TOOLINFO))); 1910tool.uFlags = NativeMethods.TTF_IDISHWND; 1935NativeMethods.SYSTEM_INFO sysInfo; 1979if ((tiDL.rgstate[NativeMethods.INDEX_TITLEBAR_SELF] & (NativeMethods.STATE_SYSTEM_INVISIBLE | NativeMethods.STATE_SYSTEM_OFFSCREEN)) != 0) 1989int buttonWidth = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXSIZE) - 1; 1990int buttonHeight = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSIZE) - 1; 1992Rect[] rects = new Rect[NativeMethods.CCHILDREN_TITLEBAR + 1]; 2006for (int i = NativeMethods.INDEX_TITLEBAR_MAC; i > NativeMethods.INDEX_TITLEBAR_SELF; i--) 2008if ((tiDL.rgstate[i] & NativeMethods.STATE_SYSTEM_INVISIBLE) == 0) 2022for (int i = NativeMethods.INDEX_TITLEBAR_MAC; i > NativeMethods.INDEX_TITLEBAR_SELF; i--) 2024if ((tiDL.rgstate[i] & NativeMethods.STATE_SYSTEM_INVISIBLE) == 0) 2050if ((ti.rgstate[NativeMethods.INDEX_TITLEBAR_SELF] & (NativeMethods.STATE_SYSTEM_INVISIBLE | NativeMethods.STATE_SYSTEM_OFFSCREEN)) != 0) 2055Rect[] rects = new Rect[NativeMethods.CCHILDREN_TITLEBAR + 1]; 2056for (int i = 0; i <= NativeMethods.CCHILDREN_TITLEBAR; i++) 2059if ((ti.rgstate[i] & NativeMethods.STATE_SYSTEM_INVISIBLE) != 0) 2083private const int _sendMessageFlags = NativeMethods.SMTO_BLOCK;
MS\Internal\AutomationProxies\MSAAEventDispatcher.cs (22)
27: base(NativeMethods.EVENT_OBJECT_CREATE, NativeMethods.EVENT_OBJECT_ACCELERATORCHANGE) 168if (idObject <= NativeMethods.OBJID_WINDOW 169&& idObject != NativeMethods.OBJID_CLIENT) 184case NativeMethods.EVENT_OBJECT_CREATE: 185case NativeMethods.EVENT_OBJECT_SHOW: 187case NativeMethods.EVENT_OBJECT_HIDE: 188case NativeMethods.EVENT_OBJECT_REORDER: 192case NativeMethods.EVENT_OBJECT_PARENTCHANGE: 197case NativeMethods.EVENT_OBJECT_LOCATIONCHANGE: 202case NativeMethods.EVENT_OBJECT_NAMECHANGE: 206case NativeMethods.EVENT_OBJECT_SELECTION: 210case NativeMethods.EVENT_OBJECT_SELECTIONADD: 214case NativeMethods.EVENT_OBJECT_SELECTIONREMOVE: 226case NativeMethods.EVENT_OBJECT_VALUECHANGE: 230case NativeMethods.EVENT_OBJECT_HELPCHANGE: 267return idObject == NativeMethods.OBJID_CLIENT && idChild == NativeMethods.CHILD_SELF; 327case NativeMethods.EVENT_OBJECT_CREATE: 328case NativeMethods.EVENT_OBJECT_SHOW: 349case NativeMethods.EVENT_OBJECT_HIDE: 361Debug.Assert(eventId == NativeMethods.EVENT_OBJECT_REORDER);
MS\Internal\AutomationProxies\MSAANativeProvider.cs (6)
157int index = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 188if (idObject == NativeMethods.OBJID_CLIENT && idChild == NativeMethods.CHILD_SELF) 1080_knownRoot = (MsaaNativeProvider)Create(_hwnd, NativeMethods.CHILD_SELF, NativeMethods.OBJID_CLIENT); 1172if (childAcc.ChildId != NativeMethods.CHILD_SELF)
MS\Internal\AutomationProxies\MSAAWinEventWrap.cs (3)
170_winEventProc = new NativeMethods.WinEventProcDef(WinEventReentrancyFilter); 175_fFlags = NativeMethods.WINEVENT_OUTOFCONTEXT; 222private NativeMethods.WinEventProcDef _winEventProc; // the callback handed to USER for WinEvents
MS\Internal\AutomationProxies\NonClientArea.cs (57)
83return new int[] { NativeMethods.EventObjectStateChange }; 110NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect(); 111NativeMethods.Win32Rect windowRect = new NativeMethods.Win32Rect(); 185case NativeMethods.OBJID_WINDOW: 189case NativeMethods.OBJID_HSCROLL : 190case NativeMethods.OBJID_VSCROLL : 194case NativeMethods.OBJID_CLIENT: 198case NativeMethods.OBJID_SYSMENU: 199case NativeMethods.OBJID_MENU: 208int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 212case NativeMethods.HTHSCROLL: 218case NativeMethods.HTVSCROLL: 224case NativeMethods.HTCAPTION : 225case NativeMethods.HTMINBUTTON : 226case NativeMethods.HTMAXBUTTON : 227case NativeMethods.HTHELP : 228case NativeMethods.HTCLOSE : 229case NativeMethods.HTSYSMENU : 233case NativeMethods.HTGROWBOX: 236case NativeMethods.HTBOTTOMRIGHT: 239case NativeMethods.HTBOTTOMLEFT: 242case NativeMethods.HTMENU: 245case NativeMethods.HTLEFT: 246case NativeMethods.HTRIGHT: 247case NativeMethods.HTTOP: 248case NativeMethods.HTTOPLEFT: 249case NativeMethods.HTTOPRIGHT: 250case NativeMethods.HTBOTTOM: 251case NativeMethods.HTBORDER: 465return new WindowsListViewScrollBar (_hwnd, this, (int) item, NativeMethods.SB_HORZ); 467return new WindowsScrollBar (_hwnd, this, (int) item, NativeMethods.SB_HORZ); 477return new WindowsListViewScrollBar (_hwnd, this, (int) item, NativeMethods.SB_VERT); 479return new WindowsScrollBar (_hwnd, this, (int) item, NativeMethods.SB_VERT); 501if (Misc.IsBitSet(style, NativeMethods.WS_VSCROLL) && Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) 523if (!Misc.IsBitSet(style, NativeMethods.WS_CHILD)) 660if ((idProp == ScrollPattern.VerticalScrollPercentProperty && idObject != NativeMethods.OBJID_VSCROLL) || 661(idProp == ScrollPattern.HorizontalScrollPercentProperty && idObject != NativeMethods.OBJID_HSCROLL)) 672NonClientItem item = idObject == NativeMethods.OBJID_HSCROLL ? NonClientItem.HScrollBar : NonClientItem.VScrollBar; 673int sbFlag = idObject == NativeMethods.OBJID_HSCROLL ? NativeMethods.SB_HORZ : NativeMethods.SB_VERT; 684if (eventId == NativeMethods.EventObjectStateChange && idProp == ValuePattern.IsReadOnlyProperty) 697if (idObject == NativeMethods.OBJID_HSCROLL || idObject == NativeMethods.OBJID_VSCROLL) 699idObject = NativeMethods.OBJID_WINDOW; 706if (idProp == ValuePattern.ValueProperty && eventId == NativeMethods.EVENT_OBJECT_VALUECHANGE) 708NonClientItem item = idObject == NativeMethods.OBJID_HSCROLL ? NonClientItem.HScrollBar : NonClientItem.VScrollBar; 709WindowsScrollBar scrollBar = new WindowsScrollBar(hwnd, el, (int)item, idObject == NativeMethods.OBJID_HSCROLL ? NativeMethods.SB_HORZ : NativeMethods.SB_VERT); 710scrollBar.DispatchEvents(0, ValuePattern.ValueProperty, NativeMethods.OBJID_CLIENT, 0); 726if (eventId == NativeMethods.EventObjectNameChange) 729if (Misc.IsBitSet(style, NativeMethods.WS_CHILD))
MS\Internal\AutomationProxies\ProxyHwnd.cs (34)
163name = GetAccessibleName(NativeMethods.CHILD_SELF); 200name = GetAccessibleName(NativeMethods.CHILD_SELF); 238NativeMethods.Win32Rect parentRect = NativeMethods.Win32Rect.Empty; 352return new int [] { NativeMethods.EventObjectFocus }; 356return new int[] { NativeMethods.EventObjectNameChange }; 360return new int[] { NativeMethods.EventObjectValueChange }; 364return new int[] { NativeMethods.EventObjectLocationChange }; 368return new int [] { NativeMethods.EventObjectStateChange, 369NativeMethods.EventObjectShow, 370NativeMethods.EventObjectHide}; 379return new int [] { NativeMethods.EventObjectValueChange }; 383return new int [] { NativeMethods.EventObjectSelectionAdd, 384NativeMethods.EventObjectSelectionRemove, 385NativeMethods.EventObjectSelection}; 389return new int[] { NativeMethods.EventSystemCaptureEnd, 390NativeMethods.EventObjectStateChange }; 408new(NativeMethods.EventObjectSelection, idEvent), 409new(NativeMethods.EventObjectStateChange, idEvent) 418new(NativeMethods.EventObjectSelectionAdd, idEvent), 419new(NativeMethods.EventObjectSelection, idEvent) 424idWinEvent = NativeMethods.EventObjectSelectionRemove; 428idWinEvent = NativeMethods.EventObjectSelectionWithin; 433new(NativeMethods.EventSystemCaptureEnd, idEvent), // For SysHeaders 434new(NativeMethods.EventObjectStateChange, idEvent), 435new(NativeMethods.EventObjectValueChange, idEvent), // For WindowsScrollBarBits 436new(NativeMethods.EventObjectInvoke, idEvent) 442new(NativeMethods.EventObjectCreate, idEvent), 443new(NativeMethods.EventObjectDestroy, idEvent), 444new(NativeMethods.EventObjectReorder, idEvent) 450new(NativeMethods.EventObjectLocationChange, idEvent), 451new(NativeMethods.EventObjectTextSelectionChanged, idEvent) 466NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect ();
MS\Internal\AutomationProxies\ProxySimple.cs (14)
96NativeMethods.Win32Rect controlRectangle = NativeMethods.Win32Rect.Empty; 221NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 282if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_TABSTOP)) 328NativeMethods.Win32Rect itemWin32Rect = new NativeMethods.Win32Rect(itemRect); 568internal bool GetClickablePoint(out NativeMethods.Win32Point pt, bool fClipClientRect) 570NativeMethods.Win32Rect rcItem = new NativeMethods.Win32Rect(BoundingRectangle); 576NativeMethods.Win32Rect rcOutside = new NativeMethods.Win32Rect(); 637_IAccessible = Accessible.AccessibleObjectFromWindow(_hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK ? acc.IAccessible : null;
MS\Internal\AutomationProxies\QueueProcessor.cs (8)
95NativeMethods.MSG msg = new NativeMethods.MSG(); 102while (UnsafeNativeMethods.PeekMessage (ref msg, IntPtr.Zero, 0, 0, NativeMethods.PM_REMOVE)) 104if (msg.message == NativeMethods.WM_QUIT) 124int result = Misc.MsgWaitForMultipleObjects(handle, false, NativeMethods.INFINITE, NativeMethods.QS_ALLINPUT); 125if (result == NativeMethods.WAIT_FAILED || result == NativeMethods.WAIT_TIMEOUT)
MS\Internal\AutomationProxies\SafeProcessHandle.cs (4)
32SetHandle(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)
30return !IsInvalid ? CloseThemeData(handle) == (IntPtr)NativeMethods.S_OK : true;
MS\Internal\AutomationProxies\WindowsAltTab.cs (11)
78if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 125NativeMethods.Win32Point pt = new NativeMethods.Win32Point(x, y); 129NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect(); 372private NativeMethods.Win32Rect GetBoundingRect() 379NativeMethods.Win32Point ptStart = this._altTab._altTabInfo.ptStart; 383NativeMethods.Win32Rect itemRect = 384new NativeMethods.Win32Rect(left, top, left + cxItem, top + cyItem); 389itemRect = NativeMethods.Win32Rect.Empty;
MS\Internal\AutomationProxies\WindowsButton.cs (53)
104style = Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK; 108case NativeMethods.BS_PUSHBUTTON: 109case NativeMethods.BS_DEFPUSHBUTTON: 110case NativeMethods.BS_OWNERDRAW: 111case NativeMethods.BS_SPLITBUTTON: // explore back and forward buttons 115case NativeMethods.BS_CHECKBOX: 116case NativeMethods.BS_AUTOCHECKBOX: 117case NativeMethods.BS_3STATE: 118case NativeMethods.BS_AUTO3STATE: 122case NativeMethods.BS_RADIOBUTTON: 123case NativeMethods.BS_AUTORADIOBUTTON: 127case NativeMethods.BS_GROUPBOX: 148if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 171eventId = NativeMethods.EventObjectSelectionRemove; 190int state = Misc.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero); 191if (Misc.IsBitSet(state, NativeMethods.BST_PUSHED) 192&& eventId == NativeMethods.EventObjectStateChange) 197else if(eventId == NativeMethods.EventObjectInvoke) 290return new WinEventTracker.EvtIdProperty[1] { new(NativeMethods.EventObjectInvoke, idEvent) }; 318Accessible.AccessibleObjectFromWindow(hwndRadioButton, NativeMethods.OBJID_CLIENT, ref accRadioButton) != NativeMethods.S_OK || 328new WindowsButton(hwndRadioButton, null, ButtonType.RadioButton, Misc.GetWindowStyle(hwndRadioButton) & NativeMethods.BS_TYPEMASK, accRadioButton) 393if (Accessible.AccessibleObjectFromWindow(hwndParent, NativeMethods.OBJID_CLIENT, ref accParent) != NativeMethods.S_OK || accParent == null) 400return new WindowsButton(hwndParent, null, ButtonType.GroupBox, Misc.GetWindowStyle(hwndParent) & NativeMethods.BS_TYPEMASK, accParent); 477case NativeMethods.BS_PUSHBUTTON: 478case NativeMethods.BS_DEFPUSHBUTTON: 479case NativeMethods.BS_PUSHBOX: 480case NativeMethods.BS_OWNERDRAW: 481case NativeMethods.BS_USERBUTTON: 482case NativeMethods.BS_CHECKBOX: 483case NativeMethods.BS_AUTOCHECKBOX: 484case NativeMethods.BS_RADIOBUTTON: 485case NativeMethods.BS_AUTORADIOBUTTON: 486case NativeMethods.BS_3STATE: 487case NativeMethods.BS_AUTO3STATE: 488case NativeMethods.BS_SPLITBUTTON: // explore back and forward buttons 494Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 508Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 515Misc.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true); 601if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_CHILD)) 607hwndParent = Misc.GetWindow(hwndRoot, NativeMethods.GW_OWNER); 640int state = Misc.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero); 641if (Misc.IsBitSet(state, NativeMethods.BST_CHECKED)) 645else if (Misc.IsBitSet(state, NativeMethods.BST_INDETERMINATE)) 665Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound); 679if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK && 703Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton); 719if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK &&
MS\Internal\AutomationProxies\WindowsComboBox.cs (61)
117NativeMethods.Win32Rect rcCombo = new NativeMethods.Win32Rect (base.BoundingRectangle); 123NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 127NativeMethods.Win32Rect rcList = NativeMethods.Win32Rect.Empty; 249NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 265NativeMethods.Win32Rect rcList = NativeMethods.Win32Rect.Empty; 293NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 328NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 370NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 386IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.CBN_EDITUPDATE)); 388Misc.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam, _hwnd); 480return (NativeMethods.CBS_SIMPLE == _comboType); 486return (NativeMethods.CBS_DROPDOWNLIST == _comboType); 503IntPtr hwndEx = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 514internal static bool GetComboInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbInfo) 531if (cbInfo.hwndItem == IntPtr.Zero && IsComboEx (NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT))) 544cbInfo.rcItem = NativeMethods.Win32Rect.Empty; 555return Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0; 562NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 570Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 575Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 631return (Misc.GetWindowStyle(hwnd) & NativeMethods.CBS_COMBOTYPEMASK); 637NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 639if (GetComboInfo(_hwnd, ref cbInfo) && cbInfo.stateButton != NativeMethods.STATE_SYSTEM_INVISIBLE) 650NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 691index = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 698int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 712return XSendMessage.GetItemText(hwnd, NativeMethods.WM_USER + NativeMethods.CB_GETLBTEXT, index, len); 716return Misc.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len); 749case NativeMethods.OBJID_CLIENT : 751if (eventId == NativeMethods.EventObjectStateChange && idChild == 2) 758NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 760if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && Misc.IsBitSet(NativeMethods.STATE_SYSTEM_PRESSED, cbInfo.stateButton)) 785IntPtr hwndCombo = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 821editPortionEvents[c]._evtId = (p == ValuePattern.ValueProperty) ? NativeMethods.EventObjectValueChange : NativeMethods.EventObjectStateChange; 907NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
MS\Internal\AutomationProxies\WindowsContainer.cs (5)
127return Misc.IsBitSet(style, NativeMethods.WS_CAPTION) || 128Misc.IsBitSet(style, NativeMethods.WS_POPUP); 136return Misc.IsBitSet(style, NativeMethods.DS_CONTROL) && 137Misc.IsBitSet(style, NativeMethods.WS_CHILD) && 138Misc.IsBitSet(exstyle, NativeMethods.WS_EX_CONTROLPARENT);
MS\Internal\AutomationProxies\WindowsEditBox.cs (68)
89if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 104IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 269if (Misc.IsBitSet(styles, NativeMethods.ES_READONLY)) 275if (Misc.IsBitSet(styles, NativeMethods.ES_NUMBER)) 289int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 297result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 350NativeMethods.Win32Point clientLocation = (NativeMethods.Win32Point)screenLocation; 359NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect(); 434internal void CharFromPos(NativeMethods.Win32Point point, out ushort indexLowWord, out ushort lineLowWord) 442IntPtr lParam = NativeMethods.Util.MAKELPARAM(point.x, point.y); 443int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam); 444indexLowWord = unchecked((ushort)(NativeMethods.Util.LOWORD(result))); 445lineLowWord = unchecked((ushort)(NativeMethods.Util.HIWORD(result))); 449internal int CharFromPosEx(NativeMethods.Win32Point point) 495if (Misc.IsBitSet(style, NativeMethods.ES_PASSWORD)) 499else if (Misc.IsBitSet(style, NativeMethods.ES_MULTILINE)) 503else if (Misc.IsBitSet(style, NativeMethods.ES_AUTOHSCROLL)) 515return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 522return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 528IntPtr result = Misc.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero); 536result = UnsafeNativeMethods.GetStockObject(NativeMethods.SYSTEM_FONT); 545return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero); 548internal NativeMethods.LOGFONT GetLogfont() 552NativeMethods.LOGFONT logfont = new NativeMethods.LOGFONT(); 553int cb = Marshal.SizeOf(typeof(NativeMethods.LOGFONT)); 564NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect(); 565Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect); 573Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETSEL, out start, out end); 585return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero); 593NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect(); 597NativeMethods.SIZE size; 601NativeMethods.Win32Point ptStart = new NativeMethods.Win32Point((int)(rect.left + size.cx / 4), (int)(rect.top + size.cy / 4)); 602NativeMethods.Win32Point ptEnd = new NativeMethods.Win32Point((int)(rect.right - size.cx / 8), (int)(rect.bottom - size.cy / 4)); 671return (!SafeNativeMethods.IsWindowEnabled(WindowHandle) || Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 680return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero); 686int index = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero); 693return 0 != Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical); 701if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_VSCROLL)) 704NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 706cbSize = System.Runtime.InteropServices.Marshal.SizeOf(typeof(NativeMethods.ScrollInfo)), 707fMask = NativeMethods.SIF_ALL 709bool ok = Misc.GetScrollInfo(WindowHandle, NativeMethods.SB_VERT, ref si); 718NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect(); 722NativeMethods.SIZE size; 742int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero); 747int x = (int)((short)NativeMethods.Util.LOWORD(result)); 748int y = (int)((short)NativeMethods.Util.HIWORD(result)); 781NativeMethods.SIZE size; 803Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end); 844private int GetTextExtentPoint32(string text, out NativeMethods.SIZE size) 890IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 898NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 910IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 926IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 942IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 971int i = NativeMethods.Util.MAKELONG((int)lowWord, (int)hiWord);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (13)
238NativeMethods.Win32Point w32point; 724if (Misc.IsBitSet(style, NativeMethods.ES_CENTER)) 728else if (Misc.IsBitSet(style, NativeMethods.ES_RIGHT)) 741return Misc.IsBitSet(style, NativeMethods.ES_UPPERCASE) ? CapStyle.AllCap : CapStyle.None; 755return SafeNativeMethods.GetSysColor(NativeMethods.COLOR_WINDOW); 759private static object GetFontName(NativeMethods.LOGFONT logfont) 765private static object GetFontSize(NativeMethods.LOGFONT logfont) 774int lpy = UnsafeNativeMethods.GetDeviceCaps(hdc, NativeMethods.LOGPIXELSY); 780private static object GetFontWeight(NativeMethods.LOGFONT logfont) 790return SafeNativeMethods.GetSysColor(NativeMethods.COLOR_WINDOWTEXT); 794private static object GetItalic(NativeMethods.LOGFONT logfont) 800private static object GetStrikethroughStyle(NativeMethods.LOGFONT logfont) 806private static object GetUnderlineStyle(NativeMethods.LOGFONT logfont)
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (9)
30if (Accessible.AccessibleObjectFromWindow(hwnd, idObject, ref acc) != NativeMethods.S_OK || acc == null) 50return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 58return idChild == NativeMethods.CHILD_SELF ? sb : sb.CreateStatusBarPane(idChild); 76if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) != NativeMethods.S_OK || acc == null) 84return new WindowsButton(hwnd, null, WindowsButton.ButtonType.CheckBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 87return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 90return new WindowsButton(hwnd, null, WindowsButton.ButtonType.PushButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 93return new WindowsButton(hwnd, null, WindowsButton.ButtonType.RadioButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (5)
50if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 72return new WinEventTracker.EvtIdProperty[1] { new(NativeMethods.EventSystemCaptureEnd, idEvent) }; 120NativeMethods.Win32Point pt = new NativeMethods.Win32Point();
MS\Internal\AutomationProxies\WindowsGrip.cs (13)
49NativeMethods.Win32Rect client = new NativeMethods.Win32Rect(); 52NativeMethods.SIZE sizeGrip = GetGripSize(_hwnd, false); 82NativeMethods.Win32Rect client = new NativeMethods.Win32Rect(); 95NativeMethods.SIZE sizeGrip = GetGripSize(hwnd, onStatusBar); 107int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 109return hit == NativeMethods.HTBOTTOMLEFT; 115int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 117return hit == NativeMethods.HTBOTTOMRIGHT; 121internal static NativeMethods.SIZE GetGripSize(IntPtr hwnd, bool onStatusBar)
MS\Internal\AutomationProxies\WindowsHyperlink.cs (27)
61if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 128return new WinEventTracker.EvtIdProperty[1] { new(NativeMethods.EventSystemCaptureEnd, idEvent) }; 202HitTestInfo.item.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE; 204HitTestInfo.item.stateMask = NativeMethods.LIS_ENABLED; 211bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 234if (Misc.IsBitSet(_linkItem.state, NativeMethods.LIS_FOCUSED)) 267_linkItem.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE; 270_linkItem.stateMask = NativeMethods.LIS_ENABLED; 276return XSendMessage.XSend(_hwnd, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM)); 386mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE, 388stateMask = NativeMethods.LIS_FOCUSED, 389state = NativeMethods.LIS_FOCUSED 395return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 435NativeMethods.Win32Rect BoundingRect = NativeMethods.Win32Rect.Empty; 483HitTestInfo.item.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE; 485HitTestInfo.item.stateMask = NativeMethods.LIS_ENABLED; 492bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 504Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 505Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (8)
61if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 137Misc.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4)); 242IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 251hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 259IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 262hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 380Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
MS\Internal\AutomationProxies\WindowsListBox.cs (90)
72if (Misc.IsBitSet(style, NativeMethods.LBS_COMBOBOX)) 75NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 112case NativeMethods.OBJID_WINDOW: 116case NativeMethods.OBJID_CLIENT: 120case NativeMethods.OBJID_VSCROLL : 121case NativeMethods.OBJID_HSCROLL : 285NativeMethods.Win32Rect listboxrect = new NativeMethods.Win32Rect (); 290int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top)); 291if (NativeMethods.Util.HIWORD(ret) == 0) 293int index = NativeMethods.Util.LOWORD(ret); 305int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero); 307if (index != NativeMethods.LB_ERR) 380return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0; 403return new int[] { NativeMethods.EventObjectSelection }; 430return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero); 450if ((eventId == NativeMethods.EventObjectSelection || eventId == NativeMethods.EventObjectSelectionAdd) && (idProp as AutomationProperty) == SelectionPattern.IsSelectionRequiredProperty) 453ReadOnlySpan<WinEventTracker.EvtIdProperty> aEvtIdProperties = [new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectSelection, SelectionPattern.IsSelectionRequiredProperty)]; 458else if (eventId == NativeMethods.EventObjectSelection || eventId == NativeMethods.EventObjectSelectionRemove || eventId == NativeMethods.EventObjectSelectionAdd) 464if (eventId == NativeMethods.EventObjectSelection && isMultipleSelection && wlb.HasOtherSelections(idChild - 1)) 466eventId = NativeMethods.EventObjectSelectionAdd; 471if ((eventId == NativeMethods.EventObjectSelectionRemove || eventId == NativeMethods.EventObjectSelectionAdd) && 477eventId = NativeMethods.EventObjectSelection; 481if (selection != NativeMethods.LB_ERR) 496(eventId == NativeMethods.EventObjectDestroy || eventId == NativeMethods.EventObjectCreate)) 514if ((eventId == NativeMethods.EventObjectShow || eventId == NativeMethods.EventObjectHide) && 517if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LBS_COMBOBOX)) 520NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 550return NativeMethods.LB_ERR; 555int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero); 556return result != NativeMethods.LB_ERR ? result : 0; 596return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 604return (0 != (WindowStyle & (NativeMethods.LBS_MULTIPLESEL | NativeMethods.LBS_EXTENDEDSEL))); 611return ((WindowStyle & NativeMethods.LBS_OWNERDRAWFIXED) == NativeMethods.LBS_OWNERDRAWFIXED) && 612((WindowStyle & NativeMethods.LBS_WANTKEYBOARDINPUT) == NativeMethods.LBS_WANTKEYBOARDINPUT); 719int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 730return XSendMessage.GetItemText(_hwnd, NativeMethods.WM_USER + NativeMethods.LB_GETTEXT, _item, iTextLen); 734string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen); 932Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 978return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 987SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item)); 991SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 994return NativeMethods.LB_ERR != SendMessageResult; 1006return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR; 1031return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item; 1035return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1049private NativeMethods.Win32Rect BoundingRect() 1051NativeMethods.Win32Rect itemRect = new NativeMethods.Win32Rect(); 1052Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect); 1053return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty; 1075if (((int)accChild.get_accState(NativeMethods.CHILD_SELF) & NativeMethods.STATE_SYSTEM_CHECKED) == NativeMethods.STATE_SYSTEM_CHECKED) 1079else if (((int)accChild.get_accState(NativeMethods.CHILD_SELF) & NativeMethods.STATE_SYSTEM_MIXED) == NativeMethods.STATE_SYSTEM_MIXED) 1097NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 1121Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item)); 1126Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1129success = (NativeMethods.LB_ERR != sendMessageResult); 1137if (Misc.IsBitSet(listBoxStyle, NativeMethods.LBS_NOTIFY)) 1142new IntPtr(NativeMethods.Util.MAKELONG( 1143idListBox, NativeMethods.LBN_SELCHANGE)); 1148hwndListBoxParent, NativeMethods.WM_COMMAND, wParam, _hwnd); 1156Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1157success = (NativeMethods.LB_ERR != sendMessageResult); 1161IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.LBN_SELCHANGE)); 1164Misc.ProxySendMessageInt(combo._hwnd, NativeMethods.WM_COMMAND, wParam, _hwnd); 1180return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (138)
60_groupEvents [0]._evtId = NativeMethods.EventObjectReorder; 61_groupEvents [1]._evtId = NativeMethods.EventObjectHide; 62_groupEvents [2]._evtId = NativeMethods.EventObjectDestroy; 114case NativeMethods.OBJID_CLIENT : 120case NativeMethods.OBJID_WINDOW : 123if ((eventId == NativeMethods.EventObjectReorder) && (idProp as AutomationEvent) == AutomationElement.StructureChangedEvent) 134case NativeMethods.OBJID_VSCROLL: 135case NativeMethods.OBJID_HSCROLL: 411NativeMethods.Win32Rect rc = manager.GetGroupRcByIndex (i); 422NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest(_hwnd, new NativeMethods.Win32Point(x, y)); 429else if (hitTest.flags == NativeMethods.LVHT_NOWHERE && IsDetailMode(_hwnd)) 436int xAdjustment = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXBORDER) + UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXFRAME); 447hitTest = WindowsListView.SubitemHitTest(_hwnd, new NativeMethods.Win32Point(x, y)); 471int index = GetItemNext(_hwnd, -1, NativeMethods.LVNI_FOCUSED); 498ReadOnlySpan<WinEventTracker.EvtIdProperty> aEvents = [new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectCreate, TablePattern.ColumnHeadersProperty)]; 507ReadOnlySpan<WinEventTracker.EvtIdProperty> aEvents = [new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectSelection, eventId)]; 527ReadOnlySpan<WinEventTracker.EvtIdProperty> aEvents = [new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectCreate, TablePattern.ColumnHeadersProperty)]; 536ReadOnlySpan<WinEventTracker.EvtIdProperty> aEvents = [new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectSelection, eventId)]; 562for (int itemPos = GetItemNext(_hwnd, -1, NativeMethods.LVNI_SELECTED); itemPos != -1; itemPos = GetItemNext(_hwnd, itemPos, NativeMethods.LVNI_SELECTED)) 623int cx = NativeMethods.Util.LOWORD (size) /*- 2 * UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXBORDER)*/; 624int cy = NativeMethods.Util.HIWORD (size) /*- 2 * UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CYBORDER)*/; 628bool fHz = SetScrollPercent (horizontalPercent, NativeMethods.SB_HORZ, cx, out dx); 629bool fVt = SetScrollPercent (verticalPercent, NativeMethods.SB_VERT, cy, out dy); 649SetScrollPercent(horizontalPercent, NativeMethods.SB_HORZ, cx, out dx); 650SetScrollPercent(verticalPercent, NativeMethods.SB_VERT, cy, out dy); 878return SetItemState(hwnd, item, NativeMethods.LVIS_FOCUSED, NativeMethods.LVIS_FOCUSED); 884int state = GetItemState(hwnd, item, NativeMethods.LVIS_FOCUSED); 886return (Misc.IsBitSet(state, NativeMethods.LVIS_FOCUSED)); 897if (view == NativeMethods.LV_VIEW_TILE) 902if (InReportView(hwnd) || (view == NativeMethods.LV_VIEW_DETAILS)) 929if (ListViewList(hwnd) || (NativeMethods.LV_VIEW_LIST == ListViewGetView(hwnd))) 1002int nextItem = GetItemNext(hwnd, curItem, NativeMethods.LVNI_TORIGHT); 1045NativeMethods.Win32Point pt = new NativeMethods.Win32Point (0, 0); 1057int next = GetItemNext(hwnd, current, NativeMethods.LVNI_BELOW); 1082return (ListViewIsGroupViewEnabled(hwnd) && NativeMethods.LV_VIEW_LIST != ListViewGetView(hwnd)); 1104case NativeMethods.EventObjectReorder : 1145case NativeMethods.EventObjectDestroy : 1156case NativeMethods.EventObjectHide : 1177return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_REPORT); 1207return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1217for (int index = GetItemNext(hwnd, -1, NativeMethods.LVNI_SELECTED); index != -1; index = GetItemNext(hwnd, index, NativeMethods.LVNI_SELECTED)) 1227return GetItemNext(hwnd, -1, NativeMethods.LVNI_SELECTED); 1235return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags)); 1240return ListViewGetView(hwnd) == NativeMethods.LV_VIEW_ICON; 1246return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero); 1252return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1)); 1258return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_SCROLL, dx, dy) != 0; 1262internal static unsafe bool GetItemRect (IntPtr hwnd, int item, int lvir, out NativeMethods.Win32Rect itemRectangle) 1264itemRectangle = NativeMethods.Win32Rect.Empty; 1269if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1281return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0; 1287return SetItemState(hwnd, -1, NativeMethods.LVIS_SELECTED, 0); 1293return SetItemState(hwnd, item, NativeMethods.LVIS_SELECTED, NativeMethods.LVIS_SELECTED); 1299return SetItemState(hwnd, item, NativeMethods.LVIS_SELECTED, 0); 1305return Misc.IsBitSet(GetItemState(hwnd, listItem, NativeMethods.LVIS_SELECTED), NativeMethods.LVIS_SELECTED); 1311return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_EDITLABELS); 1335int flags = NativeMethods.LVS_EX_ONECLICKACTIVATE 1336| NativeMethods.LVS_EX_TWOCLICKACTIVATE 1337| NativeMethods.LVS_EX_UNDERLINEHOT 1338| NativeMethods.LVS_EX_UNDERLINECOLD; 1345return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1351return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_ONECLICKACTIVATE); 1357return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_SINGLESEL); 1363return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_NOSCROLL); 1371return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0; 1377return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 1381internal static string GetItemText (IntPtr hwnd, NativeMethods.LVITEM item) 1390internal static NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, NativeMethods.Win32Point pt) 1397internal static NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, int item, NativeMethods.Win32Point pt) 1400NativeMethods.LVHITTESTINFO_INTERNAL hitTest = new NativeMethods.LVHITTESTINFO_INTERNAL 1419NativeMethods.LVHITTESTINFO_V6 hitTestNative = new NativeMethods.LVHITTESTINFO_V6(hitTest); 1420result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1428NativeMethods.LVHITTESTINFO hitTestNative = new NativeMethods.LVHITTESTINFO(hitTest); 1429result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1448return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1454return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_CHECKBOXES); 1460int state = GetItemState(hwnd, item, NativeMethods.LVIS_STATEIMAGEMASK); 1468return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_AUTOARRANGE); 1474return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_FULLROWSELECT); 1480return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_JUSTIFYCOLUMNS); 1485public static unsafe bool GetSubItemRect (IntPtr hwnd, int item, int subItem, int lvir, out NativeMethods.Win32Rect itemRectangle) 1487itemRectangle = NativeMethods.Win32Rect.Empty; 1493if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETSUBITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1504IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1543return CheckBoxes (_hwnd) ? new int [] { NativeMethods.EventObjectNameChange, NativeMethods.EventObjectStateChange } : new int [] { NativeMethods.EventObjectNameChange }; 1547return new int [] { NativeMethods.EventObjectReorder }; 1658throw new ArgumentOutOfRangeException(sbFlag == NativeMethods.SB_HORZ ? "horizontalPercent" : "verticalPercent", SR.ScrollBarOutOfRange); 1661int scrollBar = sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_VSCROLL; 1663NativeMethods.ScrollBarInfo scrollBarInfo = new NativeMethods.ScrollBarInfo(); 1666(scrollBarInfo.scrollBarInfo & NativeMethods.STATE_SYSTEM_INVISIBLE) != 0 || 1667(scrollBarInfo.scrollBarInfo & NativeMethods.STATE_SYSTEM_UNAVAILABLE) != 0) 1673NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); // this is used all over 1676si.fMask = NativeMethods.SIF_ALL; 1761int nextItem = GetItemNext(hwnd, curItem, NativeMethods.LVNI_BELOW); 1781return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_LIST); 1785private static unsafe bool GetItemPosition (IntPtr hwnd, int item, out NativeMethods.Win32Point pt) 1792if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMPOSITION, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(pt.GetType()))) 1804return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero); 1810return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask)); 1815NativeMethods.LVITEM lvitem = new NativeMethods.LVITEM 1817mask = NativeMethods.LVIF_STATE, 1851if (eventId == NativeMethods.EventObjectSelectionRemove && automationProperty == SelectionItemPattern.IsSelectedProperty) 1860else if (eventId == NativeMethods.EventObjectSelection 1861|| eventId == NativeMethods.EventObjectSelectionRemove 1862|| eventId == NativeMethods.EventObjectSelectionAdd) 1909if (eventId == NativeMethods.EventObjectSelectionRemove && GetSelectedItemCount(hwnd) == 1) 1914eventId = NativeMethods.EventObjectSelection; 1935else if (eventId == NativeMethods.EventObjectReorder && (automationProperty == GridItemPattern.ColumnProperty || automationProperty == GridItemPattern.RowProperty)) 1945else if (eventId == NativeMethods.EventObjectNameChange) 1948eventId = NativeMethods.EventObjectValueChange; 1952else if (eventId == NativeMethods.EventObjectStateChange && CheckBoxes(hwnd)) 1957eventId = NativeMethods.EventObjectValueChange; 1963else if ((eventId == NativeMethods.EventObjectDestroy || eventId == NativeMethods.EventObjectCreate) && automationEvent == AutomationElement.StructureChangedEvent) 1978if (eventId == NativeMethods.EventObjectCreate && fGroupView)
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (74)
71NativeMethods.Win32Rect itemRectangle = manager.GetGroupRc(ID); 95NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6(); 96group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 101return XSendMessage.GetItemText(_hwnd, group, NativeMethods.LVGF_HEADER); 105NativeMethods.LVGROUP group = new NativeMethods.LVGROUP(); 106group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP))); 109group.mask = NativeMethods.LVGF_HEADER; 151NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6(); 152group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 154group.mask = NativeMethods.LVGF_STATE; 155group.stateMask = NativeMethods.LVGS_SUBSETED; 163if ((group.state & NativeMethods.LVGS_SUBSETED) != 0) 239NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6(); 240group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 242group.mask = NativeMethods.LVGF_STATE; 243group.stateMask = NativeMethods.LVGS_SUBSETED; 251if ((group.state & NativeMethods.LVGS_SUBSETED) != 0) 284NativeMethods.Win32Point pt = new NativeMethods.Win32Point (x, y); 285NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest (_hwnd, pt); 287if ((hitTest.flags & NativeMethods.LVHT_EX_GROUP_HEADER) != 0) 292if ((hitTest.flags & NativeMethods.LVHT_ONITEM) != 0 && hitTest.iItem >= 0) 303NativeMethods.LVHITTESTINFO_V6 hitTestNative = new NativeMethods.LVHITTESTINFO_V6(hitTest); 306XSendMessage.XSendGetIndex(_hwnd, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 309if ((hitTestNative.flags & NativeMethods.LVHT_EX_GROUP_SUBSETLINK) != 0) 328int groupIndex = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 331NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6(); 332groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 333groupInfo.mask = NativeMethods.LVGF_GROUPID; 337bool lresult = XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 423NativeMethods.LVGROUP group = new NativeMethods.LVGROUP(); 424group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP))); 426group.mask = NativeMethods.LVGF_STATE; 427group.stateMask = NativeMethods.LVGS_COLLAPSED; 430isCollapsed = (group.state & NativeMethods.LVGS_COLLAPSED) != 0; 463int index = WindowsListView.GetItemNext(hwnd, -1, NativeMethods.LVNI_FOCUSED); 468NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 470mask = NativeMethods.LVIF_GROUPID, 486int groupIndex = (int)Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 489NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6(); 490groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 491groupInfo.mask = NativeMethods.LVGF_GROUPID; 495bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 504groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 506groupInfo.mask = NativeMethods.LVGF_STATE; 507groupInfo.stateMask = NativeMethods.LVGS_SUBSETLINKFOCUSED; 512if ((groupInfo.state & NativeMethods.LVGS_SUBSETLINKFOCUSED) != 0) 605NativeMethods.LVGROUP group = new NativeMethods.LVGROUP(); 606group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP))); 609group.mask = NativeMethods.LVGF_STATE; 611group.stateMask = NativeMethods.LVGS_COLLAPSED; 612group.state = collapse ? NativeMethods.LVGS_COLLAPSED : 0; 681private static NewItemInDimension IsNewColumn (NativeMethods.Win32Rect rc1, NativeMethods.Win32Rect rc2) 719private static NewItemInDimension IsNewRow (NativeMethods.Win32Rect rc1, NativeMethods.Win32Rect rc2) 788NativeMethods.Win32Rect rc; 789NativeMethods.Win32Rect rcNext; 792if (WindowsListView.GetItemRect(hwnd, items[0], NativeMethods.LVIR_BOUNDS, out rc)) 799if (!WindowsListView.GetItemRect(hwnd, items[i], NativeMethods.LVIR_BOUNDS, out rcNext)) 848private delegate NewItemInDimension IsNewItemInDimension (NativeMethods.Win32Rect rc1, NativeMethods.Win32Rect rc2);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (55)
123internal NativeMethods.Win32Rect GetGroupRc(int id) 129return NativeMethods.Win32Rect.Empty; 134internal NativeMethods.Win32Rect GetGroupRcByIndex(int index) 138return NativeMethods.Win32Rect.Empty; 204NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 206mask = NativeMethods.LVIF_GROUPID 240return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 369NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 371mask = NativeMethods.LVIF_GROUPID 379NativeMethods.LVITEMINDEX ii = new NativeMethods.LVITEMINDEX(-1, -1); 381int flags = NativeMethods.LVNI_VISIBLEONLY | NativeMethods.LVNI_VISIBLEORDER; 386while (XSendMessage.XSend (hwnd, NativeMethods.LVM_GETNEXTITEMINDEX, new IntPtr(&ii), flags, Marshal.SizeOf(ii.GetType()))) 389NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6(); 390groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 391groupInfo.mask = NativeMethods.LVGF_GROUPID; 393bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(ii.iGroup), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 465NativeMethods.LVGROUPMETRICS metric = new NativeMethods.LVGROUPMETRICS (sizeof(NativeMethods.LVGROUPMETRICS), NativeMethods.LVGMF_BORDERSIZE); 466XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPMETRICS, IntPtr.Zero, new IntPtr(&(metric.cbSize)), metric.cbSize, XSendMessage.ErrorValue.NoCheck); 484private NativeMethods.Win32Rect GetGroupRcInternal(Group group) 486NativeMethods.Win32Rect rcGroup = group.GetGroupRect(); 617NativeMethods.Win32Rect rc1; 618WindowsListView.GetItemRect(_hwnd, item1, NativeMethods.LVIR_BOUNDS, out rc1); 620NativeMethods.Win32Rect rc2; 621WindowsListView.GetItemRect(_hwnd, item2, NativeMethods.LVIR_BOUNDS, out rc2); 697internal unsafe NativeMethods.Win32Rect GetGroupRect() 699NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect(); 701rect.top = isCollapsed ? NativeMethods.LVGGR_HEADER : NativeMethods.LVGGR_GROUP; 702XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, 710internal NativeMethods.Win32Rect CalculateRectNoHeader() 712NativeMethods.Win32Rect rcLv = NativeMethods.Win32Rect.Empty; 716return NativeMethods.Win32Rect.Empty; 720NativeMethods.Win32Rect item; 721WindowsListView.GetItemRect(_hwnd, _items[0], NativeMethods.LVIR_BOUNDS, out item); 723NativeMethods.Win32Rect groupRc; 734WindowsListView.GetItemRect(_hwnd, _items[count - 1], NativeMethods.LVIR_BOUNDS, out item); 743if (WindowScroll.Scrollable(_hwnd, NativeMethods.SB_VERT)) 745NativeMethods.Win32Rect rc = GetScrollbarRect(); 811private NativeMethods.Win32Rect GetScrollbarRect() 813NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 816if (Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_VSCROLL, ref sbi)) 818return new NativeMethods.Win32Rect(sbi.rcScrollBar.left, sbi.rcScrollBar.top, sbi.rcScrollBar.right, sbi.rcScrollBar.bottom); 821return NativeMethods.Win32Rect.Empty;
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (15)
73NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect 75top = NativeMethods.LVGGR_SUBSETLINK 77XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, new IntPtr(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType())); 87NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6(); 88groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 90groupInfo.mask = NativeMethods.LVGF_STATE; 91groupInfo.stateMask = NativeMethods.LVGS_SUBSETLINKFOCUSED; 96return (groupInfo.state & NativeMethods.LVGS_SUBSETLINKFOCUSED) != 0; 104NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6(); 105group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 110return XSendMessage.GetItemText(_hwnd, group, NativeMethods.LVGF_SUBSET); 120NativeMethods.Win32Point pt;
MS\Internal\AutomationProxies\WindowsListViewItem.cs (35)
97NativeMethods.Win32Rect itemRectangle = NativeMethods.Win32Rect.Empty; 105itemRectangle.left = NativeMethods.LVIR_BOUNDS; 125NativeMethods.LVITEMINDEX ii = new NativeMethods.LVITEMINDEX 133if (XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETITEMINDEXRECT, new IntPtr(&ii), new IntPtr(&itemRectangle), Marshal.SizeOf(ii.GetType()), Marshal.SizeOf(itemRectangle.GetType()))) 147if (WindowsListView.GetItemRect(_hwnd, _item, NativeMethods.LVIR_BOUNDS, out itemRectangle)) 223NativeMethods.Win32Point clickPoint; 339NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (_hwnd, _item); 365int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero); 527NativeMethods.Win32Point clickPoint; 703NativeMethods.LVITEM lvitem = new NativeMethods.LVITEM 705mask = NativeMethods.LVIF_TEXT, 731NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 733mask = NativeMethods.LVIF_GROUPID, 852NativeMethods.Win32Rect listViewRect = new NativeMethods.Win32Rect(); 853NativeMethods.Win32Rect headerRect = new NativeMethods.Win32Rect(); 860NativeMethods.Win32Rect itemRect = 861new NativeMethods.Win32Rect(BoundingRectangle); 909private bool GetListviewitemClickablePoint (out NativeMethods.Win32Point clickPoint) 915NativeMethods.Win32Rect itemRectangle; 918if (!WindowsListView.GetItemRect(_hwnd, _item, NativeMethods.LVIR_LABEL, out itemRectangle)) 927NativeMethods.Win32Point pt = new NativeMethods.Win32Point (itemRectangle.left, 0); 939if (!WindowsListView.GetItemRect(_hwnd, _item, NativeMethods.LVIR_LABEL, out itemRectangle)) 951private void Click (NativeMethods.Win32Point clickPoint) 962IntPtr key = (IntPtr)((setValueSucceeded) ? NativeMethods.VK_RETURN : NativeMethods.VK_ESCAPE); 965int scanCode = SafeNativeMethods.MapVirtualKey (NativeMethods.VK_RETURN, 0); 972Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode)); 973Misc.ProxySendMessage(hwnd, NativeMethods.WM_KEYUP, key, keyUpLParam);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (26)
73NativeMethods.Win32Rect itemRect = ListViewCheckBoxRect(_hwnd, _listviewItem); 144internal static NativeMethods.Win32Rect ListViewCheckBoxRect (IntPtr hwnd, int item) 150NativeMethods.Win32Rect controlRectangle = NativeMethods.Win32Rect.Empty; 154return NativeMethods.Win32Rect.Empty; 160NativeMethods.Win32Rect rc; 162if ((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)) 166return new NativeMethods.Win32Rect (controlRectangle.left, rc.top, right, rc.bottom); 172NativeMethods.Win32Rect wholeItem; 174if (!WindowsListView.GetItemRect(hwnd, item, NativeMethods.LVIR_BOUNDS, out wholeItem)) 176return NativeMethods.Win32Rect.Empty; 179NativeMethods.Win32Rect selectable; 181if (!WindowsListView.GetItemRect(hwnd, item, NativeMethods.LVIR_SELECTBOUNDS, out selectable)) 183return NativeMethods.Win32Rect.Empty; 188return new NativeMethods.Win32Rect (selectable.right, wholeItem.top, wholeItem.right, wholeItem.bottom); 192return new NativeMethods.Win32Rect (wholeItem.left, wholeItem.top, selectable.left, wholeItem.bottom); 196return NativeMethods.Win32Rect.Empty; 246NativeMethods.Win32Rect rc = ListViewCheckBoxRect(_hwnd, _listviewItem); 247NativeMethods.Win32Point pt = new NativeMethods.Win32Point((rc.left + rc.right) / 2, (rc.top + rc.bottom) / 2); 252Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 253Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (7)
52NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 54fMask = NativeMethods.SIF_ALL 93int cPelsAll = NativeMethods.Util.LOWORD (size); 99int cPelsAll = NativeMethods.Util.HIWORD (size); 118int cPelsAll = NativeMethods.Util.LOWORD (size); 124int cPelsAll = NativeMethods.Util.HIWORD (size);
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (9)
73NativeMethods.Win32Rect itemRectangle; 77int lvir = (_item == 0) ? NativeMethods.LVIR_SELECTBOUNDS : NativeMethods.LVIR_BOUNDS; 90NativeMethods.Win32Rect itemRectangle1; 92if (!WindowsListView.GetSubItemRect(_hwnd, _itemParent, 1, NativeMethods.LVIR_BOUNDS, out itemRectangle1)) 110NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (_hwnd, _itemParent); 348NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest (hwnd, item, new NativeMethods.Win32Point (x, y)); 374int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (90)
115System.Diagnostics.Debug.Assert(idObject == NativeMethods.OBJID_MENU || idObject == NativeMethods.OBJID_SYSMENU, "Unexpected idObject"); 117if (eventId == NativeMethods.EventObjectInvoke) 209NativeMethods.GUITHREADINFO gui; 227if (!Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 289if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE)) 298else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_POPUPMENUMODE)) 304else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 501internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint idItem, out NativeMethods.MENUBARINFO mbi) 503mbi = new NativeMethods.MENUBARINFO(); 588NativeMethods.GUITHREADINFO gui; 668if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER)) 716return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero); 727NativeMethods.GUITHREADINFO gui; 731return Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE); 744NativeMethods.MENUBARINFO mbi; 746if (GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero) 799NativeMethods.MENUBARINFO mbi; 800if (!GetMenuBarInfo(_hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi)) 829NativeMethods.MENUBARINFO mbi; 830if (GetMenuBarInfo(_hwnd, NativeMethods.OBJID_MENU, 0, out mbi)) 873NativeMethods.MENUBARINFO mbi; 877if (GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi) && 895NativeMethods.GUITHREADINFO gui; 919int state = UnsafeNativeMethods.GetMenuState(hmenu, i, NativeMethods.MF_BYPOSITION); 920if (Misc.IsBitSet(state, NativeMethods.MF_HILITE)) 952if (eventId == NativeMethods.EventSystemMenuPopupEnd) 1082NativeMethods.GUITHREADINFO gui; 1112new WinEventTracker.EvtIdProperty(NativeMethods.EventSystemMenuPopupStart, ExpandCollapsePattern.ExpandCollapseStateProperty), 1113new WinEventTracker.EvtIdProperty(NativeMethods.EventSystemMenuPopupEnd, ExpandCollapsePattern.ExpandCollapseStateProperty), 1114new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectInvoke, InvokePattern.InvokedEvent) 1245NativeMethods.MENUBARINFO mbi; 1247if (GetMenuBarInfo(_hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi)) 1273NativeMethods.Win32Rect rc; 1414NativeMethods.Win32Rect itemWin32Rect = new NativeMethods.Win32Rect(itemRect); 1507while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 1865return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); 1880return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED); 1885NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO(); 1887menuItemInfo.fMask = NativeMethods.MIIM_FTYPE | NativeMethods.MIIM_SUBMENU | NativeMethods.MIIM_STATE; 1894return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero); 1900NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO (); 1902menuItemInfo.fMask = NativeMethods.MIIM_FTYPE | NativeMethods.MIIM_SUBMENU | NativeMethods.MIIM_STATE; 1909return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1910Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1911Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)); 1944NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO(); 1946menuItemInfo.fMask = NativeMethods.MIIM_FTYPE | NativeMethods.MIIM_SUBMENU | NativeMethods.MIIM_STATE; 1955if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1956Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1957Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 2118Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' ')); 2196for (item = 0; item < cItems && !Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++) 2238NativeMethods.GUITHREADINFO gui; 2331while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 2362if (Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE)) 2397Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP)) 2534int length = UnsafeNativeMethods.GetMenuString(_hmenu, _item, IntPtr.Zero, 0, NativeMethods.MF_BYPOSITION); 2543if (UnsafeNativeMethods.GetMenuString(_hmenu, _item, strbldr, length + 1, NativeMethods.MF_BYPOSITION) == length) 2551NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO(); 2553menuItemInfo.fMask = NativeMethods.MIIM_TYPE | NativeMethods.MIIM_STATE | NativeMethods.MIIM_DATA | NativeMethods.MIIM_ID; 2558if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 2559Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 2560Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 2564else if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_OWNERDRAW)) 2647int state = UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION); 2650return !(Misc.IsBitSet(state, NativeMethods.MF_DISABLED) | Misc.IsBitSet(state, NativeMethods.MF_GRAYED));
MS\Internal\AutomationProxies\WindowsProgressbar.cs (5)
56if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 154int cur = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 155int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero); 156int max = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (19)
57if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 122NativeMethods.Win32Rect rebarRect = new NativeMethods.Win32Rect (); 134NativeMethods.Win32Point pt = new NativeMethods.Win32Point (x, y); 193return Misc.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero); 197private unsafe int getRebarBandIDFromPoint (NativeMethods.Win32Point pt) 199NativeMethods.RB_HITTESTINFO rbHitTestInfo = new NativeMethods.RB_HITTESTINFO 206return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 288IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 379Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero); 395NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty; 399if (!XSendMessage.XSend(hwnd, NativeMethods.RB_GETRECT, new IntPtr(item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 428NativeMethods.REBARBANDINFO rebarBandInfo = new NativeMethods.REBARBANDINFO 435if (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)
69if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 76if (eventId == NativeMethods.EventObjectLocationChange 77&& idObject == NativeMethods.OBJID_CARET) 167if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)) 173if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(_hwnd)) 188int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 195result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 442return (WindowStyle & NativeMethods.ES_READONLY) == NativeMethods.ES_READONLY; 460Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 483if (UnsafeNativeMethods.AccessibleObjectFromWindow(WindowHandle, NativeMethods.OBJID_NATIVEOM, ref UnsafeNativeMethods.IID_IDispatch, ref obj) != NativeMethods.S_OK) 534if (range.GetEmbeddedObject(out embeddedObject) == NativeMethods.S_OK && embeddedObject != null) 571text = acc.get_accName(NativeMethods.CHILD_SELF); 582int hr = NativeMethods.S_FALSE; 592if (hr != NativeMethods.S_OK) 624if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 634if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 680IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (4)
169NativeMethods.Win32Rect w32rect = new NativeMethods.Win32Rect(); 629return SafeNativeMethods.GetSysColor(NativeMethods.COLOR_WINDOW); 770return SafeNativeMethods.GetSysColor(NativeMethods.COLOR_WINDOWTEXT);
MS\Internal\AutomationProxies\WindowsScroll.cs (64)
35bool isHorizontal = SetScrollPercent (hwnd, horizontalPercent, NativeMethods.SB_HORZ, out resultsNoCheck); 43bool isVertical = SetScrollPercent (hwnd, verticalPercent, NativeMethods.SB_VERT, out resultsNoCheck); 67bool fHz = ScrollCursor(hwnd, HorizontalAmount, NativeMethods.SB_HORZ, fForceResults); 68bool fVt = ScrollCursor (hwnd, VerticalAmount, NativeMethods.SB_VERT, fForceResults); 82return Scrollable (hwnd, NativeMethods.SB_HORZ) ? GetScrollInfo (hwnd, NativeMethods.SB_HORZ) : ScrollPattern.NoScroll; 86return Scrollable (hwnd, NativeMethods.SB_VERT) ? GetScrollInfo (hwnd, NativeMethods.SB_VERT) : ScrollPattern.NoScroll; 90return Scrollable (hwnd, NativeMethods.SB_HORZ) ? ScrollViewSize (hwnd, NativeMethods.SB_HORZ) : 100.0; 94return Scrollable (hwnd, NativeMethods.SB_VERT) ? ScrollViewSize (hwnd, NativeMethods.SB_VERT) : 100.0; 98return Scrollable (hwnd, NativeMethods.SB_HORZ); 102return Scrollable (hwnd, NativeMethods.SB_VERT); 113if ((sbFlag == NativeMethods.SB_HORZ && !Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) || 114(sbFlag == NativeMethods.SB_VERT && !Misc.IsBitSet(style, NativeMethods.WS_VSCROLL))) 126NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo(); 129(sbFlag == NativeMethods.SB_VERT) ? NativeMethods.OBJID_VSCROLL : NativeMethods.OBJID_HSCROLL; 133!Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE); 142NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 144si.fMask = NativeMethods.SIF_ALL; 158bool hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.WS_HSCROLL) || Misc.IsBitSet(style, NativeMethods.WS_VSCROLL); 165hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.ES_MULTILINE); 174return Scrollable(hwnd, NativeMethods.SB_HORZ) || Scrollable(hwnd, NativeMethods.SB_VERT); 191NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 193fMask = NativeMethods.SIF_ALL 249NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 251si.fMask = NativeMethods.SIF_RANGE | NativeMethods.SIF_PAGE; 283throw new ArgumentOutOfRangeException(sbFlag == NativeMethods.SB_HORZ ? "horizontalPercent" : "verticalPercent", SR.ScrollBarOutOfRange); 287NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 289fMask = NativeMethods.SIF_ALL 316int message = sbFlag == NativeMethods.SB_HORZ ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL; 318int wParam = NativeMethods.Util.MAKELONG(NativeMethods.SB_THUMBPOSITION, si.nPos); 363NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 365fMask = NativeMethods.SIF_ALL 381if (sbFlag == NativeMethods.SB_HORZ) 386nAction = NativeMethods.SB_LINELEFT; 390nAction = NativeMethods.SB_PAGELEFT; 394nAction = NativeMethods.SB_LINERIGHT; 398nAction = NativeMethods.SB_PAGERIGHT; 410nAction = NativeMethods.SB_LINEUP; 414nAction = NativeMethods.SB_PAGEUP; 418nAction = NativeMethods.SB_LINEDOWN; 422nAction = NativeMethods.SB_PAGEDOWN; 431int wParam = NativeMethods.Util.MAKELONG (nAction, 0); 432int message = sbFlag == NativeMethods.SB_HORZ ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL;
MS\Internal\AutomationProxies\WindowsScrollBar.cs (71)
46_sAutomationId = sbFlag == NativeMethods.SB_VERT ? "Vertical ScrollBar" : "Horizontal ScrollBar"; // This string is a non-localizable string 69return new WindowsScrollBar(hwnd, null, idChild, NativeMethods.SB_CTL); 77WindowsScrollBar wtv = new WindowsScrollBar (hwnd, null, -1, NativeMethods.SB_CTL); 79if (idChild == 0 && eventId == NativeMethods.EventObjectStateChange && idProp == ValuePattern.IsReadOnlyProperty) 87if (idObject == NativeMethods.OBJID_HSCROLL || idObject == NativeMethods.OBJID_VSCROLL) 89idObject = NativeMethods.OBJID_WINDOW; 100ProxySimple scrollBarBit = WindowsScrollBarBits.CreateFromChildId(hwnd, wtv, idChild, NativeMethods.SB_CTL); 129if (_sbFlag == NativeMethods.SB_CTL) 134NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 137int idObject = _sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : _sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT; 165if (_sbFlag == NativeMethods.SB_VERT) 329NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(WindowsScrollBarBits.GetBoundingRectangle(_hwnd, this, item, _sbFlag)); 411return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_VSCROLL); 416return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_HSCROLL); 421if (sbFlag == NativeMethods.SB_CTL) 422return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.SBS_VERT); 424return sbFlag == NativeMethods.SB_VERT; 430NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 432si.fMask = NativeMethods.SIF_RANGE | NativeMethods.SIF_PAGE; 443int idObject = sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT; 444NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 456NativeMethods.SIZE sizeArrow; 518NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 521if (_sbFlag != NativeMethods.SB_CTL || Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_CLIENT, ref sbi)) 528private int GetScrollMaxValue(NativeMethods.ScrollInfo si) 568NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 570fMask = NativeMethods.SIF_ALL 585if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent._hwnd))) 621NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 623fMask = NativeMethods.SIF_ALL 686if (_sbFlag == NativeMethods.SB_CTL) 694IsScrollBarVertical(_hwnd, _sbFlag) ? NativeMethods.WM_VSCROLL : NativeMethods.WM_HSCROLL; 698int wParam = NativeMethods.Util.MAKELONG ((short) NativeMethods.SB_THUMBPOSITION, (short) val); 700wParam = NativeMethods.Util.MAKELONG ((short) NativeMethods.SB_THUMBTRACK, (short) val); 709int idObject = sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT; 710NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 725NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo(); 728int idObject = NativeMethods.OBJID_CLIENT; 729if (_sbFlag == NativeMethods.SB_VERT) 731idObject = NativeMethods.OBJID_VSCROLL; 733else if (_sbFlag == NativeMethods.SB_HORZ) 735idObject = NativeMethods.OBJID_HSCROLL; 743return !Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE); 762protected int _sbFlag = NativeMethods.SB_CTL;
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (36)
179Scroll(amount, NativeMethods.SBS_VERT); 183Scroll(amount, NativeMethods.SBS_HORZ); 204NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 206si.fMask = NativeMethods.SIF_RANGE; 221int idObject = sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT; 222NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 241if (sbFlag == NativeMethods.SB_VERT) 294internal static Rect GetVerticalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi) 296NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(sbi.rcScrollBar.left, sbi.xyThumbTop, sbi.rcScrollBar.right, sbi.xyThumbBottom); 307NativeMethods.SIZE sizeArrow; 385internal static Rect GetHorizontalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi) 388NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(sbi.xyThumbTop, sbi.rcScrollBar.top, sbi.xyThumbBottom, sbi.rcScrollBar.bottom); 398NativeMethods.SIZE sizeArrow; 516IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(_hwnd) : _hwnd; 522wParam = NativeMethods.SB_PAGEUP; 526wParam = NativeMethods.SB_LINEUP; 530wParam = NativeMethods.SB_PAGEDOWN; 534wParam = NativeMethods.SB_LINEDOWN; 538NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 540fMask = NativeMethods.SIF_ALL 551if ((si.nPos == si.nMax) && (wParam == NativeMethods.SB_PAGEDOWN || wParam == NativeMethods.SB_LINEDOWN)) 558if ((si.nPos == si.nMin) && (wParam == NativeMethods.SB_PAGEUP || wParam == NativeMethods.SB_LINEUP)) 563int msg = (style == NativeMethods.SBS_HORZ) ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL;
MS\Internal\AutomationProxies\WindowsSlider.cs (26)
61if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 137NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SliderItem.GetBoundingRectangle (_hwnd, item, _fHorizontal)); 172int msg = IsHorizontalSlider () ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL; 175int wParam = (newVal << 16) | NativeMethods.SB_THUMBPOSITION; 255return (Misc.IsBitSet(WindowStyle, NativeMethods.TBS_VERT)); 260int value = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 263if ((this.WindowStyle & NativeMethods.TBS_REVERSED) != 0) 265int maxValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 283Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val)); 290return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero); 298return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero); 306return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 314return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero); 408IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 437IntPtr wParam = (IntPtr) (_item == (int) WindowsSlider.SItem.LargeDecrement ? NativeMethods.VK_PRIOR : NativeMethods.VK_NEXT); 439Misc.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero); 455NativeMethods.Win32Rect rcChannel = new NativeMethods.Win32Rect (); 460XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 467NativeMethods.Win32Rect rcThumb = new NativeMethods.Win32Rect(); 472XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck);
MS\Internal\AutomationProxies\WindowsSpinner.cs (6)
60hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 82if (idObject == NativeMethods.OBJID_VSCROLL || idObject == NativeMethods.OBJID_HSCROLL) 276IntPtr hwndChild = Misc.GetWindow(hwndParent, NativeMethods.GW_CHILD); 282IntPtr hwndBuddy = Misc.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 288hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
MS\Internal\AutomationProxies\WindowsStatic.cs (24)
88style = Misc.GetWindowStyle(hwnd) & NativeMethods.SS_TYPEMASK; 108if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 173return Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK && acc != null && acc.ChildCount > 0; 181case NativeMethods.SS_ICON: 185case NativeMethods.SS_BITMAP: 189case NativeMethods.SS_LEFT: 190case NativeMethods.SS_CENTER: 191case NativeMethods.SS_RIGHT: 192case NativeMethods.SS_BLACKRECT: 193case NativeMethods.SS_GRAYRECT: 194case NativeMethods.SS_WHITERECT: 195case NativeMethods.SS_BLACKFRAME: 196case NativeMethods.SS_GRAYFRAME: 197case NativeMethods.SS_WHITEFRAME: 198case NativeMethods.SS_SIMPLE: 199case NativeMethods.SS_LEFTNOWORDWRAP: 200case NativeMethods.SS_ETCHEDHORZ: 201case NativeMethods.SS_ETCHEDVERT: 202case NativeMethods.SS_ETCHEDFRAME: 203case NativeMethods.SS_OWNERDRAW: 207case NativeMethods.SS_ENHMETAFILE: 208case NativeMethods.SS_USERITEM:
MS\Internal\AutomationProxies\WindowsStatusBar.cs (24)
62if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 74if (eventId == NativeMethods.EventObjectNameChange && idChild == 1) 223NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (WindowsStatusBarPane.GetBoundingRectangle (_hwnd, item)); 234NativeMethods.Win32Rect rc = StatusBarGrip.GetBoundingRectangle (_hwnd); 336return Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero); 356Misc.EnumChildWindows(hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindChildFromRect), (void*)&info); 363NativeMethods.Win32Rect rc = NativeMethods.Win32Rect.Empty; 560return XSendMessage.GetItemRect(hwnd, NativeMethods.SB_GETRECT, item); 565if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) != NativeMethods.S_OK || acc == null) 596int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero); 600int len = NativeMethods.Util.LOWORD(retValue); 601return XSendMessage.GetItemText(_hwnd, NativeMethods.SB_GETTEXTW, _item, len); 789internal static NativeMethods.Win32Rect GetBoundingRectangle (IntPtr hwnd) 793return NativeMethods.Win32Rect.Empty; 796NativeMethods.Win32Rect client = new NativeMethods.Win32Rect(); 799return NativeMethods.Win32Rect.Empty; 804NativeMethods.SIZE sizeGrip = WindowsGrip.GetGripSize(hwnd, true); 809return new NativeMethods.Win32Rect(client.left, client.bottom - sizeGrip.cy, client.left + sizeGrip.cx, client.bottom); 813return new NativeMethods.Win32Rect(client.right - sizeGrip.cx, client.bottom - sizeGrip.cy, client.right, client.bottom);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (52)
68if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 75IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 150NativeMethods.HDHITTESTINFO HitTestInfo = new NativeMethods.HDHITTESTINFO 152pt = new NativeMethods.Win32Point(x, y) 161index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 166if (index != -1 && (NativeMethods.HHT_ONHEADER == (HitTestInfo.flags & 0x000F))) 177int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 193return Misc.IsBitSet(WindowStyle, NativeMethods.HDS_VERT) ? OrientationType.Vertical : OrientationType.Horizontal; 244IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (_hwnd, NativeMethods.GA_PARENT); 284Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 292return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.HDS_HIDDEN); 298return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 303return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 308NativeMethods.HDITEM item = new NativeMethods.HDITEM(); 310item.mask = NativeMethods.HDI_ORDER; 422NativeMethods.Win32Rect itemRect = BoundingRect(); 432NativeMethods.Win32Rect parentRect = NativeMethods.Win32Rect.Empty; 471NativeMethods.Win32Point pt; 478IntPtr center = NativeMethods.Util.MAKELPARAM (pt.x, pt.y); 481Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 482Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 525int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 549NativeMethods.HDITEM hdi = new NativeMethods.HDITEM(); 551hdi.mask = NativeMethods.HDI_TEXT; 559private NativeMethods.Win32Rect BoundingRect () 563NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty; 568result = XSendMessage.XSend(_hwnd, NativeMethods.HDM_GETITEMRECT, new IntPtr(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 575return NativeMethods.Win32Rect.Empty; 584int cxBorder = 8 * UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXBORDER); 630return NativeMethods.Win32Rect.Empty; 648return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_BUTTONS)); 654return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_FILTERBAR)); 659private bool GetInvokationPoint (out NativeMethods.Win32Point pt) 674NativeMethods.HDITEM item = new NativeMethods.HDITEM(); 676item.mask = NativeMethods.HDI_FORMAT; 681if ((item.fmt & NativeMethods.HDF_SPLITBUTTON) != 0) 693int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 717Rect rect = XSendMessage.GetItemRect(_hwnd, NativeMethods.HDM_GETITEMDROPDOWNRECT, _item); 718NativeMethods.Win32Rect rectW32 = new NativeMethods.Win32Rect(rect); 719IntPtr center = NativeMethods.Util.MAKELPARAM (rectW32.left + ((rectW32.right - rectW32.left) / 2), rectW32.top + ((rectW32.bottom - rectW32.top) / 2)); 724Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 725Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
MS\Internal\AutomationProxies\WindowsTab.cs (91)
53_upDownEvents[0]._evtId = NativeMethods.EventObjectValueChange; 84case NativeMethods.OBJID_CLIENT : 88if (eventId == NativeMethods.EventObjectSelection || eventId == NativeMethods.EventObjectSelectionRemove || eventId == NativeMethods.EventObjectSelectionAdd) 101if ((idProp == ScrollPattern.VerticalScrollPercentProperty && idObject != NativeMethods.OBJID_VSCROLL) || 102(idProp == ScrollPattern.HorizontalScrollPercentProperty && idObject != NativeMethods.OBJID_HSCROLL)) 256pt = new NativeMethods.Win32Point(x, y) 276index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType())); 290int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero); 437return !Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS); 504int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 505int minPos = NativeMethods.Util.HIWORD(range); 506int maxPos = NativeMethods.Util.LOWORD(range); 512Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 513Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 533int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 536int posResult = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 539minPos = NativeMethods.Util.HIWORD(range); 540maxPos = NativeMethods.Util.LOWORD(range); 541currentPos = NativeMethods.Util.LOWORD(posResult); 569NativeMethods.Win32Rect viewable = new NativeMethods.Win32Rect 590NativeMethods.Win32Rect rectW32 = new NativeMethods.Win32Rect (); 645int count = Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 649NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty; 653result = XSendMessage.XSend(hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(count - 1), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 687int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 688int max = NativeMethods.Util.LOWORD(range); 691Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 692Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 719if (eventId == NativeMethods.EventObjectValueChange 722IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 750IntPtr childHwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 766childHwnd = Misc.GetWindow(childHwnd, NativeMethods.GW_HWNDLAST); 781return Misc.IsBitSet(style, NativeMethods.TCS_MULTILINE) && 782(Misc.IsBitSet(style, NativeMethods.TCS_RIGHT) || 783Misc.IsBitSet(style, NativeMethods.TCS_VERTICAL)); 808int newPos = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 809int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 810int max = NativeMethods.Util.LOWORD(range); 811int min = NativeMethods.Util.HIWORD(range); 813if (NativeMethods.Util.HIWORD (newPos) == 0) 818newPos = NativeMethods.Util.LOWORD (newPos); 848Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 849Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 861return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_MULTISELECT)); 966IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 993if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_FOCUSNEVER)) 1003Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1099NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 1135NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 1147else if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS)) 1149Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero); 1172NativeMethods.TCITEM TCItem = new NativeMethods.TCITEM(); 1173TCItem.Init(NativeMethods.TCIF_STATE); 1181return Misc.IsBitSet(TCItem.dwState, NativeMethods.TCIS_BUTTONPRESSED); 1239return Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 1255return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item; 1268private unsafe NativeMethods.Win32Rect BoundingRect() 1270NativeMethods.Win32Rect rectW32 = new NativeMethods.Win32Rect(); 1272if (!XSendMessage.XSend(_hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(_item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 1274return NativeMethods.Win32Rect.Empty; 1277return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty; 1288if (Misc.IsBitSet(WindowStyle, (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_FOCUSNEVER))) 1293NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 1299Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1300Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1306Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1340NativeMethods.TCITEM tcitem = new NativeMethods.TCITEM(); 1343tcitem.mask = NativeMethods.TCIF_TEXT;
MS\Internal\AutomationProxies\WindowsTitleBar.cs (59)
100return ReturnNextTitleBarChild (true, NativeMethods.INDEX_TITLEBAR_MIC); 106return ReturnNextTitleBarChild (true, NativeMethods.INDEX_TITLEBAR_MAC); 111int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y)); 114case NativeMethods.HTCAPTION: 117case NativeMethods.HTMINBUTTON: 118return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_MINBUTTON); 120case NativeMethods.HTMAXBUTTON : 121return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_MAXBUTTON); 123case NativeMethods.HTHELP : 124return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_HELPBUTTON); 126case NativeMethods.HTCLOSE : 127return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON); 129case NativeMethods.HTSYSMENU : 162case NativeMethods.INDEX_TITLEBAR_HELPBUTTON : 163case NativeMethods.INDEX_TITLEBAR_MINBUTTON : 164case NativeMethods.INDEX_TITLEBAR_MAXBUTTON : 165case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON : 201for (int i = start; i >= NativeMethods.INDEX_TITLEBAR_MIC && i <= NativeMethods.INDEX_TITLEBAR_MAC; i += next ? 1 : -1) 205if (!Misc.IsBitSet(ti.rgstate[i], NativeMethods.STATE_SYSTEM_INVISIBLE) || i == _systemMenu) 221return !Misc.IsBitSet(ti.rgstate[0], NativeMethods.STATE_SYSTEM_INVISIBLE); 282case NativeMethods.INDEX_TITLEBAR_HELPBUTTON: 285case NativeMethods.INDEX_TITLEBAR_MINBUTTON: 286if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 295case NativeMethods.INDEX_TITLEBAR_MAXBUTTON: 296if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 305case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON: 316case NativeMethods.INDEX_TITLEBAR_HELPBUTTON: 317if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_DISABLED)) 322return Misc.IsBitSet(WindowExStyle, NativeMethods.WS_EX_CONTEXTHELP); 324case NativeMethods.INDEX_TITLEBAR_MINBUTTON: 328if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 333return Misc.IsBitSet(style, NativeMethods.WS_MINIMIZEBOX); 336case NativeMethods.INDEX_TITLEBAR_MAXBUTTON: 340if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 345return Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZEBOX); 370case NativeMethods.INDEX_TITLEBAR_MINBUTTON: 371if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 376case NativeMethods.INDEX_TITLEBAR_HELPBUTTON: 379case NativeMethods.INDEX_TITLEBAR_MAXBUTTON: 380if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 385case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON: 410case NativeMethods.INDEX_TITLEBAR_MINBUTTON : 411if ((WindowStyle & NativeMethods.WS_MINIMIZE) != 0) 412command = NativeMethods.SC_RESTORE; 414command = NativeMethods.SC_MINIMIZE; 417case NativeMethods.INDEX_TITLEBAR_HELPBUTTON : 418command = NativeMethods.SC_CONTEXTHELP; 421case NativeMethods.INDEX_TITLEBAR_MAXBUTTON : 422if ((WindowStyle & NativeMethods.WS_MAXIMIZE) != 0) 423command = NativeMethods.SC_RESTORE; 425command = NativeMethods.SC_MAXIMIZE; 428case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON : 429if ((WindowStyle & NativeMethods.WS_MINIMIZE) != 0) 431Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero); 434command = NativeMethods.SC_CLOSE; 445Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (38)
57Accessible acc = Accessible.CreateNativeFromEvent(hwnd, NativeMethods.OBJID_CLIENT, NativeMethods.CHILD_SELF); 78if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 91if (eventId == NativeMethods.EventObjectDestroy && idProp == AutomationElement.StructureChangedEvent) 210NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (ToolbarItem.GetBoundingRectangle (_hwnd, item)); 228int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero); 232Accessible acc = Accessible.CreateNativeFromEvent(_hwnd, NativeMethods.OBJID_CLIENT, NativeMethods.CHILD_SELF); 261name = GetAccessibleName(NativeMethods.CHILD_SELF); 282NativeMethods.TBBUTTON tbb = new NativeMethods.TBBUTTON (); 299if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 301Accessible acc = Accessible.CreateNativeFromEvent(_hwnd, NativeMethods.OBJID_CLIENT, item + 1); 329return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero); 360NativeMethods.TBBUTTON tbb = new NativeMethods.TBBUTTON(); 368bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0; 369int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero); 375if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_SEP)) 377else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_CHECK)) 386else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_DROPDOWN) 387&& Misc.IsBitSet(exStyle, NativeMethods.TBSTYLE_EX_DRAWDDARROWS)) 392else if (!hasImageList || tbb.iBitmap == NativeMethods.I_IMAGENONE) 428if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 468return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 514Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 560return XSendMessage.GetItemRect(hwnd, NativeMethods.TB_GETITEMRECT, item); 576return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item; 598int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 601return XSendMessage.GetItemText(_hwnd, NativeMethods.TB_GETBUTTONTEXT, _idCommand, len); 622NativeMethods.TBBUTTON tbb = new NativeMethods.TBBUTTON(); 635IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 643|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 650if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 677if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
73if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 79if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (28)
60if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 141if (idObject != NativeMethods.OBJID_WINDOW) 157if( eventId == NativeMethods.EVENT_OBJECT_HIDE /*|| eventId == NativeMethods.EVENT_OBJECT_DESTROY*/ ) 233NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 264case NativeMethods.INDEX_TITLEBAR_MINBUTTON: 265if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 270case NativeMethods.INDEX_TITLEBAR_HELPBUTTON: 273case NativeMethods.INDEX_TITLEBAR_MAXBUTTON: 274if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 279case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON: 282case NativeMethods.INDEX_TITLEBAR_SELF: 292NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 304int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 308case NativeMethods.HTMINBUTTON: 309if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MINIMIZE)) 314case NativeMethods.HTMAXBUTTON: 315if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MAXIMIZE)) 320case NativeMethods.HTCLOSE: 321case NativeMethods.HTMDICLOSE: 324case NativeMethods.HTHELP: 327case NativeMethods.HTMDIMINBUTTON: 330case NativeMethods.HTMDIMAXBUTTON: 333case NativeMethods.HTCAPTION: 354new WinEventTracker.EvtIdProperty(NativeMethods.EVENT_OBJECT_HIDE, 0),
MS\Internal\AutomationProxies\WindowsTreeView.cs (88)
65case NativeMethods.OBJID_CLIENT : 70if (idChild != 0 && (eventId == NativeMethods.EventObjectSelection || 71eventId == NativeMethods.EventObjectSelectionRemove || 72eventId == NativeMethods.EventObjectSelectionAdd || 73eventId == NativeMethods.EventObjectStateChange || 74eventId == NativeMethods.EventObjectDestroy || 75eventId == NativeMethods.EventObjectCreate || 76eventId == NativeMethods.EventObjectNameChange)) 88case NativeMethods.OBJID_VSCROLL : 89case NativeMethods.OBJID_HSCROLL : 98if (idProp == ExpandCollapsePattern.ExpandCollapseStateProperty && el is TreeViewItem && eventId == NativeMethods.EventObjectStateChange) 105if (((idProp as AutomationEvent) == AutomationElement.StructureChangedEvent && el is TreeViewItem) && !(eventId == NativeMethods.EventObjectDestroy || eventId == NativeMethods.EventObjectCreate)) 334return new int[] { NativeMethods.EventObjectNameChange, 335NativeMethods.EventObjectStateChange }; 339return new int[] { NativeMethods.EventObjectStateChange }; 351new(NativeMethods.EventObjectStateChange, idEvent), 352new(NativeMethods.EventObjectCreate, idEvent), 353new(NativeMethods.EventObjectDestroy, idEvent) 406return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0; 412return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0; 418int expanded = GetItemState(hwnd, treeItem, NativeMethods.TVIS_EXPANDED); 420return (Misc.IsBitSet(expanded, NativeMethods.TVIS_EXPANDED)); 431if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0) 437fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0; 446return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_CARET); 456return GetNext(hwnd, treeItem, NativeMethods.TVGN_PARENT); 462return GetNext(hwnd, treeItem, NativeMethods.TVGN_NEXT); 468return GetNext(hwnd, treeItem, NativeMethods.TVGN_PREVIOUS); 474return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_ROOT); 480return GetNext(hwnd, treeItem, NativeMethods.TVGN_CHILD); 490int state = GetItemState(hwnd, treeItem, NativeMethods.TVIS_STATEIMAGEMASK); 502NativeMethods.TVITEM treeItem = new NativeMethods.TVITEM (); 504treeItem.mask = NativeMethods.TVIF_STATE; 506treeItem.stateMask = NativeMethods.TVIS_STATEIMAGEMASK; 518return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem); 524return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask)); 530NativeMethods.TVITEM treeItem; 532if (!GetItem(hwnd, item, NativeMethods.TVIF_CHILDREN, out treeItem)) 543private static unsafe NativeMethods.Win32Rect GetItemRect (IntPtr hwnd, IntPtr treeItem, bool labelOnly) 545NativeMethods.Win32Rect rc = NativeMethods.Win32Rect.Empty; 555if (!XSendMessage.XSend(hwnd, NativeMethods.TVM_GETITEMRECT, partialDisplay, rectangle, Marshal.SizeOf(rc.GetType()))) 557return NativeMethods.Win32Rect.Empty; 564return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty; 570private static bool GetItem (IntPtr hwnd, IntPtr item, int mask, out NativeMethods.TVITEM treeItem) 572treeItem = new NativeMethods.TVITEM (); 581NativeMethods.TVITEM treeItem = new NativeMethods.TVITEM(); 583treeItem.mask = NativeMethods.TVIF_TEXT; 595IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item); 606if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1) 609Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero); 617Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero); 643IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 654int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 815_nativeAcc = Accessible.CreateNativeFromEvent(_hwnd, NativeMethods.OBJID_CLIENT, childId); 844NativeMethods.Win32Rect itemRect = GetItemRect(_hwnd, _hItem, true); 863IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 907NativeMethods.Win32Rect itemWin32Rect = new NativeMethods.Win32Rect(itemRect); 938int highPart = NativeMethods.Util.HIDWORD((long)_hItem); 939int lowPart = NativeMethods.Util.LODWORD((long)_hItem); 1228Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem); 1281int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED)); 1283return Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED); 1454NativeMethods.Win32Rect rectItem = WindowsTreeView.GetItemRect(_hwnd, _hItem, true); 1462NativeMethods.Win32Point pt = new NativeMethods.Win32Point(((rectItem.left + rectItem.right) / 2), ((rectItem.top + rectItem.bottom) / 2)); 1474return Misc.IsBitSet(WindowStyle, NativeMethods.TVS_EDITLABELS); 1480int selected = WindowsTreeView.GetItemState(_hwnd, _hItem, NativeMethods.TVIS_SELECTED); 1482if (Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED)) 1494bool isCheckbox = Misc.IsBitSet(WindowStyle, NativeMethods.TVS_CHECKBOXES); 1534private void SimulateClick(NativeMethods.Win32Point pt) 1537Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1538Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1543NativeMethods.TVITEM treeItem; 1544if (WindowsTreeView.GetItem(_hwnd, _hItem, NativeMethods.TVIF_IMAGE | NativeMethods.TVIF_STATE, out treeItem))
MS\Internal\AutomationProxies\WindowsUpDown.cs (35)
61if(idObject == NativeMethods.OBJID_CLIENT 62&& eventId == NativeMethods.EventObjectInvoke 67else if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 87button?.DispatchEvents(NativeMethods.EventObjectInvoke, InvokePattern.InvokedEvent, idObject, idChild); 184NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SpinButtonItem.GetBoundingRectangle (_hwnd, item)); 223Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0)); 226Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 289IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 304int hr = Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc); 307return hr == NativeMethods.S_OK && acc != null ? acc.Role == AccessibleRole.SpinButton : false; 340int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 347return (double)NativeMethods.Util.LOWORD(pos); 353IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 377int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 378int min = NativeMethods.Util.HIWORD(range); 379int max = NativeMethods.Util.LOWORD(range); 391int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 392int min = NativeMethods.Util.HIWORD(range); 393int max = NativeMethods.Util.LOWORD(range); 530NativeMethods.Win32Rect updownRect = new NativeMethods.Win32Rect(); 539IntPtr center = NativeMethods.Util.MAKELPARAM (x, y); 542Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center); 543Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center); 558NativeMethods.Win32Rect updownRect = new NativeMethods.Win32Rect(); 620IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 633return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.UDS_HORZ);
MS\Internal\AutomationProxies\WinEventTracker.cs (57)
150NativeMethods.WinEventProcDef proc = new NativeMethods.WinEventProcDef (WinEventProc); 174hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); 243if (!((idObject == NativeMethods.OBJID_MENU || idObject == NativeMethods.OBJID_SYSMENU) && eventId == NativeMethods.EventObjectInvoke) && 523NativeMethods.EventSystemSound, 524NativeMethods.EventSystemAlert, 525NativeMethods.EventSystemForeground, 526NativeMethods.EventSystemMenuStart, 527NativeMethods.EventSystemMenuEnd, 528NativeMethods.EventSystemMenuPopupStart, 529NativeMethods.EventSystemMenuPopupEnd, 530NativeMethods.EventSystemCaptureStart, 531NativeMethods.EventSystemCaptureEnd, 532NativeMethods.EventSystemMoveSizeStart, 533NativeMethods.EventSystemMoveSizeEnd, 534NativeMethods.EventSystemContextHelpStart, 535NativeMethods.EventSystemContextHelpEnd, 536NativeMethods.EventSystemDragDropStart, 537NativeMethods.EventSystemDragDropEnd, 538NativeMethods.EventSystemDialogStart, 539NativeMethods.EventSystemDialogEnd, 540NativeMethods.EventSystemScrollingStart, 541NativeMethods.EventSystemScrollingEnd, 542NativeMethods.EventSystemSwitchEnd, 543NativeMethods.EventSystemMinimizeStart, 544NativeMethods.EventSystemMinimizeEnd, 545NativeMethods.EventSystemPaint, 546NativeMethods.EventConsoleCaret, 547NativeMethods.EventConsoleUpdateRegion, 548NativeMethods.EventConsoleUpdateSimple, 549NativeMethods.EventConsoleUpdateScroll, 550NativeMethods.EventConsoleLayout, 551NativeMethods.EventConsoleStartApplication, 552NativeMethods.EventConsoleEndApplication, 553NativeMethods.EventObjectCreate, 554NativeMethods.EventObjectDestroy, 555NativeMethods.EventObjectShow, 556NativeMethods.EventObjectHide, 557NativeMethods.EventObjectReorder, 558NativeMethods.EventObjectFocus, 559NativeMethods.EventObjectSelection, 560NativeMethods.EventObjectSelectionAdd, 561NativeMethods.EventObjectSelectionRemove, 562NativeMethods.EventObjectSelectionWithin, 563NativeMethods.EventObjectStateChange, 564NativeMethods.EventObjectLocationChange, 565NativeMethods.EventObjectNameChange, 566NativeMethods.EventObjectDescriptionChange, 567NativeMethods.EventObjectValueChange, 568NativeMethods.EventObjectParentChange, 569NativeMethods.EventObjectHelpChange, 570NativeMethods.EventObjectDefactionChange, 571NativeMethods.EventObjectAcceleratorChange, 572NativeMethods.EventObjectInvoke, 573NativeMethods.EventObjectTextSelectionChanged
MS\Internal\AutomationProxies\WinFormsSpinner.cs (5)
129IntPtr hwndFirstChild = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 136IntPtr hwndLastChild = Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDLAST); 143if (Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDNEXT) != hwndLastChild) 180if (Accessible.AccessibleObjectFromWindow(hwndSpin, NativeMethods.OBJID_CLIENT, ref acc) != NativeMethods.S_OK || acc == null)
MS\Win32\NativeMethods.cs (2)
1486internal static int comboboxInfoSize = Marshal.SizeOf(typeof(NativeMethods.COMBOBOXINFO)); 1888internal NativeMethods.Win32Point pt;
MS\Win32\SafeNativeMethods.cs (6)
19public static extern bool IntersectRect (ref NativeMethods.Win32Rect rcDest, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2); 29internal static extern bool UnionRect (out NativeMethods.Win32Rect rcDst, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2);
MS\Win32\UnsafeNativeMethods.cs (32)
20internal static extern int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf); 32internal static extern void GetSystemInfo(out NativeMethods.SYSTEM_INFO SystemInfo); 112internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags); 147public static extern bool GetMenuItemInfo(IntPtr hMenu, int uItem, bool fByPosition, [In, Out] ref NativeMethods.MENUITEMINFO menuItemInfo); 149public static extern bool GetMenuItemRect(IntPtr hWnd, IntPtr hMenu, int uItem, out NativeMethods.Win32Rect lprcItem); 157internal static extern IntPtr DispatchMessage([In] ref NativeMethods.MSG msg); 159internal static extern int GetMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hWnd, int uMsgFilterMin, int uMsgFilterMax); 161internal static extern bool PeekMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hwnd, int uMsgFilterMin, int uMsgFilterMax, int wRemoveMsg); 169internal static extern IntPtr SendMessageTimeout(IntPtr hwnd, int uMsg, IntPtr wParam, ref NativeMethods.Win32Rect lParam, int flags, int uTimeout, out IntPtr result); 175internal static extern bool TranslateMessage([In, Out] ref NativeMethods.MSG msg); 183internal static extern IntPtr MonitorFromRect(ref NativeMethods.Win32Rect rect, int dwFlags); 193internal static extern int SendInput (int nInputs, ref NativeMethods.INPUT ki, int cbSize); 226internal static extern bool GetComboBoxInfo(IntPtr hwnd, [In, Out] ref NativeMethods.COMBOBOXINFO cbInfo); 232internal static extern bool GetCursorPos([In, Out] ref NativeMethods.Win32Point pt); 234internal static extern bool GetPhysicalCursorPos([In, Out] ref NativeMethods.Win32Point pt); 246internal static extern bool GetScrollBarInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollBarInfo lpsi); 248internal static extern bool GetScrollInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollInfo lpsi); 254internal static extern unsafe bool EnumChildWindows(IntPtr hwndParent, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam); 260internal static extern bool GetClientRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect); 262internal static extern bool GetGUIThreadInfo(uint idThread, ref NativeMethods.GUITHREADINFO guiThreadInfo); 266internal static extern bool GetWindowRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect); 290internal NativeMethods.Win32Point ptStart; 324internal NativeMethods.Win32Rect rcTitleBar; 325[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = NativeMethods.CCHILDREN_TITLEBAR + 1)] 333internal NativeMethods.Win32Rect rcTitleBar; 334[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = NativeMethods.CCHILDREN_TITLEBAR + 1)] 336[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = NativeMethods.CCHILDREN_TITLEBAR + 1)] 337internal NativeMethods.Win32Rect[] rgrect; 355internal NativeMethods.Win32Rect rc; 386iResult = NativeMethods.IntPtrToInt32(result); 445public NativeMethods.Win32Point pt; 471public NativeMethods.Win32Point pt;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (4)
72public static extern bool GetMenuBarInfo (IntPtr hwnd, int idObject, uint idItem, ref NativeMethods.MENUBARINFO mbi); 75public static extern int GetTextExtentPoint32(IntPtr hdc, [MarshalAs(UnmanagedType.LPWStr)]string lpString, int cbString, out NativeMethods.SIZE lpSize); 84public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Rect rect, int cPoints); 87public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Point pt, int cPoints);