summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/modern_tbbutton.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-19 17:01:50 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-19 17:01:50 +0000
commit638ccde5cf7428b75d0de5c0254ce07261085fee (patch)
tree830e697eb0904c50abe41ba66c4b57ff5e903196 /plugins/Clist_modern/modern_tbbutton.cpp
parent394540126b181982d8b61d07a084ceeac8559ed1 (diff)
button control moved to wParam everywhere
git-svn-id: http://svn.miranda-ng.org/main/trunk@483 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/modern_tbbutton.cpp')
-rw-r--r--plugins/Clist_modern/modern_tbbutton.cpp37
1 files changed, 15 insertions, 22 deletions
diff --git a/plugins/Clist_modern/modern_tbbutton.cpp b/plugins/Clist_modern/modern_tbbutton.cpp
index f6dac962f5..bf0fe2add4 100644
--- a/plugins/Clist_modern/modern_tbbutton.cpp
+++ b/plugins/Clist_modern/modern_tbbutton.cpp
@@ -256,35 +256,28 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
SendMessage(hwndToolTips, TTM_ADDTOOL, 0, (LPARAM) &ti);
break;
}
+
case BUTTONSETASPUSHBTN:
- {
+ lpSBData->pushBtn = (wParam != 0);
+ lpSBData->pbState = (lParam & 2) != 0;
+ return 0;
- if (lParam==0)
- lpSBData->pushBtn=1;
- else
- {
- lpSBData->pushBtn=wParam;
- lpSBData->pbState = (lParam&2) ? TRUE : FALSE;
- }
- return 0;
- }
case WM_SETFOCUS:
- {
- // set keyboard focus and redraw
- lpSBData->fFocused = TRUE;
- InvalidateParentRect(lpSBData->hWnd, NULL, TRUE);
- break;
- }
+ // set keyboard focus and redraw
+ lpSBData->fFocused = TRUE;
+ InvalidateParentRect(lpSBData->hWnd, NULL, TRUE);
+ break;
+
case WM_KILLFOCUS:
- {
- // kill focus and redraw
- lpSBData->fFocused = FALSE;
- InvalidateParentRect(lpSBData->hWnd, NULL, TRUE);
- break;
- }
+ // kill focus and redraw
+ lpSBData->fFocused = FALSE;
+ InvalidateParentRect(lpSBData->hWnd, NULL, TRUE);
+ break;
+
case WM_WINDOWPOSCHANGED:
InvalidateParentRect(lpSBData->hWnd, NULL, TRUE);
break;
+
case WM_ENABLE:
// windows tells us to enable/disable
{