// 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; if (IsInsideOfIPAddress(hwnd)) { el = new ByteEditBoxOverride(hwnd, idChild); } else { el = new WindowsEditBox(hwnd, null, 0); // If this is an Edit control inside of a Microsoft Spinner, need to treat the property // changes for as property changes on the whole Microsoft Spinner, not on the element // of the Microsoft Spinner. Microsoft Spinner raise WinEvents on the Edit portion of // the spinner and not the UpDown portion like the Win32 Spinner. IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); if (hwndParent != IntPtr.Zero) { // Test for spinner - Create checks if the element is a spinner ProxySimple spinner = (ProxySimple)WinformsSpinner.Create(hwndParent, 0); if (spinner != null) { el = spinner; } } } el.DispatchEvents(eventId, idProp, idObject, idChild); } }
// 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; if (IsInsideOfIPAddress(hwnd)) { el = new ByteEditBoxOverride(hwnd, idChild); } else { el = new WindowsEditBox(hwnd, null, 0); // If this is an Edit control inside of a [....] Spinner, need to treat the property // changes for as property changes on the whole [....] Spinner, not on the element // of the [....] Spinner. [....] Spinner raise WinEvents on the Edit portion of // the spinner and not the UpDown portion like the Win32 Spinner. IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); if (hwndParent != IntPtr.Zero) { // Test for spinner - Create checks if the element is a spinner ProxySimple spinner = (ProxySimple)WinformsSpinner.Create(hwndParent, 0); if (spinner != null) { el = spinner; } } } el.DispatchEvents (eventId, idProp, idObject, idChild); } }