Ejemplo n.º 1
0
        private void PerformWmPaintWmPrintClient(ref Message m, bool isPaintMessage)
        {
            Paintstruct paintstruct1 = new Paintstruct();
            IntPtr      ptr1         = (isPaintMessage ? User32.BeginPaint(m.HWnd, ref paintstruct1) : m.WParam);
            RectStruct  rect1        = new RectStruct();

            User32.GetWindowRect(Handle, ref rect1);
            Rectangle 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))
                    PerformPaint(new PaintEventArgs(graphics2, rectangle1));
                graphics1.DrawImageUnscaled(bitmap1, 0, 0);
            }
            if (isPaintMessage)
            {
                User32.EndPaint(m.HWnd, ref paintstruct1);
            }
        }
Ejemplo n.º 2
0
 internal static extern int GetClipBox(IntPtr hDc, ref RectStruct rectStructBox);
Ejemplo n.º 3
0
 internal static extern IntPtr CreateRectRgnIndirect(ref RectStruct rectStruct);
Ejemplo n.º 4
0
 public static extern bool AdjustWindowRectEx(ref RectStruct lpRectStruct, int dwStyle, bool bMenu, int dwExStyle);
Ejemplo n.º 5
0
 public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref RectStruct rectStruct, int cPoints);
Ejemplo n.º 6
0
 internal static extern bool InvalidateRect(IntPtr hWnd, ref RectStruct rectStruct, bool erase);
Ejemplo n.º 7
0
 internal static extern bool GetWindowRect(IntPtr hWnd, ref RectStruct rectStruct);
Ejemplo n.º 8
0
 public static extern bool GetClientRect(IntPtr hWnd, [In, Out] ref RectStruct rectStruct);
Ejemplo n.º 9
0
 internal static extern bool DrawFocusRect(IntPtr hWnd, ref RectStruct rectStruct);
Ejemplo n.º 10
0
 internal static extern bool GetWindowRect(IntPtr hWnd, ref RectStruct rectStruct);
Ejemplo n.º 11
0
 internal static extern bool InvalidateRect(IntPtr hWnd, ref RectStruct rectStruct, bool erase);
Ejemplo n.º 12
0
 internal static extern bool DrawFocusRect(IntPtr hWnd, ref RectStruct rectStruct);
Ejemplo n.º 13
0
 public static extern bool AdjustWindowRectEx(ref RectStruct lpRectStruct, int dwStyle, bool bMenu, int dwExStyle);
Ejemplo n.º 14
0
 internal static extern int GetClipBox(IntPtr hDc, ref RectStruct rectStructBox);
Ejemplo n.º 15
0
 internal static extern IntPtr CreateRectRgnIndirect(ref RectStruct rectStruct);
Ejemplo n.º 16
0
 private void PerformWmPaintWmPrintClient(ref Message m, bool isPaintMessage)
 {
     Paintstruct paintstruct1 = new Paintstruct();
       IntPtr ptr1 = (isPaintMessage ? User32.BeginPaint(m.HWnd, ref paintstruct1) : m.WParam);
       RectStruct rect1 = new RectStruct();
       User32.GetWindowRect(Handle, ref rect1);
       Rectangle 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))
       PerformPaint(new PaintEventArgs(graphics2, rectangle1));
     graphics1.DrawImageUnscaled(bitmap1, 0, 0);
       }
       if (isPaintMessage)
     User32.EndPaint(m.HWnd, ref paintstruct1);
 }