Esempio n. 1
0
		internal static extern bool EndPaint(IntPtr hWnd, ref PAINTSTRUCT ps);
Esempio n. 2
0
		private void PerformWmPaint(ref Message m)
		{
			PAINTSTRUCT paintstruct1;
			RECT rect1;
			Rectangle rectangle1;
			paintstruct1 = new PAINTSTRUCT();
			IntPtr ptr1 = User32.BeginPaint(m.HWnd, ref paintstruct1);
			rect1 = new RECT();
			User32.GetWindowRect(base.Handle, ref rect1);
			rectangle1 = new Rectangle(0, 0, rect1.right - rect1.left, rect1.bottom - rect1.top);
			using (Graphics graphics1 = Graphics.FromHdc(ptr1))
			{
				Bitmap bitmap1 = new Bitmap(rectangle1.Width, rectangle1.Height);
				using (Graphics graphics2 = Graphics.FromImage(bitmap1))
				{
					this.OnPaint(new PaintEventArgs(graphics2, rectangle1));
				}
				graphics1.DrawImageUnscaled(bitmap1, 0, 0);
			}
			User32.EndPaint(m.HWnd, ref paintstruct1);
		}
Esempio n. 3
0
		internal static extern IntPtr BeginPaint(IntPtr hWnd, ref PAINTSTRUCT ps);