summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-15 11:44:40 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-15 11:44:40 +0000
commitf92563fa59cd21d339f98288c60b81a51109fa01 (patch)
tree3f5831465380a967f0c79d9819a41422b7b2c59c /plugins/Clist_nicer
parent8e10b13b38995be8e810342d21040a4324cbfeef (diff)
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
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r--plugins/Clist_nicer/src/CLCButton.cpp22
1 files changed, 8 insertions, 14 deletions
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)