set bkmode to BM_TRANSPARENT when having WS_EX_TRANSPARENT exStyle

This commit is contained in:
Vincent Wei
2022-11-13 11:53:16 +08:00
parent 39f96f407f
commit 53d40508a4

View File

@@ -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;