2220 references to NativeMethods
UIAutomationClientSideProviders (2220)
MS\Internal\AutomationProxies\Accessible.cs (53)
163IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject)); 171int hr = NativeMethods.S_FALSE; 211if(hr == NativeMethods.S_OK && acc != null) 218if (hr != NativeMethods.S_OK || acc == null) 272return Wrap(acc, NativeMethods.CHILD_SELF); 303return _idChild == NativeMethods.CHILD_SELF ? GetChildAt(_acc, null, 0) : null; 311return _idChild == NativeMethods.CHILD_SELF ? GetChildAt(_acc, null, Accessible.GetChildCount(_acc) - 1) : null; 380if (_idChild != NativeMethods.CHILD_SELF) 544NativeMethods.Win32Rect rcW32 = GetLocation(_acc, _idChild); 675if (childId == NativeMethods.CHILD_SELF) 729Debug.Assert(_idChild == NativeMethods.CHILD_SELF); 753if (idChild == NativeMethods.CHILD_SELF) 769rval = Wrap((IAccessible)scan, NativeMethods.CHILD_SELF); 802Select(NativeMethods.SELFLAG_TAKEFOCUS); 808Select(NativeMethods.SELFLAG_TAKEFOCUS|NativeMethods.SELFLAG_TAKESELECTION); 816Select(NativeMethods.SELFLAG_TAKEFOCUS|NativeMethods.SELFLAG_ADDSELECTION); 824Select(NativeMethods.SELFLAG_TAKEFOCUS|NativeMethods.SELFLAG_REMOVESELECTION); 842if ( result != NativeMethods.S_OK) 878if (hr != NativeMethods.S_OK || accObject == null) 880return NativeMethods.S_FALSE; 893return NativeMethods.S_FALSE; 915if (UnsafeNativeMethods.AccessibleChildren(accessibleObject, 0, childCount, aChildren, out childrenReturned) == NativeMethods.E_INVALIDARG) 1023NativeMethods.Win32Rect rect1 = GetLocation(_acc, _idChild); 1024NativeMethods.Win32Rect rect2 = GetLocation(acc, idChild); 1079idChild = NativeMethods.CHILD_SELF; 1107idChild = NativeMethods.CHILD_SELF; 1259internal static NativeMethods.Win32Rect GetLocation(IAccessible acc, int idChild) 1262NativeMethods.Win32Rect rect = NativeMethods.Win32Rect.Empty; 1277return NativeMethods.Win32Rect.Empty; 1329case NativeMethods.RPC_E_SERVERFAULT: // The server threw an exception. 1330case NativeMethods.RPC_E_DISCONNECTED: // The object invoked has disconnected from its clients. 1331case NativeMethods.RPC_E_UNAVAILABLE: // The server has disappeared 1332case NativeMethods.DISP_E_BADINDEX: // Index out of Range (Usually means Children have disappeared) 1333case NativeMethods.E_INTERFACEUNKNOWN: // The interface is unknown, usually because things have changed. 1334case NativeMethods.E_UNKNOWNWORDERROR: // An unknown Error code thrown by Word being closed while a search is running 1335case NativeMethods.RPC_E_SYS_CALL_FAILED: // System call failed during RPC. 1338case NativeMethods.E_FAIL: 1341case NativeMethods.E_MEMBERNOTFOUND: 1345case NativeMethods.E_NOTIMPL: 1349case NativeMethods.E_OUTOFMEMORY: 1356case NativeMethods.E_INVALIDARG: 1362case NativeMethods.E_ACCESSDENIED: 1366case NativeMethods.E_UNEXPECTED: 1413NativeMethods.Win32Rect ownLoc = GetLocation(old, NativeMethods.CHILD_SELF); 1414AccessibleRole ownRole = GetRole(old, NativeMethods.CHILD_SELF); 1430AccessibleRole role = GetRole(accChild, NativeMethods.CHILD_SELF); 1434NativeMethods.Win32Rect loc = GetLocation(accChild, NativeMethods.CHILD_SELF);
MS\Internal\AutomationProxies\ClickablePoint.cs (14)
53static internal bool GetPoint(IntPtr hwnd, ArrayList alIn, ArrayList alOut, 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, ArrayList alIn, ArrayList alOut) 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)
49internal NativeMethods.SIZE Size (int iPartId, int iStateId) 53NativeMethods.SIZE size = new NativeMethods.SIZE(0, 0); 73size.cx = UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXSIZE); 74size.cy = UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXSIZE); 78size.cx = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXVSCROLL); 79size.cy = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYHSCROLL); 83size.cx = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXHSCROLL); 84size.cy = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYVSCROLL); 91size.cx = UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXSIZE); 92size.cy = UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXSIZE); 202private static unsafe extern IntPtr GetThemePartSize(SafeThemeHandle hTheme, IntPtr hdc, int iPartId, int iStateId, IntPtr prc, int eSize, NativeMethods.SIZE* psz);
MS\Internal\AutomationProxies\CommonXSendMessage.cs (204)
401internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVITEM item) 409return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 415return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, 424return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 430internal static unsafe bool SetItem(IntPtr hwnd, int index, NativeMethods.LVITEM item) 438return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType())); 444return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 450return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 456internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.LVITEM_V6 item) 464fixed (NativeMethods.LVITEM_V6 *pItem = &item) 466return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 473bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 477item = (NativeMethods.LVITEM_V6)item32; 485bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 489item = (NativeMethods.LVITEM_V6)item64; 497internal static unsafe bool SetGroupInfo(IntPtr hwnd, NativeMethods.LVGROUP group) 505int result = XSendGetIndex(hwnd, NativeMethods.LVM_SETGROUPINFO, 512int result = XSendGetIndex(hwnd, NativeMethods.LVM_SETGROUPINFO, 519int result = XSendGetIndex(hwnd, NativeMethods.LVM_SETGROUPINFO, 527internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP group) 536fixed (NativeMethods.LVGROUP* pGroup = &group) 538result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 549int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 553group = (NativeMethods.LVGROUP)group32; 560int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 564group = (NativeMethods.LVGROUP)group64; 572internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP_V6 group) 581fixed (NativeMethods.LVGROUP_V6* pGroup = &group) 583result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 594int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 598group = (NativeMethods.LVGROUP_V6)group32; 605int result = XSendGetIndex(hwnd, NativeMethods.LVM_GETGROUPINFO, 609group = (NativeMethods.LVGROUP_V6)group64; 617internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP item) 631return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszHeader), item.cchHeader); 643return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszHeader), item32.cchHeader); 655return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszHeader), item64.cchHeader); 661internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP_V6 item, int mask) 672if (((mask & NativeMethods.LVGF_HEADER) == 0) && ((mask & NativeMethods.LVGF_SUBSET) == 0)) 680case NativeMethods.LVGF_HEADER: 685case NativeMethods.LVGF_SUBSET: 690return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true); 698case NativeMethods.LVGF_HEADER: 703case NativeMethods.LVGF_SUBSET: 708return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true); 716case NativeMethods.LVGF_HEADER: 721case NativeMethods.LVGF_SUBSET: 726return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), textAddress, size, true); 742internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TCITEM item) 750fixed (NativeMethods.TCITEM* pItem = &item) 752return XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 759bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 763item = (NativeMethods.TCITEM)item32; 772bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 776item = (NativeMethods.TCITEM)item64; 785internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.TCITEM item) 793return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 799return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), 808return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 824internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.HDITEM item) 832fixed (NativeMethods.HDITEM* pItem = &item) 834return XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 841bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 845item = (NativeMethods.HDITEM)item32; 854bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 858item = (NativeMethods.HDITEM)item64; 867internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.HDITEM item) 875return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 882hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), 890return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 906internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.TVITEM item) 914fixed (NativeMethods.TVITEM* pItem = &item) 916return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 923bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 927item = (NativeMethods.TVITEM)item32; 936bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 940item = (NativeMethods.TVITEM)item64; 949internal static unsafe bool SetItem(IntPtr hwnd, NativeMethods.TVITEM item) 957return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 963return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 969return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 983NativeMethods.Win32Point clientPoint = new NativeMethods.Win32Point(x, y); 988NativeMethods.TVHITTESTINFO hitTestInfo = 989new NativeMethods.TVHITTESTINFO(clientPoint.x, clientPoint.y, 0); 990if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo), 999if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo32), 1008if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo64), 1020internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TVITEM item) 1028return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1035hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), 1043return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1059internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TBBUTTON item) 1067fixed (NativeMethods.TBBUTTON* pItem = &item) 1069return XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()), ErrorValue.Zero); 1076bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), ErrorValue.Zero); 1080item = (NativeMethods.TBBUTTON)item32; 1089bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), ErrorValue.Zero); 1093item = (NativeMethods.TBBUTTON)item64; 1111internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TOOLINFO item) 1126hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item), 1134hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item32), 1143hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item64), 1171NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty; 1332private static string ListView_V6_GetGroupTextOnWinXp(IntPtr hwnd, NativeMethods.LVGROUP group) 1352XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1358using (SafeCoTaskMem copyTo = new SafeCoTaskMem(NativeMethods.MAX_PATH)) 1367if (Misc.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1400XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1406using (SafeCoTaskMem copyTo = new SafeCoTaskMem(NativeMethods.MAX_PATH)) 1415if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1448XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1454using (SafeCoTaskMem copyTo = new SafeCoTaskMem(NativeMethods.MAX_PATH)) 1463if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1561internal TCITEM_32(NativeMethods.TCITEM item) 1573static public explicit operator NativeMethods.TCITEM(TCITEM_32 item) 1575NativeMethods.TCITEM nativeItem = new NativeMethods.TCITEM 1603internal TCITEM_64(NativeMethods.TCITEM item) 1616static public explicit operator NativeMethods.TCITEM(TCITEM_64 item) 1618NativeMethods.TCITEM nativeItem = new NativeMethods.TCITEM 1649internal HDITEM_32(NativeMethods.HDITEM item) 1665static public explicit operator NativeMethods.HDITEM(HDITEM_32 item) 1667NativeMethods.HDITEM nativeItem = new NativeMethods.HDITEM 1702internal HDITEM_64(NativeMethods.HDITEM item) 1718static public explicit operator NativeMethods.HDITEM(HDITEM_64 item) 1720NativeMethods.HDITEM nativeItem = new NativeMethods.HDITEM 1754internal LVITEM_32(NativeMethods.LVITEM item) 1769static public explicit operator NativeMethods.LVITEM(LVITEM_32 item) 1771NativeMethods.LVITEM nativeItem = new NativeMethods.LVITEM 1805internal LVITEM_64(NativeMethods.LVITEM item) 1821static public explicit operator NativeMethods.LVITEM(LVITEM_64 item) 1823NativeMethods.LVITEM nativeItem = new NativeMethods.LVITEM 1859internal LVITEM_V6_32(NativeMethods.LVITEM_V6 item) 1877static public explicit operator NativeMethods.LVITEM_V6(LVITEM_V6_32 item) 1879NativeMethods.LVITEM_V6 nativeItem = new NativeMethods.LVITEM_V6 1920internal LVITEM_V6_64(NativeMethods.LVITEM_V6 item) 1940static public explicit operator NativeMethods.LVITEM_V6(LVITEM_V6_64 item) 1942NativeMethods.LVITEM_V6 nativeItem = new NativeMethods.LVITEM_V6 1978internal LVGROUP_32(NativeMethods.LVGROUP item) 1993static public explicit operator NativeMethods.LVGROUP(LVGROUP_32 item) 1995NativeMethods.LVGROUP nativeItem = new NativeMethods.LVGROUP 1997cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP)), 2044internal LVGROUP_V6_32(NativeMethods.LVGROUP_V6 item) 2075static public explicit operator NativeMethods.LVGROUP_V6(LVGROUP_V6_32 item) 2077NativeMethods.LVGROUP_V6 nativeItem = new NativeMethods.LVGROUP_V6 2079cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)), 2127internal LVGROUP_64(NativeMethods.LVGROUP item) 2143static public explicit operator NativeMethods.LVGROUP(LVGROUP_64 item) 2145NativeMethods.LVGROUP nativeItem = new NativeMethods.LVGROUP 2147cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP)), 2195internal LVGROUP_V6_64(NativeMethods.LVGROUP_V6 item) 2227static public explicit operator NativeMethods.LVGROUP_V6(LVGROUP_V6_64 item) 2229NativeMethods.LVGROUP_V6 nativeItem = new NativeMethods.LVGROUP_V6 2231cbSize = Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)), 2276internal TBBUTTON_32(NativeMethods.TBBUTTON item) 2289static public explicit operator NativeMethods.TBBUTTON(TBBUTTON_32 item) 2291NativeMethods.TBBUTTON nativeItem = new NativeMethods.TBBUTTON 2321internal TBBUTTON_64(NativeMethods.TBBUTTON item) 2335static public explicit operator NativeMethods.TBBUTTON(TBBUTTON_64 item) 2337NativeMethods.TBBUTTON nativeItem = new NativeMethods.TBBUTTON 2369internal TVITEM_32(NativeMethods.TVITEM item) 2389static public explicit operator NativeMethods.TVITEM(TVITEM_32 item) 2391NativeMethods.TVITEM nativeItem = new NativeMethods.TVITEM 2425internal TVITEM_64(NativeMethods.TVITEM item) 2441static public explicit operator NativeMethods.TVITEM(TVITEM_64 item) 2443NativeMethods.TVITEM nativeItem = new NativeMethods.TVITEM 2464internal NativeMethods.Win32Point pt; 2477static public explicit operator NativeMethods.TVHITTESTINFO(TVHITTESTINFO_32 hitTestInfo) 2479NativeMethods.TVHITTESTINFO nativeHitTestInfo = new NativeMethods.TVHITTESTINFO 2493internal NativeMethods.Win32Point pt; 2506static public explicit operator NativeMethods.TVHITTESTINFO(TVHITTESTINFO_64 hitTestInfo64) 2508NativeMethods.TVHITTESTINFO nativeHitTestInfo = new NativeMethods.TVHITTESTINFO 2525internal NativeMethods.Win32Rect rect; 2531internal TOOLINFO_32(NativeMethods.TOOLINFO item) 2544static public explicit operator NativeMethods.TOOLINFO(TOOLINFO_32 item) 2546NativeMethods.TOOLINFO nativeItem = new NativeMethods.TOOLINFO 2548cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO)), 2569internal NativeMethods.Win32Rect rect; 2575internal TOOLINFO_64(NativeMethods.TOOLINFO item) 2588static public explicit operator NativeMethods.TOOLINFO(TOOLINFO_64 item) 2590NativeMethods.TOOLINFO nativeItem = new NativeMethods.TOOLINFO 2592cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO)),
MS\Internal\AutomationProxies\EventManager.cs (28)
49case NativeMethods.OBJID_WINDOW: 59case NativeMethods.OBJID_CLIENT: 69case NativeMethods.OBJID_VSCROLL: 70case NativeMethods.OBJID_HSCROLL: 80case NativeMethods.OBJID_CARET: 90case NativeMethods.OBJID_SYSMENU: 91case NativeMethods.OBJID_MENU: 145if (eventId == NativeMethods.EventObjectStateChange) 156if (eventId == NativeMethods.EventObjectReorder) 164if (eventId == NativeMethods.EventObjectLocationChange) 175if (eventId == NativeMethods.EventObjectLocationChange) 316if (eventId == NativeMethods.EventObjectInvoke || 317eventId == NativeMethods.EventObjectStateChange || 318eventId == NativeMethods.EventObjectSelection && el is ListViewItem) 330if (eventId == NativeMethods.EventObjectStateChange) 342if (eventId == NativeMethods.EventSystemCaptureEnd ) 353if (eventId == NativeMethods.EventObjectInvoke) 365if (eventId == NativeMethods.EventObjectSelection || 366eventId == NativeMethods.EventObjectStateChange) 378if (eventId == NativeMethods.EventObjectSelectionAdd) 390if (eventId == NativeMethods.EventObjectSelectionRemove) 398if (eventId == NativeMethods.EventObjectCreate) 402else if (eventId == NativeMethods.EventObjectDestroy) 406else if ( eventId == NativeMethods.EventObjectReorder ) 452if (Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZE)) 456else if (Misc.IsBitSet(style, NativeMethods.WS_MINIMIZE)) 472if (eventId == NativeMethods.EventObjectLocationChange) 497else if (eventId == NativeMethods.EventObjectTextSelectionChanged)
MS\Internal\AutomationProxies\Input.cs (19)
81int vscreenWidth = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXVIRTUALSCREEN); 82int vscreenHeight = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYVIRTUALSCREEN); 83int vscreenLeft = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_XVIRTUALSCREEN); 84int vscreenTop = UnsafeNativeMethods.GetSystemMetrics( NativeMethods.SM_YVIRTUALSCREEN ); 109intflags |= NativeMethods.MOUSEEVENTF_VIRTUALDESK; 112NativeMethods.INPUT mi = new NativeMethods.INPUT 114type = NativeMethods.INPUT_MOUSE 129NativeMethods.INPUT ki = new NativeMethods.INPUT 131type = NativeMethods.INPUT_KEYBOARD 137dwFlags |= NativeMethods.KEYEVENTF_SCANCODE; 139dwFlags |= NativeMethods.KEYEVENTF_KEYUP; 143ki.union.keyboardInput.dwFlags |= NativeMethods.KEYEVENTF_EXTENDEDKEY; 157NativeMethods.INPUT ki = new NativeMethods.INPUT 159type = NativeMethods.INPUT_KEYBOARD 163ki.union.keyboardInput.dwFlags = press ? 0 : NativeMethods.KEYEVENTF_KEYUP; 166ki.union.keyboardInput.dwFlags |= NativeMethods.KEYEVENTF_EXTENDEDKEY;
MS\Internal\AutomationProxies\Misc.cs (131)
151internal static IntPtr DispatchMessage(ref NativeMethods.MSG msg) 161internal unsafe static bool EnumChildWindows(IntPtr hwnd, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam) 189StringBuilder sb = new StringBuilder(NativeMethods.MAX_PATH + 1); 191int result = UnsafeNativeMethods.GetClassName(hwnd, sb, NativeMethods.MAX_PATH); 228internal static bool GetClientRectInScreenCoordinates(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 230rc = NativeMethods.Win32Rect.Empty; 237NativeMethods.Win32Point leftTop = new NativeMethods.Win32Point(rc.left, rc.top); 243NativeMethods.Win32Point rightBottom = new NativeMethods.Win32Point(rc.right, rc.bottom); 249rc = new NativeMethods.Win32Rect(leftTop.x, leftTop.y, rightBottom.x, rightBottom.y); 253internal static bool GetClientRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 270internal static bool GetComboBoxInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbi) 283internal static bool GetCursorPos(ref NativeMethods.Win32Point pt) 314NativeMethods.GUITHREADINFO gui; 326NativeMethods.TOOLINFO tool = new NativeMethods.TOOLINFO(); 327tool.Init(Marshal.SizeOf(typeof(NativeMethods.TOOLINFO))); 387while ((peer = NativeMethodsSetLastError.GetWindow(peer, NativeMethods.GW_HWNDPREV)) != IntPtr.Zero) 392int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero); 393if ((code & NativeMethods.DLGC_STATIC) == NativeMethods.DLGC_STATIC) 408int style = UnsafeNativeMethods.GetWindowLong(peer, NativeMethods.GWL_STYLE, out error); 409if ((style & NativeMethods.WS_VISIBLE) != 0) 415if ((style & (NativeMethods.WS_GROUP | NativeMethods.WS_TABSTOP)) != 0) 423internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint item, ref NativeMethods.MENUBARINFO mbi) 449internal static bool GetMenuItemInfo(IntPtr hmenu, int item, bool byPosition, ref NativeMethods.MENUITEMINFO menuItemInfo) 462internal static bool GetMenuItemRect(IntPtr hwnd, IntPtr hmenu, int item, out NativeMethods.Win32Rect rc) 475internal static bool GetMessage(ref NativeMethods.MSG msg, IntPtr hwnd, int msgFilterMin, int msgFilterMax) 489internal static int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf) 504IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 515internal static bool GetScrollBarInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollBarInfo sbi) 528internal static bool GetScrollInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollInfo si) 548internal static int GetTextExtentPoint32(IntPtr hdc, string text, int length, out NativeMethods.SIZE size) 630int exstyle = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_EXSTYLE, out lastWin32Error); 644int id = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_ID, out lastWin32Error); 660int result = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_HWNDPARENT, out lastWin32Error); 670internal static bool GetWindowRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 686int style = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_STYLE, out lastWin32Error); 730NativeMethods.GUITHREADINFO gui; 731return (ProxyGetGUIThreadInfo(0, out gui) && (IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE))); 752hwnd = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 763return IsBitSet(exStyle, NativeMethods.WS_EX_LAYOUTRTL) || IsBitSet(exStyle, NativeMethods.WS_EX_RTLREADING); 768return IsBitSet(GetWindowExStyle(hwnd), NativeMethods.WS_EX_LAYOUTRTL); 773return IsBitSet(GetWindowExStyle(hwnd), NativeMethods.WS_EX_RTLREADING); 776internal static bool IntersectRect(ref NativeMethods.Win32Rect rcDest, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2) 811static internal bool IsItemVisible(IntPtr hwnd, ref NativeMethods.Win32Rect itemRect) 813NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect(0, 0, 0, 0); 817NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 824static internal bool IsItemVisible(ref NativeMethods.Win32Rect parentRect, ref NativeMethods.Win32Rect itemRect) 826NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 833static internal bool IsItemVisible(ref NativeMethods.Win32Rect parentRect, ref Rect itemRect) 835NativeMethods.Win32Rect itemRc = new NativeMethods.Win32Rect(itemRect); 836NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 843static internal bool IsItemVisible(ref Rect parentRect, ref NativeMethods.Win32Rect itemRect) 845NativeMethods.Win32Rect parentRc = new NativeMethods.Win32Rect(parentRect); 846NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 855NativeMethods.Win32Rect itemRc = new NativeMethods.Win32Rect(itemRect); 856NativeMethods.Win32Rect parentRc = new NativeMethods.Win32Rect(parentRect); 857NativeMethods.Win32Rect intersection = new NativeMethods.Win32Rect(0, 0, 0, 0); 872hwnd = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 891internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Rect rect, int cPoints) 916internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Point pt, int cPoints) 952NativeMethods.Win32Point ptPrevious = new NativeMethods.Win32Point(); 954bool mouseSwapped = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_SWAPBUTTON) != 0; 1005if (terminationEvent == NativeMethods.WAIT_FAILED) 1063int index = ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 1076internal static bool ProxyGetGUIThreadInfo(uint idThread, out NativeMethods.GUITHREADINFO gui) 1078gui = new NativeMethods.GUITHREADINFO(); 1169ProxySendMessage(hwnd, NativeMethods.WM_GETTEXT, (IntPtr)str.Capacity, str); 1197IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, NativeMethods.WM_GETTITLEBARINFOEX, IntPtr.Zero, ref ti, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1228NativeMethods.MENUBARINFO mbi; 1229bool retValue = WindowsMenu.GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi); 1328internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, ref NativeMethods.Win32Rect lParam) 1359internal static bool PtInRect(ref NativeMethods.Win32Rect rc, int x, int y) 1372NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(); 1410System.Text.StringBuilder className = new System.Text.StringBuilder(NativeMethods.MAX_PATH + 1); 1412uint result = UnsafeNativeMethods.RealGetWindowClass(hwnd, className, NativeMethods.MAX_PATH); 1463internal static int SendInput(int inputs, ref NativeMethods.INPUT ki, int size) 1568int result = MsgWaitForMultipleObjects(null, false, 2000, NativeMethods.QS_ALLINPUT); 1569if (result == NativeMethods.WAIT_FAILED || result == NativeMethods.WAIT_TIMEOUT) 1572NativeMethods.MSG msg = new NativeMethods.MSG(); 1585if (msg.message == NativeMethods.WM_HOTKEY && (short)msg.wParam == atom) 1617internal static IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags) 1717internal static bool UnionRect(out NativeMethods.Win32Rect rcDst, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2) 1856int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 1903NativeMethods.TOOLINFO tool = new NativeMethods.TOOLINFO(); 1904tool.Init(Marshal.SizeOf(typeof(NativeMethods.TOOLINFO))); 1911tool.uFlags = NativeMethods.TTF_IDISHWND; 1936NativeMethods.SYSTEM_INFO sysInfo; 1980if ((tiDL.rgstate[NativeMethods.INDEX_TITLEBAR_SELF] & (NativeMethods.STATE_SYSTEM_INVISIBLE | NativeMethods.STATE_SYSTEM_OFFSCREEN)) != 0) 1990int buttonWidth = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXSIZE) - 1; 1991int buttonHeight = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSIZE) - 1; 1993Rect[] rects = new Rect[NativeMethods.CCHILDREN_TITLEBAR + 1]; 2007for (int i = NativeMethods.INDEX_TITLEBAR_MAC; i > NativeMethods.INDEX_TITLEBAR_SELF; i--) 2009if ((tiDL.rgstate[i] & NativeMethods.STATE_SYSTEM_INVISIBLE) == 0) 2023for (int i = NativeMethods.INDEX_TITLEBAR_MAC; i > NativeMethods.INDEX_TITLEBAR_SELF; i--) 2025if ((tiDL.rgstate[i] & NativeMethods.STATE_SYSTEM_INVISIBLE) == 0) 2051if ((ti.rgstate[NativeMethods.INDEX_TITLEBAR_SELF] & (NativeMethods.STATE_SYSTEM_INVISIBLE | NativeMethods.STATE_SYSTEM_OFFSCREEN)) != 0) 2056Rect[] rects = new Rect[NativeMethods.CCHILDREN_TITLEBAR + 1]; 2057for (int i = 0; i <= NativeMethods.CCHILDREN_TITLEBAR; i++) 2060if ((ti.rgstate[i] & NativeMethods.STATE_SYSTEM_INVISIBLE) != 0) 2084private const int _sendMessageFlags = NativeMethods.SMTO_BLOCK;
MS\Internal\AutomationProxies\MSAAEventDispatcher.cs (22)
28: base(NativeMethods.EVENT_OBJECT_CREATE, NativeMethods.EVENT_OBJECT_ACCELERATORCHANGE) 169if (idObject <= NativeMethods.OBJID_WINDOW 170&& idObject != NativeMethods.OBJID_CLIENT) 185case NativeMethods.EVENT_OBJECT_CREATE: 186case NativeMethods.EVENT_OBJECT_SHOW: 188case NativeMethods.EVENT_OBJECT_HIDE: 189case NativeMethods.EVENT_OBJECT_REORDER: 193case NativeMethods.EVENT_OBJECT_PARENTCHANGE: 198case NativeMethods.EVENT_OBJECT_LOCATIONCHANGE: 203case NativeMethods.EVENT_OBJECT_NAMECHANGE: 207case NativeMethods.EVENT_OBJECT_SELECTION: 211case NativeMethods.EVENT_OBJECT_SELECTIONADD: 215case NativeMethods.EVENT_OBJECT_SELECTIONREMOVE: 227case NativeMethods.EVENT_OBJECT_VALUECHANGE: 231case NativeMethods.EVENT_OBJECT_HELPCHANGE: 268return idObject == NativeMethods.OBJID_CLIENT && idChild == NativeMethods.CHILD_SELF; 328case NativeMethods.EVENT_OBJECT_CREATE: 329case NativeMethods.EVENT_OBJECT_SHOW: 350case NativeMethods.EVENT_OBJECT_HIDE: 362Debug.Assert(eventId == NativeMethods.EVENT_OBJECT_REORDER);
MS\Internal\AutomationProxies\MSAANativeProvider.cs (6)
158int index = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 189if (idObject == NativeMethods.OBJID_CLIENT && idChild == NativeMethods.CHILD_SELF) 1081_knownRoot = (MsaaNativeProvider)Create(_hwnd, NativeMethods.CHILD_SELF, NativeMethods.OBJID_CLIENT); 1173if (childAcc.ChildId != NativeMethods.CHILD_SELF)
MS\Internal\AutomationProxies\MSAAWinEventWrap.cs (3)
171_winEventProc = new NativeMethods.WinEventProcDef(WinEventReentrancyFilter); 176_fFlags = NativeMethods.WINEVENT_OUTOFCONTEXT; 223private NativeMethods.WinEventProcDef _winEventProc; // the callback handed to USER for WinEvents
MS\Internal\AutomationProxies\NonClientArea.cs (57)
84return new int[] { NativeMethods.EventObjectStateChange }; 111NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect(); 112NativeMethods.Win32Rect windowRect = new NativeMethods.Win32Rect(); 186case NativeMethods.OBJID_WINDOW: 190case NativeMethods.OBJID_HSCROLL : 191case NativeMethods.OBJID_VSCROLL : 195case NativeMethods.OBJID_CLIENT: 199case NativeMethods.OBJID_SYSMENU: 200case NativeMethods.OBJID_MENU: 209int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 213case NativeMethods.HTHSCROLL: 219case NativeMethods.HTVSCROLL: 225case NativeMethods.HTCAPTION : 226case NativeMethods.HTMINBUTTON : 227case NativeMethods.HTMAXBUTTON : 228case NativeMethods.HTHELP : 229case NativeMethods.HTCLOSE : 230case NativeMethods.HTSYSMENU : 234case NativeMethods.HTGROWBOX: 237case NativeMethods.HTBOTTOMRIGHT: 240case NativeMethods.HTBOTTOMLEFT: 243case NativeMethods.HTMENU: 246case NativeMethods.HTLEFT: 247case NativeMethods.HTRIGHT: 248case NativeMethods.HTTOP: 249case NativeMethods.HTTOPLEFT: 250case NativeMethods.HTTOPRIGHT: 251case NativeMethods.HTBOTTOM: 252case NativeMethods.HTBORDER: 466return new WindowsListViewScrollBar (_hwnd, this, (int) item, NativeMethods.SB_HORZ); 468return new WindowsScrollBar (_hwnd, this, (int) item, NativeMethods.SB_HORZ); 478return new WindowsListViewScrollBar (_hwnd, this, (int) item, NativeMethods.SB_VERT); 480return new WindowsScrollBar (_hwnd, this, (int) item, NativeMethods.SB_VERT); 502if (Misc.IsBitSet(style, NativeMethods.WS_VSCROLL) && Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) 524if (!Misc.IsBitSet(style, NativeMethods.WS_CHILD)) 661if ((idProp == ScrollPattern.VerticalScrollPercentProperty && idObject != NativeMethods.OBJID_VSCROLL) || 662(idProp == ScrollPattern.HorizontalScrollPercentProperty && idObject != NativeMethods.OBJID_HSCROLL)) 673NonClientItem item = idObject == NativeMethods.OBJID_HSCROLL ? NonClientItem.HScrollBar : NonClientItem.VScrollBar; 674int sbFlag = idObject == NativeMethods.OBJID_HSCROLL ? NativeMethods.SB_HORZ : NativeMethods.SB_VERT; 685if (eventId == NativeMethods.EventObjectStateChange && idProp == ValuePattern.IsReadOnlyProperty) 698if (idObject == NativeMethods.OBJID_HSCROLL || idObject == NativeMethods.OBJID_VSCROLL) 700idObject = NativeMethods.OBJID_WINDOW; 707if (idProp == ValuePattern.ValueProperty && eventId == NativeMethods.EVENT_OBJECT_VALUECHANGE) 709NonClientItem item = idObject == NativeMethods.OBJID_HSCROLL ? NonClientItem.HScrollBar : NonClientItem.VScrollBar; 710WindowsScrollBar scrollBar = new WindowsScrollBar(hwnd, el, (int)item, idObject == NativeMethods.OBJID_HSCROLL ? NativeMethods.SB_HORZ : NativeMethods.SB_VERT); 711scrollBar.DispatchEvents(0, ValuePattern.ValueProperty, NativeMethods.OBJID_CLIENT, 0); 727if (eventId == NativeMethods.EventObjectNameChange) 730if (Misc.IsBitSet(style, NativeMethods.WS_CHILD))
MS\Internal\AutomationProxies\ProxyHwnd.cs (34)
165name = GetAccessibleName(NativeMethods.CHILD_SELF); 202name = GetAccessibleName(NativeMethods.CHILD_SELF); 240NativeMethods.Win32Rect parentRect = NativeMethods.Win32Rect.Empty; 354return new int [] { NativeMethods.EventObjectFocus }; 358return new int[] { NativeMethods.EventObjectNameChange }; 362return new int[] { NativeMethods.EventObjectValueChange }; 366return new int[] { NativeMethods.EventObjectLocationChange }; 370return new int [] { NativeMethods.EventObjectStateChange, 371NativeMethods.EventObjectShow, 372NativeMethods.EventObjectHide}; 381return new int [] { NativeMethods.EventObjectValueChange }; 385return new int [] { NativeMethods.EventObjectSelectionAdd, 386NativeMethods.EventObjectSelectionRemove, 387NativeMethods.EventObjectSelection}; 391return new int[] { NativeMethods.EventSystemCaptureEnd, 392NativeMethods.EventObjectStateChange }; 409new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectSelection, idEvent), 410new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectStateChange, idEvent) 420new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectSelectionAdd, idEvent), 421new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectSelection, idEvent) 426idWinEvent = NativeMethods.EventObjectSelectionRemove; 430idWinEvent = NativeMethods.EventObjectSelectionWithin; 436new WinEventTracker.EvtIdProperty (NativeMethods.EventSystemCaptureEnd, idEvent), // For SysHeaders 437new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectStateChange, idEvent), 438new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectValueChange, idEvent), // For WindowsScrollBarBits 439new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectInvoke, idEvent) 446new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectCreate, idEvent), 447new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectDestroy, idEvent), 448new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectReorder, idEvent) 455new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectLocationChange, idEvent), 456new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectTextSelectionChanged, idEvent) 473NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect ();
MS\Internal\AutomationProxies\ProxySimple.cs (14)
97NativeMethods.Win32Rect controlRectangle = NativeMethods.Win32Rect.Empty; 222NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 283if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_TABSTOP)) 329NativeMethods.Win32Rect itemWin32Rect = new NativeMethods.Win32Rect(itemRect); 569internal bool GetClickablePoint(out NativeMethods.Win32Point pt, bool fClipClientRect) 571NativeMethods.Win32Rect rcItem = new NativeMethods.Win32Rect(BoundingRectangle); 577NativeMethods.Win32Rect rcOutside = new NativeMethods.Win32Rect(); 639_IAccessible = Accessible.AccessibleObjectFromWindow(_hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK ? acc.IAccessible : null;
MS\Internal\AutomationProxies\QueueProcessor.cs (8)
96NativeMethods.MSG msg = new NativeMethods.MSG(); 103while (UnsafeNativeMethods.PeekMessage (ref msg, IntPtr.Zero, 0, 0, NativeMethods.PM_REMOVE)) 105if (msg.message == NativeMethods.WM_QUIT) 125int result = Misc.MsgWaitForMultipleObjects(handle, false, NativeMethods.INFINITE, NativeMethods.QS_ALLINPUT); 126if (result == NativeMethods.WAIT_FAILED || result == NativeMethods.WAIT_TIMEOUT)
MS\Internal\AutomationProxies\SafeProcessHandle.cs (4)
33SetHandle(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)
31return !IsInvalid ? CloseThemeData(handle) == (IntPtr)NativeMethods.S_OK : true;
MS\Internal\AutomationProxies\WindowsAltTab.cs (11)
79if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 126NativeMethods.Win32Point pt = new NativeMethods.Win32Point(x, y); 130NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect(); 373private NativeMethods.Win32Rect GetBoundingRect() 380NativeMethods.Win32Point ptStart = this._altTab._altTabInfo.ptStart; 384NativeMethods.Win32Rect itemRect = 385new NativeMethods.Win32Rect(left, top, left + cxItem, top + cyItem); 390itemRect = NativeMethods.Win32Rect.Empty;
MS\Internal\AutomationProxies\WindowsButton.cs (53)
105style = Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK; 109case NativeMethods.BS_PUSHBUTTON: 110case NativeMethods.BS_DEFPUSHBUTTON: 111case NativeMethods.BS_OWNERDRAW: 112case NativeMethods.BS_SPLITBUTTON: // explore back and forward buttons 116case NativeMethods.BS_CHECKBOX: 117case NativeMethods.BS_AUTOCHECKBOX: 118case NativeMethods.BS_3STATE: 119case NativeMethods.BS_AUTO3STATE: 123case NativeMethods.BS_RADIOBUTTON: 124case NativeMethods.BS_AUTORADIOBUTTON: 128case NativeMethods.BS_GROUPBOX: 149if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 172eventId = NativeMethods.EventObjectSelectionRemove; 191int state = Misc.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero); 192if (Misc.IsBitSet(state, NativeMethods.BST_PUSHED) 193&& eventId == NativeMethods.EventObjectStateChange) 198else if(eventId == NativeMethods.EventObjectInvoke) 293new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectInvoke, idEvent) 322Accessible.AccessibleObjectFromWindow(hwndRadioButton, NativeMethods.OBJID_CLIENT, ref accRadioButton) != NativeMethods.S_OK || 332new WindowsButton(hwndRadioButton, null, ButtonType.RadioButton, Misc.GetWindowStyle(hwndRadioButton) & NativeMethods.BS_TYPEMASK, accRadioButton) 397if (Accessible.AccessibleObjectFromWindow(hwndParent, NativeMethods.OBJID_CLIENT, ref accParent) != NativeMethods.S_OK || accParent == null) 404return new WindowsButton(hwndParent, null, ButtonType.GroupBox, Misc.GetWindowStyle(hwndParent) & NativeMethods.BS_TYPEMASK, accParent); 481case NativeMethods.BS_PUSHBUTTON: 482case NativeMethods.BS_DEFPUSHBUTTON: 483case NativeMethods.BS_PUSHBOX: 484case NativeMethods.BS_OWNERDRAW: 485case NativeMethods.BS_USERBUTTON: 486case NativeMethods.BS_CHECKBOX: 487case NativeMethods.BS_AUTOCHECKBOX: 488case NativeMethods.BS_RADIOBUTTON: 489case NativeMethods.BS_AUTORADIOBUTTON: 490case NativeMethods.BS_3STATE: 491case NativeMethods.BS_AUTO3STATE: 492case NativeMethods.BS_SPLITBUTTON: // explore back and forward buttons 498Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 512Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 519Misc.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true); 605if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_CHILD)) 611hwndParent = Misc.GetWindow(hwndRoot, NativeMethods.GW_OWNER); 644int state = Misc.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero); 645if (Misc.IsBitSet(state, NativeMethods.BST_CHECKED)) 649else if (Misc.IsBitSet(state, NativeMethods.BST_INDETERMINATE)) 669Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindRadioButtonChild), (void*)&radiobuttonChildFound); 683if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK && 707Misc.EnumChildWindows(_hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindSelectedRadioButtonChild), (void*)&selectedRadiobutton); 723if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK &&
MS\Internal\AutomationProxies\WindowsComboBox.cs (61)
118NativeMethods.Win32Rect rcCombo = new NativeMethods.Win32Rect (base.BoundingRectangle); 124NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 128NativeMethods.Win32Rect rcList = NativeMethods.Win32Rect.Empty; 250NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 266NativeMethods.Win32Rect rcList = NativeMethods.Win32Rect.Empty; 294NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 331NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 375NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 391IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.CBN_EDITUPDATE)); 393Misc.ProxySendMessage(hwndParent, NativeMethods.WM_COMMAND, wParam, _hwnd); 485return (NativeMethods.CBS_SIMPLE == _comboType); 491return (NativeMethods.CBS_DROPDOWNLIST == _comboType); 508IntPtr hwndEx = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 519static internal bool GetComboInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbInfo) 536if (cbInfo.hwndItem == IntPtr.Zero && IsComboEx (NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT))) 549cbInfo.rcItem = NativeMethods.Win32Rect.Empty; 560return Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0; 567NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 575Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 580Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 636return (Misc.GetWindowStyle(hwnd) & NativeMethods.CBS_COMBOTYPEMASK); 642NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 644if (GetComboInfo(_hwnd, ref cbInfo) && cbInfo.stateButton != NativeMethods.STATE_SYSTEM_INVISIBLE) 655NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 696index = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 703int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 717return XSendMessage.GetItemText(hwnd, NativeMethods.WM_USER + NativeMethods.CB_GETLBTEXT, index, len); 721return Misc.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len); 754case NativeMethods.OBJID_CLIENT : 756if (eventId == NativeMethods.EventObjectStateChange && idChild == 2) 763NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 765if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && Misc.IsBitSet(NativeMethods.STATE_SYSTEM_PRESSED, cbInfo.stateButton)) 790IntPtr hwndCombo = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 830editPortionEvents[c]._evtId = (p == ValuePattern.ValueProperty) ? NativeMethods.EventObjectValueChange : NativeMethods.EventObjectStateChange; 915NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize);
MS\Internal\AutomationProxies\WindowsContainer.cs (5)
128return Misc.IsBitSet(style, NativeMethods.WS_CAPTION) || 129Misc.IsBitSet(style, NativeMethods.WS_POPUP); 137return Misc.IsBitSet(style, NativeMethods.DS_CONTROL) && 138Misc.IsBitSet(style, NativeMethods.WS_CHILD) && 139Misc.IsBitSet(exstyle, NativeMethods.WS_EX_CONTROLPARENT);
MS\Internal\AutomationProxies\WindowsEditBox.cs (68)
90if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 105IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 270if (Misc.IsBitSet(styles, NativeMethods.ES_READONLY)) 276if (Misc.IsBitSet(styles, NativeMethods.ES_NUMBER)) 290int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 298result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 351NativeMethods.Win32Point clientLocation = (NativeMethods.Win32Point)screenLocation; 360NativeMethods.Win32Rect clientRect = new NativeMethods.Win32Rect(); 435internal void CharFromPos(NativeMethods.Win32Point point, out ushort indexLowWord, out ushort lineLowWord) 443IntPtr lParam = NativeMethods.Util.MAKELPARAM(point.x, point.y); 444int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam); 445indexLowWord = unchecked((ushort)(NativeMethods.Util.LOWORD(result))); 446lineLowWord = unchecked((ushort)(NativeMethods.Util.HIWORD(result))); 450internal int CharFromPosEx(NativeMethods.Win32Point point) 496if (Misc.IsBitSet(style, NativeMethods.ES_PASSWORD)) 500else if (Misc.IsBitSet(style, NativeMethods.ES_MULTILINE)) 504else if (Misc.IsBitSet(style, NativeMethods.ES_AUTOHSCROLL)) 516return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 523return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 529IntPtr result = Misc.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero); 537result = UnsafeNativeMethods.GetStockObject(NativeMethods.SYSTEM_FONT); 546return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero); 549internal NativeMethods.LOGFONT GetLogfont() 553NativeMethods.LOGFONT logfont = new NativeMethods.LOGFONT(); 554int cb = Marshal.SizeOf(typeof(NativeMethods.LOGFONT)); 565NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect(); 566Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect); 574Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETSEL, out start, out end); 586return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero); 594NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect(); 598NativeMethods.SIZE size; 602NativeMethods.Win32Point ptStart = new NativeMethods.Win32Point((int)(rect.left + size.cx / 4), (int)(rect.top + size.cy / 4)); 603NativeMethods.Win32Point ptEnd = new NativeMethods.Win32Point((int)(rect.right - size.cx / 8), (int)(rect.bottom - size.cy / 4)); 672return (!SafeNativeMethods.IsWindowEnabled(WindowHandle) || Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 681return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero); 687int index = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero); 694return 0 != Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical); 702if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_VSCROLL)) 705NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 707cbSize = System.Runtime.InteropServices.Marshal.SizeOf(typeof(NativeMethods.ScrollInfo)), 708fMask = NativeMethods.SIF_ALL 710bool ok = Misc.GetScrollInfo(WindowHandle, NativeMethods.SB_VERT, ref si); 719NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect(); 723NativeMethods.SIZE size; 743int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero); 748int x = (int)((short)NativeMethods.Util.LOWORD(result)); 749int y = (int)((short)NativeMethods.Util.HIWORD(result)); 782NativeMethods.SIZE size; 804Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end); 845private int GetTextExtentPoint32(string text, out NativeMethods.SIZE size) 891IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 899NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 911IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 927IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 943IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 972int i = NativeMethods.Util.MAKELONG((int)lowWord, (int)hiWord);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (13)
239NativeMethods.Win32Point w32point; 725if (Misc.IsBitSet(style, NativeMethods.ES_CENTER)) 729else if (Misc.IsBitSet(style, NativeMethods.ES_RIGHT)) 742return Misc.IsBitSet(style, NativeMethods.ES_UPPERCASE) ? CapStyle.AllCap : CapStyle.None; 756return SafeNativeMethods.GetSysColor(NativeMethods.COLOR_WINDOW); 760private static object GetFontName(NativeMethods.LOGFONT logfont) 766private static object GetFontSize(NativeMethods.LOGFONT logfont) 775int lpy = UnsafeNativeMethods.GetDeviceCaps(hdc, NativeMethods.LOGPIXELSY); 781private static object GetFontWeight(NativeMethods.LOGFONT logfont) 791return SafeNativeMethods.GetSysColor(NativeMethods.COLOR_WINDOWTEXT); 795private static object GetItalic(NativeMethods.LOGFONT logfont) 801private static object GetStrikethroughStyle(NativeMethods.LOGFONT logfont) 807private static object GetUnderlineStyle(NativeMethods.LOGFONT logfont)
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (9)
31if (Accessible.AccessibleObjectFromWindow(hwnd, idObject, ref acc) != NativeMethods.S_OK || acc == null) 51return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 59return idChild == NativeMethods.CHILD_SELF ? sb : sb.CreateStatusBarPane(idChild); 77if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) != NativeMethods.S_OK || acc == null) 85return new WindowsButton(hwnd, null, WindowsButton.ButtonType.CheckBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 88return new WindowsButton(hwnd, null, WindowsButton.ButtonType.GroupBox, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 91return new WindowsButton(hwnd, null, WindowsButton.ButtonType.PushButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc); 94return new WindowsButton(hwnd, null, WindowsButton.ButtonType.RadioButton, Misc.GetWindowStyle(hwnd) & NativeMethods.BS_TYPEMASK, acc);
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (5)
51if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 77return new WinEventTracker.EvtIdProperty[1] { new WinEventTracker.EvtIdProperty(NativeMethods.EventSystemCaptureEnd, idEvent) }; 125NativeMethods.Win32Point pt = new NativeMethods.Win32Point();
MS\Internal\AutomationProxies\WindowsGrip.cs (13)
50NativeMethods.Win32Rect client = new NativeMethods.Win32Rect(); 53NativeMethods.SIZE sizeGrip = GetGripSize(_hwnd, false); 83NativeMethods.Win32Rect client = new NativeMethods.Win32Rect(); 96NativeMethods.SIZE sizeGrip = GetGripSize(hwnd, onStatusBar); 108int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 110return hit == NativeMethods.HTBOTTOMLEFT; 116int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 118return hit == NativeMethods.HTBOTTOMRIGHT; 122internal static NativeMethods.SIZE GetGripSize(IntPtr hwnd, bool onStatusBar)
MS\Internal\AutomationProxies\WindowsHyperlink.cs (27)
62if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 133return new WinEventTracker.EvtIdProperty[1] { new WinEventTracker.EvtIdProperty(NativeMethods.EventSystemCaptureEnd, idEvent) }; 207HitTestInfo.item.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE; 209HitTestInfo.item.stateMask = NativeMethods.LIS_ENABLED; 216bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 239if (Misc.IsBitSet(_linkItem.state, NativeMethods.LIS_FOCUSED)) 272_linkItem.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE; 275_linkItem.stateMask = NativeMethods.LIS_ENABLED; 281return XSendMessage.XSend(_hwnd, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM)); 391mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE, 393stateMask = NativeMethods.LIS_FOCUSED, 394state = NativeMethods.LIS_FOCUSED 400return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 440NativeMethods.Win32Rect BoundingRect = NativeMethods.Win32Rect.Empty; 488HitTestInfo.item.mask = NativeMethods.LIF_ITEMINDEX | NativeMethods.LIF_STATE; 490HitTestInfo.item.stateMask = NativeMethods.LIS_ENABLED; 497bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 509Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 510Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (8)
62if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 138Misc.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4)); 243IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 252hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 260IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 263hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT); 381Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
MS\Internal\AutomationProxies\WindowsListBox.cs (90)
73if (Misc.IsBitSet(style, NativeMethods.LBS_COMBOBOX)) 76NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 113case NativeMethods.OBJID_WINDOW: 117case NativeMethods.OBJID_CLIENT: 121case NativeMethods.OBJID_VSCROLL : 122case NativeMethods.OBJID_HSCROLL : 286NativeMethods.Win32Rect listboxrect = new NativeMethods.Win32Rect (); 291int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top)); 292if (NativeMethods.Util.HIWORD(ret) == 0) 294int index = NativeMethods.Util.LOWORD(ret); 306int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero); 308if (index != NativeMethods.LB_ERR) 381return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0; 404return new int[] { NativeMethods.EventObjectSelection }; 431return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero); 451if ((eventId == NativeMethods.EventObjectSelection || eventId == NativeMethods.EventObjectSelectionAdd) && (idProp as AutomationProperty) == SelectionPattern.IsSelectionRequiredProperty) 454WinEventTracker.EvtIdProperty[] aEvtIdProperties = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectSelection, SelectionPattern.IsSelectionRequiredProperty) }; 459else if (eventId == NativeMethods.EventObjectSelection || eventId == NativeMethods.EventObjectSelectionRemove || eventId == NativeMethods.EventObjectSelectionAdd) 465if (eventId == NativeMethods.EventObjectSelection && isMultipleSelection && wlb.HasOtherSelections(idChild - 1)) 467eventId = NativeMethods.EventObjectSelectionAdd; 472if ((eventId == NativeMethods.EventObjectSelectionRemove || eventId == NativeMethods.EventObjectSelectionAdd) && 478eventId = NativeMethods.EventObjectSelection; 482if (selection != NativeMethods.LB_ERR) 497(eventId == NativeMethods.EventObjectDestroy || eventId == NativeMethods.EventObjectCreate)) 515if ((eventId == NativeMethods.EventObjectShow || eventId == NativeMethods.EventObjectHide) && 518if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LBS_COMBOBOX)) 521NativeMethods.COMBOBOXINFO cbInfo = new NativeMethods.COMBOBOXINFO(NativeMethods.comboboxInfoSize); 551return NativeMethods.LB_ERR; 556int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero); 557return result != NativeMethods.LB_ERR ? result : 0; 597return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 605return (0 != (WindowStyle & (NativeMethods.LBS_MULTIPLESEL | NativeMethods.LBS_EXTENDEDSEL))); 612return ((WindowStyle & NativeMethods.LBS_OWNERDRAWFIXED) == NativeMethods.LBS_OWNERDRAWFIXED) && 613((WindowStyle & NativeMethods.LBS_WANTKEYBOARDINPUT) == NativeMethods.LBS_WANTKEYBOARDINPUT); 720int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 731return XSendMessage.GetItemText(_hwnd, NativeMethods.WM_USER + NativeMethods.LB_GETTEXT, _item, iTextLen); 735string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen); 933Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 979return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 988SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item)); 992SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 995return NativeMethods.LB_ERR != SendMessageResult; 1007return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR; 1032return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item; 1036return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1050private NativeMethods.Win32Rect BoundingRect() 1052NativeMethods.Win32Rect itemRect = new NativeMethods.Win32Rect(); 1053Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect); 1054return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty; 1076if (((int)accChild.get_accState(NativeMethods.CHILD_SELF) & NativeMethods.STATE_SYSTEM_CHECKED) == NativeMethods.STATE_SYSTEM_CHECKED) 1080else if (((int)accChild.get_accState(NativeMethods.CHILD_SELF) & NativeMethods.STATE_SYSTEM_MIXED) == NativeMethods.STATE_SYSTEM_MIXED) 1098NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 1122Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item)); 1127Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1130success = (NativeMethods.LB_ERR != sendMessageResult); 1138if (Misc.IsBitSet(listBoxStyle, NativeMethods.LBS_NOTIFY)) 1143new IntPtr(NativeMethods.Util.MAKELONG( 1144idListBox, NativeMethods.LBN_SELCHANGE)); 1149hwndListBoxParent, NativeMethods.WM_COMMAND, wParam, _hwnd); 1157Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1158success = (NativeMethods.LB_ERR != sendMessageResult); 1162IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.LBN_SELCHANGE)); 1165Misc.ProxySendMessageInt(combo._hwnd, NativeMethods.WM_COMMAND, wParam, _hwnd); 1181return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (138)
61_groupEvents [0]._evtId = NativeMethods.EventObjectReorder; 62_groupEvents [1]._evtId = NativeMethods.EventObjectHide; 63_groupEvents [2]._evtId = NativeMethods.EventObjectDestroy; 115case NativeMethods.OBJID_CLIENT : 121case NativeMethods.OBJID_WINDOW : 124if ((eventId == NativeMethods.EventObjectReorder) && (idProp as AutomationEvent) == AutomationElement.StructureChangedEvent) 135case NativeMethods.OBJID_VSCROLL: 136case NativeMethods.OBJID_HSCROLL: 412NativeMethods.Win32Rect rc = manager.GetGroupRcByIndex (i); 423NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest(_hwnd, new NativeMethods.Win32Point(x, y)); 430else if (hitTest.flags == NativeMethods.LVHT_NOWHERE && IsDetailMode(_hwnd)) 437int xAdjustment = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXBORDER) + UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXFRAME); 448hitTest = WindowsListView.SubitemHitTest(_hwnd, new NativeMethods.Win32Point(x, y)); 472int index = GetItemNext(_hwnd, -1, NativeMethods.LVNI_FOCUSED); 499WinEventTracker.EvtIdProperty[] aEvents = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectCreate, TablePattern.ColumnHeadersProperty) }; 508WinEventTracker.EvtIdProperty[] aEvents = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectSelection, eventId) }; 528WinEventTracker.EvtIdProperty[] aEvents = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectCreate, TablePattern.ColumnHeadersProperty) }; 537WinEventTracker.EvtIdProperty[] aEvents = new WinEventTracker.EvtIdProperty[] { new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectSelection, eventId) }; 563for (int itemPos = GetItemNext(_hwnd, -1, NativeMethods.LVNI_SELECTED); itemPos != -1; itemPos = GetItemNext(_hwnd, itemPos, NativeMethods.LVNI_SELECTED)) 624int cx = NativeMethods.Util.LOWORD (size) /*- 2 * UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXBORDER)*/; 625int cy = NativeMethods.Util.HIWORD (size) /*- 2 * UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CYBORDER)*/; 629bool fHz = SetScrollPercent (horizontalPercent, NativeMethods.SB_HORZ, cx, out dx); 630bool fVt = SetScrollPercent (verticalPercent, NativeMethods.SB_VERT, cy, out dy); 650SetScrollPercent(horizontalPercent, NativeMethods.SB_HORZ, cx, out dx); 651SetScrollPercent(verticalPercent, NativeMethods.SB_VERT, cy, out dy); 879return SetItemState(hwnd, item, NativeMethods.LVIS_FOCUSED, NativeMethods.LVIS_FOCUSED); 885int state = GetItemState(hwnd, item, NativeMethods.LVIS_FOCUSED); 887return (Misc.IsBitSet(state, NativeMethods.LVIS_FOCUSED)); 898if (view == NativeMethods.LV_VIEW_TILE) 903if (InReportView(hwnd) || (view == NativeMethods.LV_VIEW_DETAILS)) 930if (ListViewList(hwnd) || (NativeMethods.LV_VIEW_LIST == ListViewGetView(hwnd))) 1003int nextItem = GetItemNext(hwnd, curItem, NativeMethods.LVNI_TORIGHT); 1046NativeMethods.Win32Point pt = new NativeMethods.Win32Point (0, 0); 1058int next = GetItemNext(hwnd, current, NativeMethods.LVNI_BELOW); 1083return (ListViewIsGroupViewEnabled(hwnd) && NativeMethods.LV_VIEW_LIST != ListViewGetView(hwnd)); 1105case NativeMethods.EventObjectReorder : 1146case NativeMethods.EventObjectDestroy : 1157case NativeMethods.EventObjectHide : 1178return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_REPORT); 1208return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1218for (int index = GetItemNext(hwnd, -1, NativeMethods.LVNI_SELECTED); index != -1; index = GetItemNext(hwnd, index, NativeMethods.LVNI_SELECTED)) 1228return GetItemNext(hwnd, -1, NativeMethods.LVNI_SELECTED); 1236return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags)); 1241return ListViewGetView(hwnd) == NativeMethods.LV_VIEW_ICON; 1247return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero); 1253return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1)); 1259return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_SCROLL, dx, dy) != 0; 1263static internal unsafe bool GetItemRect (IntPtr hwnd, int item, int lvir, out NativeMethods.Win32Rect itemRectangle) 1265itemRectangle = NativeMethods.Win32Rect.Empty; 1270if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1282return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0; 1288return SetItemState(hwnd, -1, NativeMethods.LVIS_SELECTED, 0); 1294return SetItemState(hwnd, item, NativeMethods.LVIS_SELECTED, NativeMethods.LVIS_SELECTED); 1300return SetItemState(hwnd, item, NativeMethods.LVIS_SELECTED, 0); 1306return Misc.IsBitSet(GetItemState(hwnd, listItem, NativeMethods.LVIS_SELECTED), NativeMethods.LVIS_SELECTED); 1312return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_EDITLABELS); 1336int flags = NativeMethods.LVS_EX_ONECLICKACTIVATE 1337| NativeMethods.LVS_EX_TWOCLICKACTIVATE 1338| NativeMethods.LVS_EX_UNDERLINEHOT 1339| NativeMethods.LVS_EX_UNDERLINECOLD; 1346return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1352return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_ONECLICKACTIVATE); 1358return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_SINGLESEL); 1364return !Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_NOSCROLL); 1372return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0; 1378return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 1382static internal string GetItemText (IntPtr hwnd, NativeMethods.LVITEM item) 1391static internal NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, NativeMethods.Win32Point pt) 1398static internal NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, int item, NativeMethods.Win32Point pt) 1401NativeMethods.LVHITTESTINFO_INTERNAL hitTest = new NativeMethods.LVHITTESTINFO_INTERNAL 1420NativeMethods.LVHITTESTINFO_V6 hitTestNative = new NativeMethods.LVHITTESTINFO_V6(hitTest); 1421result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1429NativeMethods.LVHITTESTINFO hitTestNative = new NativeMethods.LVHITTESTINFO(hitTest); 1430result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1449return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1455return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_CHECKBOXES); 1461int state = GetItemState(hwnd, item, NativeMethods.LVIS_STATEIMAGEMASK); 1469return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.LVS_AUTOARRANGE); 1475return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_FULLROWSELECT); 1481return Misc.IsBitSet(GetExtendedListViewStyle(hwnd), NativeMethods.LVS_EX_JUSTIFYCOLUMNS); 1486static public unsafe bool GetSubItemRect (IntPtr hwnd, int item, int subItem, int lvir, out NativeMethods.Win32Rect itemRectangle) 1488itemRectangle = NativeMethods.Win32Rect.Empty; 1494if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETSUBITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1505IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1544return CheckBoxes (_hwnd) ? new int [] { NativeMethods.EventObjectNameChange, NativeMethods.EventObjectStateChange } : new int [] { NativeMethods.EventObjectNameChange }; 1548return new int [] { NativeMethods.EventObjectReorder }; 1661throw new ArgumentOutOfRangeException(sbFlag == NativeMethods.SB_HORZ ? "horizontalPercent" : "verticalPercent", SR.ScrollBarOutOfRange); 1664int scrollBar = sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_VSCROLL; 1666NativeMethods.ScrollBarInfo scrollBarInfo = new NativeMethods.ScrollBarInfo(); 1669(scrollBarInfo.scrollBarInfo & NativeMethods.STATE_SYSTEM_INVISIBLE) != 0 || 1670(scrollBarInfo.scrollBarInfo & NativeMethods.STATE_SYSTEM_UNAVAILABLE) != 0) 1676NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); // this is used all over 1679si.fMask = NativeMethods.SIF_ALL; 1764int nextItem = GetItemNext(hwnd, curItem, NativeMethods.LVNI_BELOW); 1784return ((Misc.GetWindowStyle(hwnd) & NativeMethods.LVS_TYPEMASK) == NativeMethods.LVS_LIST); 1788static private unsafe bool GetItemPosition (IntPtr hwnd, int item, out NativeMethods.Win32Point pt) 1795if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMPOSITION, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(pt.GetType()))) 1807return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero); 1813return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask)); 1818NativeMethods.LVITEM lvitem = new NativeMethods.LVITEM 1820mask = NativeMethods.LVIF_STATE, 1854if (eventId == NativeMethods.EventObjectSelectionRemove && automationProperty == SelectionItemPattern.IsSelectedProperty) 1863else if (eventId == NativeMethods.EventObjectSelection 1864|| eventId == NativeMethods.EventObjectSelectionRemove 1865|| eventId == NativeMethods.EventObjectSelectionAdd) 1912if (eventId == NativeMethods.EventObjectSelectionRemove && GetSelectedItemCount(hwnd) == 1) 1917eventId = NativeMethods.EventObjectSelection; 1938else if (eventId == NativeMethods.EventObjectReorder && (automationProperty == GridItemPattern.ColumnProperty || automationProperty == GridItemPattern.RowProperty)) 1948else if (eventId == NativeMethods.EventObjectNameChange) 1951eventId = NativeMethods.EventObjectValueChange; 1955else if (eventId == NativeMethods.EventObjectStateChange && CheckBoxes(hwnd)) 1960eventId = NativeMethods.EventObjectValueChange; 1966else if ((eventId == NativeMethods.EventObjectDestroy || eventId == NativeMethods.EventObjectCreate) && automationEvent == AutomationElement.StructureChangedEvent) 1981if (eventId == NativeMethods.EventObjectCreate && fGroupView)
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (74)
72NativeMethods.Win32Rect itemRectangle = manager.GetGroupRc(ID); 96NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6(); 97group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 102return XSendMessage.GetItemText(_hwnd, group, NativeMethods.LVGF_HEADER); 106NativeMethods.LVGROUP group = new NativeMethods.LVGROUP(); 107group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP))); 110group.mask = NativeMethods.LVGF_HEADER; 152NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6(); 153group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 155group.mask = NativeMethods.LVGF_STATE; 156group.stateMask = NativeMethods.LVGS_SUBSETED; 164if ((group.state & NativeMethods.LVGS_SUBSETED) != 0) 240NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6(); 241group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 243group.mask = NativeMethods.LVGF_STATE; 244group.stateMask = NativeMethods.LVGS_SUBSETED; 252if ((group.state & NativeMethods.LVGS_SUBSETED) != 0) 285NativeMethods.Win32Point pt = new NativeMethods.Win32Point (x, y); 286NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest (_hwnd, pt); 288if ((hitTest.flags & NativeMethods.LVHT_EX_GROUP_HEADER) != 0) 293if ((hitTest.flags & NativeMethods.LVHT_ONITEM) != 0 && hitTest.iItem >= 0) 304NativeMethods.LVHITTESTINFO_V6 hitTestNative = new NativeMethods.LVHITTESTINFO_V6(hitTest); 307XSendMessage.XSendGetIndex(_hwnd, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 310if ((hitTestNative.flags & NativeMethods.LVHT_EX_GROUP_SUBSETLINK) != 0) 329int groupIndex = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 332NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6(); 333groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 334groupInfo.mask = NativeMethods.LVGF_GROUPID; 338bool lresult = XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 424NativeMethods.LVGROUP group = new NativeMethods.LVGROUP(); 425group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP))); 427group.mask = NativeMethods.LVGF_STATE; 428group.stateMask = NativeMethods.LVGS_COLLAPSED; 431isCollapsed = (group.state & NativeMethods.LVGS_COLLAPSED) != 0; 464int index = WindowsListView.GetItemNext(hwnd, -1, NativeMethods.LVNI_FOCUSED); 469NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 471mask = NativeMethods.LVIF_GROUPID, 487int groupIndex = (int)Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 490NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6(); 491groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 492groupInfo.mask = NativeMethods.LVGF_GROUPID; 496bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 505groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 507groupInfo.mask = NativeMethods.LVGF_STATE; 508groupInfo.stateMask = NativeMethods.LVGS_SUBSETLINKFOCUSED; 513if ((groupInfo.state & NativeMethods.LVGS_SUBSETLINKFOCUSED) != 0) 606NativeMethods.LVGROUP group = new NativeMethods.LVGROUP(); 607group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP))); 610group.mask = NativeMethods.LVGF_STATE; 612group.stateMask = NativeMethods.LVGS_COLLAPSED; 613group.state = collapse ? NativeMethods.LVGS_COLLAPSED : 0; 682static private NewItemInDimension IsNewColumn (NativeMethods.Win32Rect rc1, NativeMethods.Win32Rect rc2) 720static private NewItemInDimension IsNewRow (NativeMethods.Win32Rect rc1, NativeMethods.Win32Rect rc2) 789NativeMethods.Win32Rect rc; 790NativeMethods.Win32Rect rcNext; 793if (WindowsListView.GetItemRect(hwnd, items[0], NativeMethods.LVIR_BOUNDS, out rc)) 800if (!WindowsListView.GetItemRect(hwnd, items[i], NativeMethods.LVIR_BOUNDS, out rcNext)) 849private delegate NewItemInDimension IsNewItemInDimension (NativeMethods.Win32Rect rc1, NativeMethods.Win32Rect rc2);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (55)
124internal NativeMethods.Win32Rect GetGroupRc(int id) 130return NativeMethods.Win32Rect.Empty; 135internal NativeMethods.Win32Rect GetGroupRcByIndex(int index) 139return NativeMethods.Win32Rect.Empty; 205NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 207mask = NativeMethods.LVIF_GROUPID 241return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 370NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 372mask = NativeMethods.LVIF_GROUPID 380NativeMethods.LVITEMINDEX ii = new NativeMethods.LVITEMINDEX(-1, -1); 382int flags = NativeMethods.LVNI_VISIBLEONLY | NativeMethods.LVNI_VISIBLEORDER; 387while (XSendMessage.XSend (hwnd, NativeMethods.LVM_GETNEXTITEMINDEX, new IntPtr(&ii), flags, Marshal.SizeOf(ii.GetType()))) 390NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6(); 391groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 392groupInfo.mask = NativeMethods.LVGF_GROUPID; 394bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(ii.iGroup), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 466NativeMethods.LVGROUPMETRICS metric = new NativeMethods.LVGROUPMETRICS (sizeof(NativeMethods.LVGROUPMETRICS), NativeMethods.LVGMF_BORDERSIZE); 467XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPMETRICS, IntPtr.Zero, new IntPtr(&(metric.cbSize)), metric.cbSize, XSendMessage.ErrorValue.NoCheck); 485private NativeMethods.Win32Rect GetGroupRcInternal(Group group) 487NativeMethods.Win32Rect rcGroup = group.GetGroupRect(); 618NativeMethods.Win32Rect rc1; 619WindowsListView.GetItemRect(_hwnd, item1, NativeMethods.LVIR_BOUNDS, out rc1); 621NativeMethods.Win32Rect rc2; 622WindowsListView.GetItemRect(_hwnd, item2, NativeMethods.LVIR_BOUNDS, out rc2); 698internal unsafe NativeMethods.Win32Rect GetGroupRect() 700NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect(); 702rect.top = isCollapsed ? NativeMethods.LVGGR_HEADER : NativeMethods.LVGGR_GROUP; 703XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, 711internal NativeMethods.Win32Rect CalculateRectNoHeader() 713NativeMethods.Win32Rect rcLv = NativeMethods.Win32Rect.Empty; 717return NativeMethods.Win32Rect.Empty; 721NativeMethods.Win32Rect item; 722WindowsListView.GetItemRect(_hwnd, _items[0], NativeMethods.LVIR_BOUNDS, out item); 724NativeMethods.Win32Rect groupRc; 735WindowsListView.GetItemRect(_hwnd, _items[count - 1], NativeMethods.LVIR_BOUNDS, out item); 744if (WindowScroll.Scrollable(_hwnd, NativeMethods.SB_VERT)) 746NativeMethods.Win32Rect rc = GetScrollbarRect(); 812private NativeMethods.Win32Rect GetScrollbarRect() 814NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 817if (Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_VSCROLL, ref sbi)) 819return new NativeMethods.Win32Rect(sbi.rcScrollBar.left, sbi.rcScrollBar.top, sbi.rcScrollBar.right, sbi.rcScrollBar.bottom); 822return NativeMethods.Win32Rect.Empty;
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (15)
74NativeMethods.Win32Rect rect = new NativeMethods.Win32Rect 76top = NativeMethods.LVGGR_SUBSETLINK 78XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, new IntPtr(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType())); 88NativeMethods.LVGROUP_V6 groupInfo = new NativeMethods.LVGROUP_V6(); 89groupInfo.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 91groupInfo.mask = NativeMethods.LVGF_STATE; 92groupInfo.stateMask = NativeMethods.LVGS_SUBSETLINKFOCUSED; 97return (groupInfo.state & NativeMethods.LVGS_SUBSETLINKFOCUSED) != 0; 105NativeMethods.LVGROUP_V6 group = new NativeMethods.LVGROUP_V6(); 106group.Init(Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 111return XSendMessage.GetItemText(_hwnd, group, NativeMethods.LVGF_SUBSET); 121NativeMethods.Win32Point pt;
MS\Internal\AutomationProxies\WindowsListViewItem.cs (35)
98NativeMethods.Win32Rect itemRectangle = NativeMethods.Win32Rect.Empty; 106itemRectangle.left = NativeMethods.LVIR_BOUNDS; 126NativeMethods.LVITEMINDEX ii = new NativeMethods.LVITEMINDEX 134if (XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETITEMINDEXRECT, new IntPtr(&ii), new IntPtr(&itemRectangle), Marshal.SizeOf(ii.GetType()), Marshal.SizeOf(itemRectangle.GetType()))) 148if (WindowsListView.GetItemRect(_hwnd, _item, NativeMethods.LVIR_BOUNDS, out itemRectangle)) 224NativeMethods.Win32Point clickPoint; 340NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (_hwnd, _item); 366int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero); 528NativeMethods.Win32Point clickPoint; 704NativeMethods.LVITEM lvitem = new NativeMethods.LVITEM 706mask = NativeMethods.LVIF_TEXT, 732NativeMethods.LVITEM_V6 item = new NativeMethods.LVITEM_V6 734mask = NativeMethods.LVIF_GROUPID, 853NativeMethods.Win32Rect listViewRect = new NativeMethods.Win32Rect(); 854NativeMethods.Win32Rect headerRect = new NativeMethods.Win32Rect(); 861NativeMethods.Win32Rect itemRect = 862new NativeMethods.Win32Rect(BoundingRectangle); 910private bool GetListviewitemClickablePoint (out NativeMethods.Win32Point clickPoint) 916NativeMethods.Win32Rect itemRectangle; 919if (!WindowsListView.GetItemRect(_hwnd, _item, NativeMethods.LVIR_LABEL, out itemRectangle)) 928NativeMethods.Win32Point pt = new NativeMethods.Win32Point (itemRectangle.left, 0); 940if (!WindowsListView.GetItemRect(_hwnd, _item, NativeMethods.LVIR_LABEL, out itemRectangle)) 952private void Click (NativeMethods.Win32Point clickPoint) 963IntPtr key = (IntPtr)((setValueSucceeded) ? NativeMethods.VK_RETURN : NativeMethods.VK_ESCAPE); 966int scanCode = SafeNativeMethods.MapVirtualKey (NativeMethods.VK_RETURN, 0); 973Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode)); 974Misc.ProxySendMessage(hwnd, NativeMethods.WM_KEYUP, key, keyUpLParam);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (26)
74NativeMethods.Win32Rect itemRect = ListViewCheckBoxRect(_hwnd, _listviewItem); 145internal static NativeMethods.Win32Rect ListViewCheckBoxRect (IntPtr hwnd, int item) 151NativeMethods.Win32Rect controlRectangle = NativeMethods.Win32Rect.Empty; 155return NativeMethods.Win32Rect.Empty; 161NativeMethods.Win32Rect rc; 163if ((WindowsListView.GetItemRect(hwnd, item, NativeMethods.LVIR_ICON, out rc) && rc.left != rc.right) || (WindowsListView.GetItemRect(hwnd, item, NativeMethods.LVIR_LABEL, out rc) && rc.left != rc.right)) 167return new NativeMethods.Win32Rect (controlRectangle.left, rc.top, right, rc.bottom); 173NativeMethods.Win32Rect wholeItem; 175if (!WindowsListView.GetItemRect(hwnd, item, NativeMethods.LVIR_BOUNDS, out wholeItem)) 177return NativeMethods.Win32Rect.Empty; 180NativeMethods.Win32Rect selectable; 182if (!WindowsListView.GetItemRect(hwnd, item, NativeMethods.LVIR_SELECTBOUNDS, out selectable)) 184return NativeMethods.Win32Rect.Empty; 189return new NativeMethods.Win32Rect (selectable.right, wholeItem.top, wholeItem.right, wholeItem.bottom); 193return new NativeMethods.Win32Rect (wholeItem.left, wholeItem.top, selectable.left, wholeItem.bottom); 197return NativeMethods.Win32Rect.Empty; 247NativeMethods.Win32Rect rc = ListViewCheckBoxRect(_hwnd, _listviewItem); 248NativeMethods.Win32Point pt = new NativeMethods.Win32Point((rc.left + rc.right) / 2, (rc.top + rc.bottom) / 2); 253Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 254Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (7)
53NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 55fMask = NativeMethods.SIF_ALL 94int cPelsAll = NativeMethods.Util.LOWORD (size); 100int cPelsAll = NativeMethods.Util.HIWORD (size); 119int cPelsAll = NativeMethods.Util.LOWORD (size); 125int cPelsAll = NativeMethods.Util.HIWORD (size);
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (9)
74NativeMethods.Win32Rect itemRectangle; 78int lvir = (_item == 0) ? NativeMethods.LVIR_SELECTBOUNDS : NativeMethods.LVIR_BOUNDS; 91NativeMethods.Win32Rect itemRectangle1; 93if (!WindowsListView.GetSubItemRect(_hwnd, _itemParent, 1, NativeMethods.LVIR_BOUNDS, out itemRectangle1)) 111NativeMethods.Win32Rect checkboxRectangle = ListViewItemCheckbox.ListViewCheckBoxRect (_hwnd, _itemParent); 349NativeMethods.LVHITTESTINFO_INTERNAL hitTest = WindowsListView.SubitemHitTest (hwnd, item, new NativeMethods.Win32Point (x, y)); 375int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (90)
116System.Diagnostics.Debug.Assert(idObject == NativeMethods.OBJID_MENU || idObject == NativeMethods.OBJID_SYSMENU, "Unexpected idObject"); 118if (eventId == NativeMethods.EventObjectInvoke) 210NativeMethods.GUITHREADINFO gui; 228if (!Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 290if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE)) 299else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_POPUPMENUMODE)) 305else if (Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_INMENUMODE)) 502internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint idItem, out NativeMethods.MENUBARINFO mbi) 504mbi = new NativeMethods.MENUBARINFO(); 589NativeMethods.GUITHREADINFO gui; 669if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER)) 717return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero); 728NativeMethods.GUITHREADINFO gui; 732return Misc.IsBitSet(gui.dwFlags, NativeMethods.GUI_SYSTEMMENUMODE); 745NativeMethods.MENUBARINFO mbi; 747if (GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero) 800NativeMethods.MENUBARINFO mbi; 801if (!GetMenuBarInfo(_hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi)) 830NativeMethods.MENUBARINFO mbi; 831if (GetMenuBarInfo(_hwnd, NativeMethods.OBJID_MENU, 0, out mbi)) 874NativeMethods.MENUBARINFO mbi; 878if (GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi) && 896NativeMethods.GUITHREADINFO gui; 920int state = UnsafeNativeMethods.GetMenuState(hmenu, i, NativeMethods.MF_BYPOSITION); 921if (Misc.IsBitSet(state, NativeMethods.MF_HILITE)) 953if (eventId == NativeMethods.EventSystemMenuPopupEnd) 1083NativeMethods.GUITHREADINFO gui; 1113new WinEventTracker.EvtIdProperty(NativeMethods.EventSystemMenuPopupStart, ExpandCollapsePattern.ExpandCollapseStateProperty), 1114new WinEventTracker.EvtIdProperty(NativeMethods.EventSystemMenuPopupEnd, ExpandCollapsePattern.ExpandCollapseStateProperty), 1115new WinEventTracker.EvtIdProperty(NativeMethods.EventObjectInvoke, InvokePattern.InvokedEvent) 1246NativeMethods.MENUBARINFO mbi; 1248if (GetMenuBarInfo(_hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi)) 1274NativeMethods.Win32Rect rc; 1415NativeMethods.Win32Rect itemWin32Rect = new NativeMethods.Win32Rect(itemRect); 1508while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 1866return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); 1881return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED); 1886NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO(); 1888menuItemInfo.fMask = NativeMethods.MIIM_FTYPE | NativeMethods.MIIM_SUBMENU | NativeMethods.MIIM_STATE; 1895return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero); 1901NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO (); 1903menuItemInfo.fMask = NativeMethods.MIIM_FTYPE | NativeMethods.MIIM_SUBMENU | NativeMethods.MIIM_STATE; 1910return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1911Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1912Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)); 1945NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO(); 1947menuItemInfo.fMask = NativeMethods.MIIM_FTYPE | NativeMethods.MIIM_SUBMENU | NativeMethods.MIIM_STATE; 1956if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 1957Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 1958Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 2119Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' ')); 2197for (item = 0; item < cItems && !Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++) 2239NativeMethods.GUITHREADINFO gui; 2332while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) && 2363if (Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE)) 2398Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP)) 2535int length = UnsafeNativeMethods.GetMenuString(_hmenu, _item, IntPtr.Zero, 0, NativeMethods.MF_BYPOSITION); 2544if (UnsafeNativeMethods.GetMenuString(_hmenu, _item, strbldr, length + 1, NativeMethods.MF_BYPOSITION) == length) 2552NativeMethods.MENUITEMINFO menuItemInfo = new NativeMethods.MENUITEMINFO(); 2554menuItemInfo.fMask = NativeMethods.MIIM_TYPE | NativeMethods.MIIM_STATE | NativeMethods.MIIM_DATA | NativeMethods.MIIM_ID; 2559if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_SEPARATOR) || 2560Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBARBREAK) || 2561Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_MENUBREAK)) 2565else if (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MF_OWNERDRAW)) 2648int state = UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION); 2651return !(Misc.IsBitSet(state, NativeMethods.MF_DISABLED) | Misc.IsBitSet(state, NativeMethods.MF_GRAYED));
MS\Internal\AutomationProxies\WindowsProgressbar.cs (5)
57if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 155int cur = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 156int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero); 157int max = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (19)
58if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 123NativeMethods.Win32Rect rebarRect = new NativeMethods.Win32Rect (); 135NativeMethods.Win32Point pt = new NativeMethods.Win32Point (x, y); 194return Misc.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero); 198private unsafe int getRebarBandIDFromPoint (NativeMethods.Win32Point pt) 200NativeMethods.RB_HITTESTINFO rbHitTestInfo = new NativeMethods.RB_HITTESTINFO 207return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 289IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 380Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero); 396NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty; 400if (!XSendMessage.XSend(hwnd, NativeMethods.RB_GETRECT, new IntPtr(item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 429NativeMethods.REBARBANDINFO rebarBandInfo = new NativeMethods.REBARBANDINFO 436if (XSendMessage.XSend(_hwnd, NativeMethods.RB_GETBANDINFOA, new IntPtr(_item), new IntPtr(&rebarBandInfo), Marshal.SizeOf(rebarBandInfo.GetType()), XSendMessage.ErrorValue.Zero))
MS\Internal\AutomationProxies\WindowsRichEdit.cs (20)
70if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 77if (eventId == NativeMethods.EventObjectLocationChange 78&& idObject == NativeMethods.OBJID_CARET) 168if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)) 174if (Misc.IsBitSet(WindowStyle, NativeMethods.ES_NUMBER) && !WindowsFormsHelper.IsWindowsFormsControl(_hwnd)) 189int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 196result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 443return (WindowStyle & NativeMethods.ES_READONLY) == NativeMethods.ES_READONLY; 461Misc.IsBitSet(WindowStyle, NativeMethods.ES_READONLY)); 484if (UnsafeNativeMethods.AccessibleObjectFromWindow(WindowHandle, NativeMethods.OBJID_NATIVEOM, ref UnsafeNativeMethods.IID_IDispatch, ref obj) != NativeMethods.S_OK) 535if (range.GetEmbeddedObject(out embeddedObject) == NativeMethods.S_OK && embeddedObject != null) 572text = acc.get_accName(NativeMethods.CHILD_SELF); 583int hr = NativeMethods.S_FALSE; 593if (hr != NativeMethods.S_OK) 625if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 635if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 681IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (4)
170NativeMethods.Win32Rect w32rect = new NativeMethods.Win32Rect(); 630return SafeNativeMethods.GetSysColor(NativeMethods.COLOR_WINDOW); 771return SafeNativeMethods.GetSysColor(NativeMethods.COLOR_WINDOWTEXT);
MS\Internal\AutomationProxies\WindowsScroll.cs (64)
36bool isHorizontal = SetScrollPercent (hwnd, horizontalPercent, NativeMethods.SB_HORZ, out resultsNoCheck); 44bool isVertical = SetScrollPercent (hwnd, verticalPercent, NativeMethods.SB_VERT, out resultsNoCheck); 68bool fHz = ScrollCursor(hwnd, HorizontalAmount, NativeMethods.SB_HORZ, fForceResults); 69bool fVt = ScrollCursor (hwnd, VerticalAmount, NativeMethods.SB_VERT, fForceResults); 83return Scrollable (hwnd, NativeMethods.SB_HORZ) ? GetScrollInfo (hwnd, NativeMethods.SB_HORZ) : ScrollPattern.NoScroll; 87return Scrollable (hwnd, NativeMethods.SB_VERT) ? GetScrollInfo (hwnd, NativeMethods.SB_VERT) : ScrollPattern.NoScroll; 91return Scrollable (hwnd, NativeMethods.SB_HORZ) ? ScrollViewSize (hwnd, NativeMethods.SB_HORZ) : 100.0; 95return Scrollable (hwnd, NativeMethods.SB_VERT) ? ScrollViewSize (hwnd, NativeMethods.SB_VERT) : 100.0; 99return Scrollable (hwnd, NativeMethods.SB_HORZ); 103return Scrollable (hwnd, NativeMethods.SB_VERT); 114if ((sbFlag == NativeMethods.SB_HORZ && !Misc.IsBitSet(style, NativeMethods.WS_HSCROLL)) || 115(sbFlag == NativeMethods.SB_VERT && !Misc.IsBitSet(style, NativeMethods.WS_VSCROLL))) 127NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo(); 130(sbFlag == NativeMethods.SB_VERT) ? NativeMethods.OBJID_VSCROLL : NativeMethods.OBJID_HSCROLL; 134!Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE); 143NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 145si.fMask = NativeMethods.SIF_ALL; 159bool hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.WS_HSCROLL) || Misc.IsBitSet(style, NativeMethods.WS_VSCROLL); 166hasScrollableStyle = Misc.IsBitSet(style, NativeMethods.ES_MULTILINE); 175return Scrollable(hwnd, NativeMethods.SB_HORZ) || Scrollable(hwnd, NativeMethods.SB_VERT); 192NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 194fMask = NativeMethods.SIF_ALL 250NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 252si.fMask = NativeMethods.SIF_RANGE | NativeMethods.SIF_PAGE; 284throw new ArgumentOutOfRangeException(sbFlag == NativeMethods.SB_HORZ ? "horizontalPercent" : "verticalPercent", SR.ScrollBarOutOfRange); 288NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 290fMask = NativeMethods.SIF_ALL 317int message = sbFlag == NativeMethods.SB_HORZ ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL; 319int wParam = NativeMethods.Util.MAKELONG(NativeMethods.SB_THUMBPOSITION, si.nPos); 364NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 366fMask = NativeMethods.SIF_ALL 382if (sbFlag == NativeMethods.SB_HORZ) 387nAction = NativeMethods.SB_LINELEFT; 391nAction = NativeMethods.SB_PAGELEFT; 395nAction = NativeMethods.SB_LINERIGHT; 399nAction = NativeMethods.SB_PAGERIGHT; 411nAction = NativeMethods.SB_LINEUP; 415nAction = NativeMethods.SB_PAGEUP; 419nAction = NativeMethods.SB_LINEDOWN; 423nAction = NativeMethods.SB_PAGEDOWN; 432int wParam = NativeMethods.Util.MAKELONG (nAction, 0); 433int message = sbFlag == NativeMethods.SB_HORZ ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL;
MS\Internal\AutomationProxies\WindowsScrollBar.cs (71)
47_sAutomationId = sbFlag == NativeMethods.SB_VERT ? "Vertical ScrollBar" : "Horizontal ScrollBar"; // This string is a non-localizable string 70return new WindowsScrollBar(hwnd, null, idChild, NativeMethods.SB_CTL); 78WindowsScrollBar wtv = new WindowsScrollBar (hwnd, null, -1, NativeMethods.SB_CTL); 80if (idChild == 0 && eventId == NativeMethods.EventObjectStateChange && idProp == ValuePattern.IsReadOnlyProperty) 88if (idObject == NativeMethods.OBJID_HSCROLL || idObject == NativeMethods.OBJID_VSCROLL) 90idObject = NativeMethods.OBJID_WINDOW; 101ProxySimple scrollBarBit = WindowsScrollBarBits.CreateFromChildId(hwnd, wtv, idChild, NativeMethods.SB_CTL); 130if (_sbFlag == NativeMethods.SB_CTL) 135NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 138int idObject = _sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : _sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT; 166if (_sbFlag == NativeMethods.SB_VERT) 330NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(WindowsScrollBarBits.GetBoundingRectangle(_hwnd, this, item, _sbFlag)); 412return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_VSCROLL); 417return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_HSCROLL); 422if (sbFlag == NativeMethods.SB_CTL) 423return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.SBS_VERT); 425return sbFlag == NativeMethods.SB_VERT; 431NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 433si.fMask = NativeMethods.SIF_RANGE | NativeMethods.SIF_PAGE; 444int idObject = sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT; 445NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 457NativeMethods.SIZE sizeArrow; 519NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 522if (_sbFlag != NativeMethods.SB_CTL || Misc.GetScrollBarInfo(_hwnd, NativeMethods.OBJID_CLIENT, ref sbi)) 529private int GetScrollMaxValue(NativeMethods.ScrollInfo si) 569NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 571fMask = NativeMethods.SIF_ALL 586if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent._hwnd))) 622NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 624fMask = NativeMethods.SIF_ALL 687if (_sbFlag == NativeMethods.SB_CTL) 695IsScrollBarVertical(_hwnd, _sbFlag) ? NativeMethods.WM_VSCROLL : NativeMethods.WM_HSCROLL; 699int wParam = NativeMethods.Util.MAKELONG ((short) NativeMethods.SB_THUMBPOSITION, (short) val); 701wParam = NativeMethods.Util.MAKELONG ((short) NativeMethods.SB_THUMBTRACK, (short) val); 710int idObject = sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT; 711NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 726NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo(); 729int idObject = NativeMethods.OBJID_CLIENT; 730if (_sbFlag == NativeMethods.SB_VERT) 732idObject = NativeMethods.OBJID_VSCROLL; 734else if (_sbFlag == NativeMethods.SB_HORZ) 736idObject = NativeMethods.OBJID_HSCROLL; 744return !Misc.IsBitSet(sbi.scrollBarInfo, NativeMethods.STATE_SYSTEM_UNAVAILABLE); 763protected int _sbFlag = NativeMethods.SB_CTL;
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (36)
180Scroll(amount, NativeMethods.SBS_VERT); 184Scroll(amount, NativeMethods.SBS_HORZ); 205NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo (); 207si.fMask = NativeMethods.SIF_RANGE; 222int idObject = sbFlag == NativeMethods.SB_VERT ? NativeMethods.OBJID_VSCROLL : sbFlag == NativeMethods.SB_HORZ ? NativeMethods.OBJID_HSCROLL : NativeMethods.OBJID_CLIENT; 223NativeMethods.ScrollBarInfo sbi = new NativeMethods.ScrollBarInfo (); 242if (sbFlag == NativeMethods.SB_VERT) 295static internal Rect GetVerticalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi) 297NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(sbi.rcScrollBar.left, sbi.xyThumbTop, sbi.rcScrollBar.right, sbi.xyThumbBottom); 308NativeMethods.SIZE sizeArrow; 386static internal Rect GetHorizontalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi) 389NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect(sbi.xyThumbTop, sbi.rcScrollBar.top, sbi.xyThumbBottom, sbi.rcScrollBar.bottom); 399NativeMethods.SIZE sizeArrow; 517IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(_hwnd) : _hwnd; 523wParam = NativeMethods.SB_PAGEUP; 527wParam = NativeMethods.SB_LINEUP; 531wParam = NativeMethods.SB_PAGEDOWN; 535wParam = NativeMethods.SB_LINEDOWN; 539NativeMethods.ScrollInfo si = new NativeMethods.ScrollInfo 541fMask = NativeMethods.SIF_ALL 552if ((si.nPos == si.nMax) && (wParam == NativeMethods.SB_PAGEDOWN || wParam == NativeMethods.SB_LINEDOWN)) 559if ((si.nPos == si.nMin) && (wParam == NativeMethods.SB_PAGEUP || wParam == NativeMethods.SB_LINEUP)) 564int msg = (style == NativeMethods.SBS_HORZ) ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL;
MS\Internal\AutomationProxies\WindowsSlider.cs (26)
62if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 138NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SliderItem.GetBoundingRectangle (_hwnd, item, _fHorizontal)); 173int msg = IsHorizontalSlider () ? NativeMethods.WM_HSCROLL : NativeMethods.WM_VSCROLL; 176int wParam = (newVal << 16) | NativeMethods.SB_THUMBPOSITION; 256return (Misc.IsBitSet(WindowStyle, NativeMethods.TBS_VERT)); 261int value = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 264if ((this.WindowStyle & NativeMethods.TBS_REVERSED) != 0) 266int maxValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 284Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val)); 291return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero); 299return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero); 307return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 315return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero); 409IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 438IntPtr wParam = (IntPtr) (_item == (int) WindowsSlider.SItem.LargeDecrement ? NativeMethods.VK_PRIOR : NativeMethods.VK_NEXT); 440Misc.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero); 456NativeMethods.Win32Rect rcChannel = new NativeMethods.Win32Rect (); 461XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 468NativeMethods.Win32Rect rcThumb = new NativeMethods.Win32Rect(); 473XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck);
MS\Internal\AutomationProxies\WindowsSpinner.cs (6)
61hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 83if (idObject == NativeMethods.OBJID_VSCROLL || idObject == NativeMethods.OBJID_HSCROLL) 277IntPtr hwndChild = Misc.GetWindow(hwndParent, NativeMethods.GW_CHILD); 283IntPtr hwndBuddy = Misc.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 289hwndChild = Misc.GetWindow(hwndChild, NativeMethods.GW_HWNDNEXT);
MS\Internal\AutomationProxies\WindowsStatic.cs (24)
89style = Misc.GetWindowStyle(hwnd) & NativeMethods.SS_TYPEMASK; 109if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 174return Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) == NativeMethods.S_OK && acc != null && acc.ChildCount > 0; 182case NativeMethods.SS_ICON: 186case NativeMethods.SS_BITMAP: 190case NativeMethods.SS_LEFT: 191case NativeMethods.SS_CENTER: 192case NativeMethods.SS_RIGHT: 193case NativeMethods.SS_BLACKRECT: 194case NativeMethods.SS_GRAYRECT: 195case NativeMethods.SS_WHITERECT: 196case NativeMethods.SS_BLACKFRAME: 197case NativeMethods.SS_GRAYFRAME: 198case NativeMethods.SS_WHITEFRAME: 199case NativeMethods.SS_SIMPLE: 200case NativeMethods.SS_LEFTNOWORDWRAP: 201case NativeMethods.SS_ETCHEDHORZ: 202case NativeMethods.SS_ETCHEDVERT: 203case NativeMethods.SS_ETCHEDFRAME: 204case NativeMethods.SS_OWNERDRAW: 208case NativeMethods.SS_ENHMETAFILE: 209case NativeMethods.SS_USERITEM:
MS\Internal\AutomationProxies\WindowsStatusBar.cs (24)
63if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 75if (eventId == NativeMethods.EventObjectNameChange && idChild == 1) 224NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (WindowsStatusBarPane.GetBoundingRectangle (_hwnd, item)); 235NativeMethods.Win32Rect rc = StatusBarGrip.GetBoundingRectangle (_hwnd); 337return Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero); 357Misc.EnumChildWindows(hwnd, new NativeMethods.EnumChildrenCallbackVoid(FindChildFromRect), (void*)&info); 364NativeMethods.Win32Rect rc = NativeMethods.Win32Rect.Empty; 561return XSendMessage.GetItemRect(hwnd, NativeMethods.SB_GETRECT, item); 566if (Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc) != NativeMethods.S_OK || acc == null) 597int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero); 601int len = NativeMethods.Util.LOWORD(retValue); 602return XSendMessage.GetItemText(_hwnd, NativeMethods.SB_GETTEXTW, _item, len); 790internal static NativeMethods.Win32Rect GetBoundingRectangle (IntPtr hwnd) 794return NativeMethods.Win32Rect.Empty; 797NativeMethods.Win32Rect client = new NativeMethods.Win32Rect(); 800return NativeMethods.Win32Rect.Empty; 805NativeMethods.SIZE sizeGrip = WindowsGrip.GetGripSize(hwnd, true); 810return new NativeMethods.Win32Rect(client.left, client.bottom - sizeGrip.cy, client.left + sizeGrip.cx, client.bottom); 814return new NativeMethods.Win32Rect(client.right - sizeGrip.cx, client.bottom - sizeGrip.cy, client.right, client.bottom);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (52)
69if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 76IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 151NativeMethods.HDHITTESTINFO HitTestInfo = new NativeMethods.HDHITTESTINFO 153pt = new NativeMethods.Win32Point(x, y) 162index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 167if (index != -1 && (NativeMethods.HHT_ONHEADER == (HitTestInfo.flags & 0x000F))) 178int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 194return Misc.IsBitSet(WindowStyle, NativeMethods.HDS_VERT) ? OrientationType.Vertical : OrientationType.Horizontal; 245IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (_hwnd, NativeMethods.GA_PARENT); 285Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 293return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.HDS_HIDDEN); 299return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 304return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 309NativeMethods.HDITEM item = new NativeMethods.HDITEM(); 311item.mask = NativeMethods.HDI_ORDER; 423NativeMethods.Win32Rect itemRect = BoundingRect(); 433NativeMethods.Win32Rect parentRect = NativeMethods.Win32Rect.Empty; 472NativeMethods.Win32Point pt; 479IntPtr center = NativeMethods.Util.MAKELPARAM (pt.x, pt.y); 482Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 483Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 526int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 550NativeMethods.HDITEM hdi = new NativeMethods.HDITEM(); 552hdi.mask = NativeMethods.HDI_TEXT; 560private NativeMethods.Win32Rect BoundingRect () 564NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty; 569result = XSendMessage.XSend(_hwnd, NativeMethods.HDM_GETITEMRECT, new IntPtr(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 576return NativeMethods.Win32Rect.Empty; 585int cxBorder = 8 * UnsafeNativeMethods.GetSystemMetrics (NativeMethods.SM_CXBORDER); 631return NativeMethods.Win32Rect.Empty; 649return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_BUTTONS)); 655return (Misc.IsBitSet(WindowStyle, NativeMethods.HDS_FILTERBAR)); 660private bool GetInvokationPoint (out NativeMethods.Win32Point pt) 675NativeMethods.HDITEM item = new NativeMethods.HDITEM(); 677item.mask = NativeMethods.HDI_FORMAT; 682if ((item.fmt & NativeMethods.HDF_SPLITBUTTON) != 0) 694int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 718Rect rect = XSendMessage.GetItemRect(_hwnd, NativeMethods.HDM_GETITEMDROPDOWNRECT, _item); 719NativeMethods.Win32Rect rectW32 = new NativeMethods.Win32Rect(rect); 720IntPtr center = NativeMethods.Util.MAKELPARAM (rectW32.left + ((rectW32.right - rectW32.left) / 2), rectW32.top + ((rectW32.bottom - rectW32.top) / 2)); 725Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 726Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center);
MS\Internal\AutomationProxies\WindowsTab.cs (91)
54_upDownEvents[0]._evtId = NativeMethods.EventObjectValueChange; 85case NativeMethods.OBJID_CLIENT : 89if (eventId == NativeMethods.EventObjectSelection || eventId == NativeMethods.EventObjectSelectionRemove || eventId == NativeMethods.EventObjectSelectionAdd) 102if ((idProp == ScrollPattern.VerticalScrollPercentProperty && idObject != NativeMethods.OBJID_VSCROLL) || 103(idProp == ScrollPattern.HorizontalScrollPercentProperty && idObject != NativeMethods.OBJID_HSCROLL)) 257pt = new NativeMethods.Win32Point(x, y) 277index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType())); 291int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero); 442return !Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS); 509int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 510int minPos = NativeMethods.Util.HIWORD(range); 511int maxPos = NativeMethods.Util.LOWORD(range); 517Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 518Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 538int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 541int posResult = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 544minPos = NativeMethods.Util.HIWORD(range); 545maxPos = NativeMethods.Util.LOWORD(range); 546currentPos = NativeMethods.Util.LOWORD(posResult); 574NativeMethods.Win32Rect viewable = new NativeMethods.Win32Rect 595NativeMethods.Win32Rect rectW32 = new NativeMethods.Win32Rect (); 650int count = Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 654NativeMethods.Win32Rect rectW32 = NativeMethods.Win32Rect.Empty; 658result = XSendMessage.XSend(hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(count - 1), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 692int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 693int max = NativeMethods.Util.LOWORD(range); 696Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 697Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 724if (eventId == NativeMethods.EventObjectValueChange 727IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 755IntPtr childHwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 771childHwnd = Misc.GetWindow(childHwnd, NativeMethods.GW_HWNDLAST); 786return Misc.IsBitSet(style, NativeMethods.TCS_MULTILINE) && 787(Misc.IsBitSet(style, NativeMethods.TCS_RIGHT) || 788Misc.IsBitSet(style, NativeMethods.TCS_VERTICAL)); 813int newPos = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 814int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 815int max = NativeMethods.Util.LOWORD(range); 816int min = NativeMethods.Util.HIWORD(range); 818if (NativeMethods.Util.HIWORD (newPos) == 0) 823newPos = NativeMethods.Util.LOWORD (newPos); 853Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 854Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 866return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_MULTISELECT)); 971IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 998if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_FOCUSNEVER)) 1008Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1104NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 1140NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 1152else if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_BUTTONS)) 1154Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero); 1177NativeMethods.TCITEM TCItem = new NativeMethods.TCITEM(); 1178TCItem.Init(NativeMethods.TCIF_STATE); 1186return Misc.IsBitSet(TCItem.dwState, NativeMethods.TCIS_BUTTONPRESSED); 1244return Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 1260return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item; 1273private unsafe NativeMethods.Win32Rect BoundingRect() 1275NativeMethods.Win32Rect rectW32 = new NativeMethods.Win32Rect(); 1277if (!XSendMessage.XSend(_hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(_item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 1279return NativeMethods.Win32Rect.Empty; 1282return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty; 1293if (Misc.IsBitSet(WindowStyle, (NativeMethods.TCS_BUTTONS | NativeMethods.TCS_FOCUSNEVER))) 1298NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 1304Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1305Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1311Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1345NativeMethods.TCITEM tcitem = new NativeMethods.TCITEM(); 1348tcitem.mask = NativeMethods.TCIF_TEXT;
MS\Internal\AutomationProxies\WindowsTitleBar.cs (59)
101return ReturnNextTitleBarChild (true, NativeMethods.INDEX_TITLEBAR_MIC); 107return ReturnNextTitleBarChild (true, NativeMethods.INDEX_TITLEBAR_MAC); 112int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y)); 115case NativeMethods.HTCAPTION: 118case NativeMethods.HTMINBUTTON: 119return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_MINBUTTON); 121case NativeMethods.HTMAXBUTTON : 122return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_MAXBUTTON); 124case NativeMethods.HTHELP : 125return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_HELPBUTTON); 127case NativeMethods.HTCLOSE : 128return CreateTitleBarChild(NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON); 130case NativeMethods.HTSYSMENU : 163case NativeMethods.INDEX_TITLEBAR_HELPBUTTON : 164case NativeMethods.INDEX_TITLEBAR_MINBUTTON : 165case NativeMethods.INDEX_TITLEBAR_MAXBUTTON : 166case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON : 202for (int i = start; i >= NativeMethods.INDEX_TITLEBAR_MIC && i <= NativeMethods.INDEX_TITLEBAR_MAC; i += next ? 1 : -1) 206if (!Misc.IsBitSet(ti.rgstate[i], NativeMethods.STATE_SYSTEM_INVISIBLE) || i == _systemMenu) 222return !Misc.IsBitSet(ti.rgstate[0], NativeMethods.STATE_SYSTEM_INVISIBLE); 283case NativeMethods.INDEX_TITLEBAR_HELPBUTTON: 286case NativeMethods.INDEX_TITLEBAR_MINBUTTON: 287if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 296case NativeMethods.INDEX_TITLEBAR_MAXBUTTON: 297if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 306case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON: 317case NativeMethods.INDEX_TITLEBAR_HELPBUTTON: 318if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_DISABLED)) 323return Misc.IsBitSet(WindowExStyle, NativeMethods.WS_EX_CONTEXTHELP); 325case NativeMethods.INDEX_TITLEBAR_MINBUTTON: 329if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 334return Misc.IsBitSet(style, NativeMethods.WS_MINIMIZEBOX); 337case NativeMethods.INDEX_TITLEBAR_MAXBUTTON: 341if (Misc.IsBitSet(style, NativeMethods.WS_DISABLED)) 346return Misc.IsBitSet(style, NativeMethods.WS_MAXIMIZEBOX); 371case NativeMethods.INDEX_TITLEBAR_MINBUTTON: 372if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 377case NativeMethods.INDEX_TITLEBAR_HELPBUTTON: 380case NativeMethods.INDEX_TITLEBAR_MAXBUTTON: 381if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 386case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON: 411case NativeMethods.INDEX_TITLEBAR_MINBUTTON : 412if ((WindowStyle & NativeMethods.WS_MINIMIZE) != 0) 413command = NativeMethods.SC_RESTORE; 415command = NativeMethods.SC_MINIMIZE; 418case NativeMethods.INDEX_TITLEBAR_HELPBUTTON : 419command = NativeMethods.SC_CONTEXTHELP; 422case NativeMethods.INDEX_TITLEBAR_MAXBUTTON : 423if ((WindowStyle & NativeMethods.WS_MAXIMIZE) != 0) 424command = NativeMethods.SC_RESTORE; 426command = NativeMethods.SC_MAXIMIZE; 429case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON : 430if ((WindowStyle & NativeMethods.WS_MINIMIZE) != 0) 432Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero); 435command = NativeMethods.SC_CLOSE; 446Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (38)
58Accessible acc = Accessible.CreateNativeFromEvent(hwnd, NativeMethods.OBJID_CLIENT, NativeMethods.CHILD_SELF); 79if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 92if (eventId == NativeMethods.EventObjectDestroy && idProp == AutomationElement.StructureChangedEvent) 211NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (ToolbarItem.GetBoundingRectangle (_hwnd, item)); 229int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero); 233Accessible acc = Accessible.CreateNativeFromEvent(_hwnd, NativeMethods.OBJID_CLIENT, NativeMethods.CHILD_SELF); 262name = GetAccessibleName(NativeMethods.CHILD_SELF); 283NativeMethods.TBBUTTON tbb = new NativeMethods.TBBUTTON (); 300if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 302Accessible acc = Accessible.CreateNativeFromEvent(_hwnd, NativeMethods.OBJID_CLIENT, item + 1); 330return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero); 361NativeMethods.TBBUTTON tbb = new NativeMethods.TBBUTTON(); 369bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0; 370int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero); 376if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_SEP)) 378else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_CHECK)) 387else if (Misc.IsBitSet(buttonStyle, NativeMethods.BTNS_DROPDOWN) 388&& Misc.IsBitSet(exStyle, NativeMethods.TBSTYLE_EX_DRAWDDARROWS)) 393else if (!hasImageList || tbb.iBitmap == NativeMethods.I_IMAGENONE) 429if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 469return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 515Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 561return XSendMessage.GetItemRect(hwnd, NativeMethods.TB_GETITEMRECT, item); 577return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item; 599int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 602return XSendMessage.GetItemText(_hwnd, NativeMethods.TB_GETBUTTONTEXT, _idCommand, len); 623NativeMethods.TBBUTTON tbb = new NativeMethods.TBBUTTON(); 636IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 644|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 651if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 678if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
74if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 80if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (28)
61if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 142if (idObject != NativeMethods.OBJID_WINDOW) 158if( eventId == NativeMethods.EVENT_OBJECT_HIDE /*|| eventId == NativeMethods.EVENT_OBJECT_DESTROY*/ ) 234NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 265case NativeMethods.INDEX_TITLEBAR_MINBUTTON: 266if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MINIMIZE)) 271case NativeMethods.INDEX_TITLEBAR_HELPBUTTON: 274case NativeMethods.INDEX_TITLEBAR_MAXBUTTON: 275if (Misc.IsBitSet(WindowStyle, NativeMethods.WS_MAXIMIZE)) 280case NativeMethods.INDEX_TITLEBAR_CLOSEBUTTON: 283case NativeMethods.INDEX_TITLEBAR_SELF: 293NativeMethods.Win32Point pt = new NativeMethods.Win32Point(); 305int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 309case NativeMethods.HTMINBUTTON: 310if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MINIMIZE)) 315case NativeMethods.HTMAXBUTTON: 316if (Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.WS_MAXIMIZE)) 321case NativeMethods.HTCLOSE: 322case NativeMethods.HTMDICLOSE: 325case NativeMethods.HTHELP: 328case NativeMethods.HTMDIMINBUTTON: 331case NativeMethods.HTMDIMAXBUTTON: 334case NativeMethods.HTCAPTION: 355new WinEventTracker.EvtIdProperty(NativeMethods.EVENT_OBJECT_HIDE, 0),
MS\Internal\AutomationProxies\WindowsTreeView.cs (88)
66case NativeMethods.OBJID_CLIENT : 71if (idChild != 0 && (eventId == NativeMethods.EventObjectSelection || 72eventId == NativeMethods.EventObjectSelectionRemove || 73eventId == NativeMethods.EventObjectSelectionAdd || 74eventId == NativeMethods.EventObjectStateChange || 75eventId == NativeMethods.EventObjectDestroy || 76eventId == NativeMethods.EventObjectCreate || 77eventId == NativeMethods.EventObjectNameChange)) 89case NativeMethods.OBJID_VSCROLL : 90case NativeMethods.OBJID_HSCROLL : 99if (idProp == ExpandCollapsePattern.ExpandCollapseStateProperty && el is TreeViewItem && eventId == NativeMethods.EventObjectStateChange) 106if (((idProp as AutomationEvent) == AutomationElement.StructureChangedEvent && el is TreeViewItem) && !(eventId == NativeMethods.EventObjectDestroy || eventId == NativeMethods.EventObjectCreate)) 335return new int[] { NativeMethods.EventObjectNameChange, 336NativeMethods.EventObjectStateChange }; 340return new int[] { NativeMethods.EventObjectStateChange }; 353new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectStateChange, idEvent), 354new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectCreate, idEvent), 355new WinEventTracker.EvtIdProperty (NativeMethods.EventObjectDestroy, idEvent) 408return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0; 414return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0; 420int expanded = GetItemState(hwnd, treeItem, NativeMethods.TVIS_EXPANDED); 422return (Misc.IsBitSet(expanded, NativeMethods.TVIS_EXPANDED)); 433if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0) 439fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0; 448return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_CARET); 458return GetNext(hwnd, treeItem, NativeMethods.TVGN_PARENT); 464return GetNext(hwnd, treeItem, NativeMethods.TVGN_NEXT); 470return GetNext(hwnd, treeItem, NativeMethods.TVGN_PREVIOUS); 476return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_ROOT); 482return GetNext(hwnd, treeItem, NativeMethods.TVGN_CHILD); 492int state = GetItemState(hwnd, treeItem, NativeMethods.TVIS_STATEIMAGEMASK); 504NativeMethods.TVITEM treeItem = new NativeMethods.TVITEM (); 506treeItem.mask = NativeMethods.TVIF_STATE; 508treeItem.stateMask = NativeMethods.TVIS_STATEIMAGEMASK; 520return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem); 526return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask)); 532NativeMethods.TVITEM treeItem; 534if (!GetItem(hwnd, item, NativeMethods.TVIF_CHILDREN, out treeItem)) 545private static unsafe NativeMethods.Win32Rect GetItemRect (IntPtr hwnd, IntPtr treeItem, bool labelOnly) 547NativeMethods.Win32Rect rc = NativeMethods.Win32Rect.Empty; 557if (!XSendMessage.XSend(hwnd, NativeMethods.TVM_GETITEMRECT, partialDisplay, rectangle, Marshal.SizeOf(rc.GetType()))) 559return NativeMethods.Win32Rect.Empty; 566return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty; 572private static bool GetItem (IntPtr hwnd, IntPtr item, int mask, out NativeMethods.TVITEM treeItem) 574treeItem = new NativeMethods.TVITEM (); 583NativeMethods.TVITEM treeItem = new NativeMethods.TVITEM(); 585treeItem.mask = NativeMethods.TVIF_TEXT; 597IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item); 608if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1) 611Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero); 619Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero); 645IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 656int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 817_nativeAcc = Accessible.CreateNativeFromEvent(_hwnd, NativeMethods.OBJID_CLIENT, childId); 846NativeMethods.Win32Rect itemRect = GetItemRect(_hwnd, _hItem, true); 865IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 909NativeMethods.Win32Rect itemWin32Rect = new NativeMethods.Win32Rect(itemRect); 940int highPart = NativeMethods.Util.HIDWORD((long)_hItem); 941int lowPart = NativeMethods.Util.LODWORD((long)_hItem); 1230Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem); 1283int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED)); 1285return Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED); 1456NativeMethods.Win32Rect rectItem = WindowsTreeView.GetItemRect(_hwnd, _hItem, true); 1464NativeMethods.Win32Point pt = new NativeMethods.Win32Point(((rectItem.left + rectItem.right) / 2), ((rectItem.top + rectItem.bottom) / 2)); 1476return Misc.IsBitSet(WindowStyle, NativeMethods.TVS_EDITLABELS); 1482int selected = WindowsTreeView.GetItemState(_hwnd, _hItem, NativeMethods.TVIS_SELECTED); 1484if (Misc.IsBitSet(selected, NativeMethods.TVIS_SELECTED)) 1496bool isCheckbox = Misc.IsBitSet(WindowStyle, NativeMethods.TVS_CHECKBOXES); 1536private void SimulateClick(NativeMethods.Win32Point pt) 1539Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1540Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1545NativeMethods.TVITEM treeItem; 1546if (WindowsTreeView.GetItem(_hwnd, _hItem, NativeMethods.TVIF_IMAGE | NativeMethods.TVIF_STATE, out treeItem))
MS\Internal\AutomationProxies\WindowsUpDown.cs (35)
62if(idObject == NativeMethods.OBJID_CLIENT 63&& eventId == NativeMethods.EventObjectInvoke 68else if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) 88button?.DispatchEvents(NativeMethods.EventObjectInvoke, InvokePattern.InvokedEvent, idObject, idChild); 185NativeMethods.Win32Rect rc = new NativeMethods.Win32Rect (SpinButtonItem.GetBoundingRectangle (_hwnd, item)); 224Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0)); 227Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 290IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 305int hr = Accessible.AccessibleObjectFromWindow(hwnd, NativeMethods.OBJID_CLIENT, ref acc); 308return hr == NativeMethods.S_OK && acc != null ? acc.Role == AccessibleRole.SpinButton : false; 341int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 348return (double)NativeMethods.Util.LOWORD(pos); 354IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 378int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 379int min = NativeMethods.Util.HIWORD(range); 380int max = NativeMethods.Util.LOWORD(range); 392int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 393int min = NativeMethods.Util.HIWORD(range); 394int max = NativeMethods.Util.LOWORD(range); 531NativeMethods.Win32Rect updownRect = new NativeMethods.Win32Rect(); 540IntPtr center = NativeMethods.Util.MAKELPARAM (x, y); 543Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center); 544Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center); 559NativeMethods.Win32Rect updownRect = new NativeMethods.Win32Rect(); 621IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 634return Misc.IsBitSet(Misc.GetWindowStyle(hwnd), NativeMethods.UDS_HORZ);
MS\Internal\AutomationProxies\WinEventTracker.cs (57)
152NativeMethods.WinEventProcDef proc = new NativeMethods.WinEventProcDef (WinEventProc); 176hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); 245if (!((idObject == NativeMethods.OBJID_MENU || idObject == NativeMethods.OBJID_SYSMENU) && eventId == NativeMethods.EventObjectInvoke) && 532NativeMethods.EventSystemSound, 533NativeMethods.EventSystemAlert, 534NativeMethods.EventSystemForeground, 535NativeMethods.EventSystemMenuStart, 536NativeMethods.EventSystemMenuEnd, 537NativeMethods.EventSystemMenuPopupStart, 538NativeMethods.EventSystemMenuPopupEnd, 539NativeMethods.EventSystemCaptureStart, 540NativeMethods.EventSystemCaptureEnd, 541NativeMethods.EventSystemMoveSizeStart, 542NativeMethods.EventSystemMoveSizeEnd, 543NativeMethods.EventSystemContextHelpStart, 544NativeMethods.EventSystemContextHelpEnd, 545NativeMethods.EventSystemDragDropStart, 546NativeMethods.EventSystemDragDropEnd, 547NativeMethods.EventSystemDialogStart, 548NativeMethods.EventSystemDialogEnd, 549NativeMethods.EventSystemScrollingStart, 550NativeMethods.EventSystemScrollingEnd, 551NativeMethods.EventSystemSwitchEnd, 552NativeMethods.EventSystemMinimizeStart, 553NativeMethods.EventSystemMinimizeEnd, 554NativeMethods.EventSystemPaint, 555NativeMethods.EventConsoleCaret, 556NativeMethods.EventConsoleUpdateRegion, 557NativeMethods.EventConsoleUpdateSimple, 558NativeMethods.EventConsoleUpdateScroll, 559NativeMethods.EventConsoleLayout, 560NativeMethods.EventConsoleStartApplication, 561NativeMethods.EventConsoleEndApplication, 562NativeMethods.EventObjectCreate, 563NativeMethods.EventObjectDestroy, 564NativeMethods.EventObjectShow, 565NativeMethods.EventObjectHide, 566NativeMethods.EventObjectReorder, 567NativeMethods.EventObjectFocus, 568NativeMethods.EventObjectSelection, 569NativeMethods.EventObjectSelectionAdd, 570NativeMethods.EventObjectSelectionRemove, 571NativeMethods.EventObjectSelectionWithin, 572NativeMethods.EventObjectStateChange, 573NativeMethods.EventObjectLocationChange, 574NativeMethods.EventObjectNameChange, 575NativeMethods.EventObjectDescriptionChange, 576NativeMethods.EventObjectValueChange, 577NativeMethods.EventObjectParentChange, 578NativeMethods.EventObjectHelpChange, 579NativeMethods.EventObjectDefactionChange, 580NativeMethods.EventObjectAcceleratorChange, 581NativeMethods.EventObjectInvoke, 582NativeMethods.EventObjectTextSelectionChanged
MS\Internal\AutomationProxies\WinFormsSpinner.cs (5)
130IntPtr hwndFirstChild = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 137IntPtr hwndLastChild = Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDLAST); 144if (Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDNEXT) != hwndLastChild) 181if (Accessible.AccessibleObjectFromWindow(hwndSpin, NativeMethods.OBJID_CLIENT, ref acc) != NativeMethods.S_OK || acc == null)
MS\Win32\NativeMethods.cs (2)
1487internal static int comboboxInfoSize = Marshal.SizeOf(typeof(NativeMethods.COMBOBOXINFO)); 1889internal NativeMethods.Win32Point pt;
MS\Win32\SafeNativeMethods.cs (6)
20public static extern bool IntersectRect (ref NativeMethods.Win32Rect rcDest, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2); 30internal static extern bool UnionRect (out NativeMethods.Win32Rect rcDst, ref NativeMethods.Win32Rect rc1, ref NativeMethods.Win32Rect rc2);
MS\Win32\UnsafeNativeMethods.cs (32)
21internal static extern int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf); 33internal static extern void GetSystemInfo(out NativeMethods.SYSTEM_INFO SystemInfo); 113internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags); 148public static extern bool GetMenuItemInfo(IntPtr hMenu, int uItem, bool fByPosition, [In, Out] ref NativeMethods.MENUITEMINFO menuItemInfo); 150public static extern bool GetMenuItemRect(IntPtr hWnd, IntPtr hMenu, int uItem, out NativeMethods.Win32Rect lprcItem); 158internal static extern IntPtr DispatchMessage([In] ref NativeMethods.MSG msg); 160internal static extern int GetMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hWnd, int uMsgFilterMin, int uMsgFilterMax); 162internal static extern bool PeekMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hwnd, int uMsgFilterMin, int uMsgFilterMax, int wRemoveMsg); 170internal static extern IntPtr SendMessageTimeout(IntPtr hwnd, int uMsg, IntPtr wParam, ref NativeMethods.Win32Rect lParam, int flags, int uTimeout, out IntPtr result); 176internal static extern bool TranslateMessage([In, Out] ref NativeMethods.MSG msg); 184internal static extern IntPtr MonitorFromRect(ref NativeMethods.Win32Rect rect, int dwFlags); 194internal static extern int SendInput (int nInputs, ref NativeMethods.INPUT ki, int cbSize); 227internal static extern bool GetComboBoxInfo(IntPtr hwnd, [In, Out] ref NativeMethods.COMBOBOXINFO cbInfo); 233internal static extern bool GetCursorPos([In, Out] ref NativeMethods.Win32Point pt); 235internal static extern bool GetPhysicalCursorPos([In, Out] ref NativeMethods.Win32Point pt); 247internal static extern bool GetScrollBarInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollBarInfo lpsi); 249internal static extern bool GetScrollInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollInfo lpsi); 255internal unsafe static extern bool EnumChildWindows(IntPtr hwndParent, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam); 261internal static extern bool GetClientRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect); 263internal static extern bool GetGUIThreadInfo(uint idThread, ref NativeMethods.GUITHREADINFO guiThreadInfo); 267internal static extern bool GetWindowRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect); 291internal NativeMethods.Win32Point ptStart; 325internal NativeMethods.Win32Rect rcTitleBar; 326[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = NativeMethods.CCHILDREN_TITLEBAR + 1)] 334internal NativeMethods.Win32Rect rcTitleBar; 335[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = NativeMethods.CCHILDREN_TITLEBAR + 1)] 337[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = NativeMethods.CCHILDREN_TITLEBAR + 1)] 338internal NativeMethods.Win32Rect[] rgrect; 356internal NativeMethods.Win32Rect rc; 387iResult = NativeMethods.IntPtrToInt32(result); 446public NativeMethods.Win32Point pt; 472public NativeMethods.Win32Point pt;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (4)
73public static extern bool GetMenuBarInfo (IntPtr hwnd, int idObject, uint idItem, ref NativeMethods.MENUBARINFO mbi); 76public static extern int GetTextExtentPoint32(IntPtr hdc, [MarshalAs(UnmanagedType.LPWStr)]string lpString, int cbString, out NativeMethods.SIZE lpSize); 85public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Rect rect, int cPoints); 88public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Point pt, int cPoints);