internal override void WinEventProc(int eventId, IntPtr hwnd) { Invariant.Assert(eventId == NativeMethods.EVENT_SYSTEM_MOVESIZEEND); if (_arTextStore != null) { for (int i = 0; i < _arTextStore.Count; i++) { bool notified = false; TextStore textstore = (TextStore)_arTextStore[i]; IntPtr hwndTemp = textstore.CriticalSourceWnd; while (hwndTemp != IntPtr.Zero) { if (hwnd == hwndTemp) { // Only when the parent window of the source of this TextStore is // moved or resized, we notfiy to Cicero. textstore.OnLayoutUpdated(); notified = true; break; } hwndTemp = UnsafeNativeMethods.GetParent(new HandleRef(this, hwndTemp)); } if (!notified) { textstore.MakeLayoutChangeOnGotFocus(); } } } }
internal override void WinEventProc(int eventId, IntPtr hwnd) { Invariant.Assert(eventId == 11); if (this._arTextStore != null) { for (int i = 0; i < this._arTextStore.Count; i++) { bool flag = false; TextStore textStore = (TextStore)this._arTextStore[i]; IntPtr intPtr = textStore.CriticalSourceWnd; while (intPtr != IntPtr.Zero) { if (hwnd == intPtr) { textStore.OnLayoutUpdated(); flag = true; break; } intPtr = UnsafeNativeMethods.GetParent(new HandleRef(this, intPtr)); } if (!flag) { textStore.MakeLayoutChangeOnGotFocus(); } } } }