From 53d40508a453365bf3548e1f9fdeb1a422f7713e Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Sun, 13 Nov 2022 11:53:16 +0800 Subject: [PATCH] set bkmode to BM_TRANSPARENT when having WS_EX_TRANSPARENT exStyle --- src/control/bidiedit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/control/bidiedit.c b/src/control/bidiedit.c index 2422e2df..97b8150e 100644 --- a/src/control/bidiedit.c +++ b/src/control/bidiedit.c @@ -210,6 +210,7 @@ static void setup_dc (HWND hWnd, BIDISLEDITDATA *sled, HDC hdc, BOOL bSel) DWORD dwStyle = GetWindowStyle (hWnd); if (!bSel) { + SetBkMode (hdc, BM_TRANSPARENT); if (dwStyle & WS_DISABLED) SetTextColor (hdc, @@ -583,7 +584,7 @@ static void slePaint (HWND hWnd, HDC hdc, PBIDISLEDITDATA sled) /* draw selected chars */ setup_dc (hWnd, sled, hdc, TRUE); - outw += DrawACharString (hdc, startx + outw, starty, + outw += DrawACharString (hdc, startx + outw, starty, achar_string, sled->selEnd - sled->selStart, NULL, NULL); achar_string += sled->selEnd - sled->selStart; @@ -2504,7 +2505,7 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) unsigned char charBuffer [4]; int chars; - _DBG_PRINTF("get char-----------------char----%p\n", (PVOID)wParam); + _DBG_PRINTF("get a MSG_CHAR: %p\n", (PVOID)wParam); if (dwStyle & ES_READONLY) return 0;