From be95698d108c4b4f46f712967c2bd643d53754c0 Mon Sep 17 00:00:00 2001 From: snow flurry Date: Tue, 20 Feb 2024 02:37:01 +0000 Subject: [PATCH] OverlayWndProc: Fix flickering issue The flickering was caused by DefWindowProc trying to erase the background, then GDI painting back in the bitmap. By not letting DefWindowProc draw the background, flickering is effectively removed. git-svn-id: svn://vcs.sdm.2ki.xyz/Grabby/trunk@15 27729192-006e-004d-b9b5-06fbd0ef7001 --- Overlay.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Overlay.c b/Overlay.c index 631147d..f4a9128 100644 --- a/Overlay.c +++ b/Overlay.c @@ -179,6 +179,9 @@ OverlayWndProc(HWND hWnd, EndPaint(hWnd, &ps); break; + case WM_ERASEBKGND: + // Do nothing + return 1; case WM_MOUSEMOVE: if (isDrag && (wParam & MK_LBUTTON)) { POINTS ptPrev = ptCur;