Exemple #1
0
        /// <summary>
        /// Refreshes the window to get rid of the previously drawn rectangle.
        /// </summary>
        public static void Refresh(IntPtr hWnd)
        {
            Win32.InvalidateRect(hWnd, IntPtr.Zero, true);
            Win32.UpdateWindow(hWnd);

            const Win32.RedrawWindowFlags flags = Win32.RedrawWindowFlags.RDW_FRAME |
                                                  Win32.RedrawWindowFlags.RDW_INVALIDATE |
                                                  Win32.RedrawWindowFlags.RDW_UPDATENOW |
                                                  Win32.RedrawWindowFlags.RDW_ALLCHILDREN;

            Win32.RedrawWindow(hWnd, IntPtr.Zero, IntPtr.Zero, flags);
        }
Exemple #2
0
 public static extern bool RedrawWindow(IntPtr hWnd, IntPtr lprcUpdate, IntPtr hrgnUpdate, Win32.RedrawWindowFlags flags);