internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) { IRawElementProviderSimple rawElementProviderSimple = null; try { ProxyFragment parent = null; WindowsAltTab altTab = new WindowsAltTab(hwnd, parent, 0); if (idChild == 0) { rawElementProviderSimple = altTab; } else { rawElementProviderSimple = altTab.CreateAltTabItem(idChild - 1); } } catch (ElementNotAvailableException) { rawElementProviderSimple = null; } return(rawElementProviderSimple); }
// ------------------------------------------------------ // // Constructors // // ------------------------------------------------------ #region Constructors // Constructor. internal WindowsAltTabItem(IntPtr hwnd, WindowsAltTab parent, int item) : base(hwnd, parent, item) { _cControlType = ControlType.ListItem; _fIsKeyboardFocusable = true; _altTab = parent; }
// Static Create method called by the event tracker system internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) { if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) { ProxySimple el = (ProxyHwnd)WindowsAltTab.Create(hwnd, 0); if (el != null) { el.DispatchEvents(eventId, idProp, idObject, idChild); } } }
internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) { IRawElementProviderSimple rawElementProviderSimple = null; try { ProxyFragment parent = null; WindowsAltTab altTab = new WindowsAltTab(hwnd, parent, 0); if (idChild == 0) { rawElementProviderSimple = altTab; } else { rawElementProviderSimple = altTab.CreateAltTabItem(idChild - 1); } } catch (ElementNotAvailableException) { rawElementProviderSimple = null; } return rawElementProviderSimple; }