From 8e41fde785e952d6b7499386b4a34c99f1d034d2 Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Sat, 23 May 2020 15:13:42 +0200 Subject: combo: add hack pre-95 to color space between edit and button --- alf/alfcombobox.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'alf') diff --git a/alf/alfcombobox.cpp b/alf/alfcombobox.cpp index a227a8d..3ce7326 100644 --- a/alf/alfcombobox.cpp +++ b/alf/alfcombobox.cpp @@ -285,6 +285,13 @@ ALF__ComboWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return TRUE; } + if (!ALF_Compat_IsMinWindowsVersion(4, 0)) { + // HACK to draw the space between edit control and button as COLOR_BTNFACE + if (uMsg == WM_CTLCOLORLISTBOX && priv && !(GetWindowLong(priv->hwndChild, GWL_STYLE) & 1)) { + return (LRESULT)GetSysColorBrush(COLOR_BTNFACE); + } + } + if (ALF_ShouldMessageBubble(hwnd, uMsg, wParam, lParam)) { return SendMessage(GetParent(hwnd), uMsg, wParam, lParam); } @@ -329,7 +336,7 @@ ALF_InternalAddComboBox(HWND win, WORD id, int x, int y, DWORD style, const TCHA 0, 0, 0, 0, win, (HMENU)(ULONG_PTR)id, - (HINSTANCE)GetWindowLongPtr(win, GWLP_HINSTANCE), + ALF_HINSTANCE, &cp); if (defaultText) -- cgit v1.2.3