protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { if (!_isDisposed) { switch ((WindowMessage)msg) { case WindowMessage.PAINT: // Block background color updates var paint = new PAINTSTRUCT(32); Win32Helper.BeginPaint(Handle, ref paint); Win32Helper.EndPaint(Handle, ref paint); _Refresh(); break; } } return(base.WndProc(hwnd, msg, wParam, lParam, ref handled)); }
public static void MakeCurrentContext(ContextHandle context) { Win32Helper.MakeCurrent(context.HDC, context.Handle);//激活当前渲染上下文 _current = context; }
protected override void DestroyWindowCore(HandleRef hwnd) { Win32Helper.DestroyWindow(hwnd.Handle); }