From f92563fa59cd21d339f98288c60b81a51109fa01 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 15 Jul 2013 11:44:40 +0000 Subject: same clutch removed for MButtonCtrl, mir_subclassWindow won again git-svn-id: http://svn.miranda-ng.org/main/trunk@5360 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/CLCButton.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'plugins/Clist_nicer/src/CLCButton.cpp') diff --git a/plugins/Clist_nicer/src/CLCButton.cpp b/plugins/Clist_nicer/src/CLCButton.cpp index 01a0b6281d..dc18a6d6b2 100644 --- a/plugins/Clist_nicer/src/CLCButton.cpp +++ b/plugins/Clist_nicer/src/CLCButton.cpp @@ -379,16 +379,14 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR if (bct->stateId != PBS_DISABLED && bct->cHot && bct->cHot == tolower((int) wParam)) { if ( !bct->bSendOnDown) SendMessage(pcli->hwndContactList, WM_COMMAND, MAKELONG(bct->iCtrlID, BN_CLICKED), (LPARAM) hwnd); - bct->lResult = 0; - return 1; + return 0; } break; case BM_GETIMAGE: - if (wParam == IMAGE_ICON) { - bct->lResult = (LRESULT)(bct->hIconPrivate ? bct->hIconPrivate : bct->hIcon); - return 1; - } + if (wParam == IMAGE_ICON) + return (LRESULT)(bct->hIconPrivate ? bct->hIconPrivate : bct->hIcon); + break; case BM_SETIMAGE: @@ -489,20 +487,16 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR switch( SendMessage(pcli->hwndContactList, WM_NCHITTEST, wParam, lParam)) { case HTLEFT: case HTRIGHT: case HTBOTTOM: case HTTOP: case HTTOPLEFT: case HTTOPRIGHT: case HTBOTTOMLEFT: case HTBOTTOMRIGHT: - bct->lResult = HTTRANSPARENT; - return 1; + return HTTRANSPARENT; } } - return 0; + return mir_callNextSubclass(hwnd, TSButtonWndProc, msg, wParam, lParam); } static void SetButtonAsCustom(HWND hWnd) { - MButtonCustomize Custom; - Custom.cbLen = sizeof(MButtonExtension); - Custom.fnPainter = (pfnPainterFunc)PaintWorker; - Custom.fnWindowProc = TSButtonWndProc; - SendMessage(hWnd, BUTTONSETCUSTOM, 0, (LPARAM)&Custom); + SendMessage(hWnd, BUTTONSETCUSTOMPAINT, sizeof(MButtonExtension), (LPARAM)PaintWorker); + mir_subclassWindow(hWnd, TSButtonWndProc); } static LRESULT CALLBACK ToolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -- cgit v1.2.3