summaryrefslogtreecommitdiff
path: root/plugins/TopToolBar/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TopToolBar/src')
-rw-r--r--plugins/TopToolBar/src/toolbarwnd.cpp21
1 files changed, 5 insertions, 16 deletions
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: