private static extern bool EndPaint(IntPtr hWnd, ref SBNFormController.PAINTSTRUCT ps);
protected void CustomProc(ref Message m) { int msg = m.Msg; if (msg <= 15) { if (msg == 1) { this.GetFrameSize(); this.FrameChanged(); m.Result = SBNFormController.MSG_HANDLED; base.WndProc(ref m); return; } if (msg != 6) { if (msg != 15) { goto IL_316; } SBNFormController.PAINTSTRUCT pAINTSTRUCT = default(SBNFormController.PAINTSTRUCT); if (!this._bPainting) { this._bPainting = true; SBNFormController.BeginPaint(m.HWnd, ref pAINTSTRUCT); this.PaintThis(pAINTSTRUCT.hdc, pAINTSTRUCT.rcPaint); SBNFormController.EndPaint(m.HWnd, ref pAINTSTRUCT); this._bPainting = false; base.WndProc(ref m); } else { base.WndProc(ref m); } return; } } else { switch (msg) { case 131: if (m.WParam != IntPtr.Zero && m.Result == IntPtr.Zero) { if (this._bExtendIntoFrame) { SBNFormController.NCCALCSIZE_PARAMS nCCALCSIZE_PARAMS = (SBNFormController.NCCALCSIZE_PARAMS)Marshal.PtrToStructure(m.LParam, typeof(SBNFormController.NCCALCSIZE_PARAMS)); nCCALCSIZE_PARAMS.rect0.Top = nCCALCSIZE_PARAMS.rect0.Top - ((this._tMargins.cyTopHeight > this.CaptionHeight) ? this.CaptionHeight : this._tMargins.cyTopHeight); nCCALCSIZE_PARAMS.rect1 = nCCALCSIZE_PARAMS.rect0; Marshal.StructureToPtr(nCCALCSIZE_PARAMS, m.LParam, false); m.Result = (IntPtr)1024; } base.WndProc(ref m); } else { base.WndProc(ref m); } return; case 132: if (m.Result == (IntPtr)0L) { IntPtr zero = IntPtr.Zero; if (SBNFormController.DwmDefWindowProc(m.HWnd, (uint)m.Msg, m.WParam, m.LParam, ref zero)) { m.Result = zero; } else { m.Result = (IntPtr)((long)this.HitTest()); } } else { base.WndProc(ref m); } return; default: if (msg == 274) { uint num; if (IntPtr.Size == 4) { num = (uint)m.WParam.ToInt32(); } else { num = (uint)m.WParam.ToInt64(); } if ((num & 65520u) == 61728u) { this.CurrentForm.Height = this._iStoreHeight; } else if (this.CurrentForm.WindowState == FormWindowState.Normal) { this._iStoreHeight = this.CurrentForm.Height; } base.WndProc(ref m); return; } if (msg != 798) { goto IL_316; } break; } } SBNFormController.DwmExtendFrameIntoClientArea(this.CurrentForm.Handle, ref this._tMargins); m.Result = SBNFormController.MSG_HANDLED; base.WndProc(ref m); return; IL_316: base.WndProc(ref m); }
private static extern IntPtr BeginPaint(IntPtr hWnd, ref SBNFormController.PAINTSTRUCT ps);