diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-15 11:10:19 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-15 11:10:19 +0000 |
commit | 8e10b13b38995be8e810342d21040a4324cbfeef (patch) | |
tree | fe373e4254f152baceceb96837589a0f1fc90100 /plugins/TopToolBar/src | |
parent | ec72adc886bfaac0cb1ed19520a555bbe0f9f1cd (diff) |
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
Diffstat (limited to 'plugins/TopToolBar/src')
-rw-r--r-- | plugins/TopToolBar/src/toolbarwnd.cpp | 21 |
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:
|