From 8e10b13b38995be8e810342d21040a4324cbfeef Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 15 Jul 2013 11:10:19 +0000 Subject: nasty clutch with the custom window proc replaced with the standard mir_subclassWindow git-svn-id: http://svn.miranda-ng.org/main/trunk@5359 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TopToolBar/src/toolbarwnd.cpp | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'plugins/TopToolBar/src/toolbarwnd.cpp') diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp index b0778edff9..082ea3a590 100644 --- a/plugins/TopToolBar/src/toolbarwnd.cpp +++ b/plugins/TopToolBar/src/toolbarwnd.cpp @@ -117,10 +117,6 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara { static bool supressRepos = false; - if (g_ctrl->fnWindowProc != NULL) - if ( g_ctrl->fnWindowProc(hwnd, msg, wParam, lParam)) - return g_ctrl->lResult; - switch(msg) { case WM_CREATE: g_ctrl->hWnd = hwnd; @@ -227,19 +223,12 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara } break; - case TTB_SETCUSTOM: - { - TTBCtrlCustomize *pCustom = (TTBCtrlCustomize*)lParam; - if (pCustom == NULL || g_ctrl->fnWindowProc) - break; - - g_ctrl = (TTBCtrl*)mir_realloc(g_ctrl, pCustom->cbLen); - if (pCustom->cbLen > sizeof(TTBCtrl)) - memset(g_ctrl+1, 0, pCustom->cbLen - sizeof(TTBCtrl)); + case TTB_SETCUSTOMDATASIZE: + g_ctrl = (TTBCtrl*)mir_realloc(g_ctrl, lParam); + if (lParam > sizeof(TTBCtrl)) + memset(g_ctrl+1, 0, lParam - sizeof(TTBCtrl)); - g_ctrl->fnWindowProc = pCustom->fnWindowProc; - SetWindowLongPtr(hwnd, 0, (LONG_PTR)g_ctrl); - } + SetWindowLongPtr(hwnd, 0, (LONG_PTR)g_ctrl); break; default: -- cgit v1.2.3