From 1ac56a2aa26cc403efe758fc53386a3dc0e706b7 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Fri, 2 Dec 2022 11:42:16 -0800 Subject: [PATCH] Added code, to set the background mode for IDC_IMAGE, fixing a transparency issue for Windows Common Controls v6 --- meshservice/ServiceMain.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meshservice/ServiceMain.c b/meshservice/ServiceMain.c index f67d045..8293715 100644 --- a/meshservice/ServiceMain.c +++ b/meshservice/ServiceMain.c @@ -1168,6 +1168,12 @@ INT_PTR CALLBACK DialogHandler(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP SetTextColor((HDC)wParam, gFGCOLOR); return (INT_PTR)GetStockObject(NULL_BRUSH); } + if ((HWND)lParam == GetDlgItem(hDlg, IDC_IMAGE)) + { + // Set the background mode to transparent for the customized bitmap + SetBkMode((HDC)wParam, TRANSPARENT); + return (INT_PTR)GetStockObject(NULL_BRUSH); + } break; } case WM_PAINT: