protected override void WndProc(ref Message m) { try { switch (m.Msg) { case 0x200: case 0x202: this.DrawScrollBar(m.HWnd, this._maskControl.Handle); base.WndProc(ref m); return; case 0x201: this._lastMouseDownHistTest = this.ScrollBarHitTest(m.HWnd); this.DrawScrollBar(m.HWnd, this._maskControl.Handle); base.WndProc(ref m); return; case 0x2a3: this.DrawScrollBar(m.HWnd, this._maskControl.Handle); base.WndProc(ref m); return; case 0xe9: this.DrawScrollBar(m.HWnd, this._maskControl.Handle, true, false); base.WndProc(ref m); return; case 15: if (!this._bPainting) { Win32.Struct.PAINTSTRUCT ps = new Win32.Struct.PAINTSTRUCT(); this._bPainting = true; Win32.NativeMethods.BeginPaint(m.HWnd, ref ps); this.DrawScrollBar(m.HWnd, this._maskControl.Handle); Win32.NativeMethods.ValidateRect(m.HWnd, ref ps.rcPaint); Win32.NativeMethods.EndPaint(m.HWnd, ref ps); this._bPainting = false; m.Result = Win32.Result.TRUE; } else { base.WndProc(ref m); } return; case 0x47: { Win32.Struct.WINDOWPOS windowpos = (Win32.Struct.WINDOWPOS)Marshal.PtrToStructure(m.LParam, typeof(Win32.Struct.WINDOWPOS)); bool flag = (windowpos.flags & 0x80L) != 0L; bool flag2 = (windowpos.flags & 0x40L) != 0L; if (flag) { this._maskControl.SetVisibale(false); } else if (flag2) { this._maskControl.SetVisibale(true); } this._maskControl.CheckBounds(m.HWnd); base.WndProc(ref m); return; } case 0x7d: this.DrawScrollBar(m.HWnd, this._maskControl.Handle, false, true); base.WndProc(ref m); return; } base.WndProc(ref m); } catch { } }
protected override void WndProc(ref Message m) { try { switch (m.Msg) { case 0x200: case 0x202: this.DrawScrollBar(m.HWnd, this._maskControl.Handle); base.WndProc(ref m); return; case 0x201: this._lastMouseDownHistTest = this.ScrollBarHitTest(m.HWnd); this.DrawScrollBar(m.HWnd, this._maskControl.Handle); base.WndProc(ref m); return; case 0x2a3: this.DrawScrollBar(m.HWnd, this._maskControl.Handle); base.WndProc(ref m); return; case 0xe9: this.DrawScrollBar(m.HWnd, this._maskControl.Handle, true, false); base.WndProc(ref m); return; case 15: if (!this._bPainting) { Win32.Struct.PAINTSTRUCT ps = new Win32.Struct.PAINTSTRUCT(); this._bPainting = true; Win32.NativeMethods.BeginPaint(m.HWnd, ref ps); this.DrawScrollBar(m.HWnd, this._maskControl.Handle); Win32.NativeMethods.ValidateRect(m.HWnd, ref ps.rcPaint); Win32.NativeMethods.EndPaint(m.HWnd, ref ps); this._bPainting = false; m.Result = Win32. Result.TRUE; } else { base.WndProc(ref m); } return; case 0x47: { Win32.Struct.WINDOWPOS windowpos = (Win32.Struct.WINDOWPOS) Marshal.PtrToStructure(m.LParam, typeof(Win32.Struct.WINDOWPOS)); bool flag = (windowpos.flags & 0x80L) != 0L; bool flag2 = (windowpos.flags & 0x40L) != 0L; if (flag) { this._maskControl.SetVisibale(false); } else if (flag2) { this._maskControl.SetVisibale(true); } this._maskControl.CheckBounds(m.HWnd); base.WndProc(ref m); return; } case 0x7d: this.DrawScrollBar(m.HWnd, this._maskControl.Handle, false, true); base.WndProc(ref m); return; } base.WndProc(ref m); } catch { } }