From 66cb770a982a2502456d10d73838df2b7239fd89 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 4 Mar 2013 07:23:42 +0000 Subject: new subclassing functions applied to all plugins git-svn-id: http://svn.miranda-ng.org/main/trunk@3880 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/plugins/newplugins.cpp | 2 ++ src/modules/plugins/pluginopts.cpp | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/plugins') diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index b3c46d4482..90ea348e59 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -347,6 +347,8 @@ int Plugin_UnloadDyn(pluginEntry *p) if ( CallPluginEventHook(p->bpi.hInst, hOkToExitEvent, 0, 0) != 0) return FALSE; + KillModuleSubclassing(p->bpi.hInst); + CallPluginEventHook(p->bpi.hInst, hPreShutdownEvent, 0, 0); CallPluginEventHook(p->bpi.hInst, hShutdownEvent, 0, 0); diff --git a/src/modules/plugins/pluginopts.cpp b/src/modules/plugins/pluginopts.cpp index 8448b255bb..12aa248e31 100644 --- a/src/modules/plugins/pluginopts.cpp +++ b/src/modules/plugins/pluginopts.cpp @@ -229,8 +229,7 @@ static LRESULT CALLBACK PluginListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LP ListView_SetItem(hwnd, &lvi); } } } } } - WNDPROC wnProc = (WNDPROC)GetWindowLongPtr(hwnd, GWLP_USERDATA); - return CallWindowProc(wnProc, hwnd, msg, wParam, lParam); + return mir_callNextSubclass(hwnd, PluginListWndProc, msg, wParam, lParam); } static int CALLBACK SortPlugins(WPARAM i1, LPARAM i2, LPARAM lParamSort) @@ -254,8 +253,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar TranslateDialogDefault(hwndDlg); { HWND hwndList = GetDlgItem(hwndDlg, IDC_PLUGLIST); - SetWindowLongPtr(hwndList, GWLP_USERDATA, (LONG_PTR)GetWindowLongPtr(hwndList, GWLP_WNDPROC)); - SetWindowLongPtr(hwndList, GWLP_WNDPROC, (LONG_PTR)PluginListWndProc); + mir_subclassWindow(hwndList, PluginListWndProc); HIMAGELIST hIml = ImageList_Create(16, 16, ILC_MASK | (IsWinVerXPPlus()? ILC_COLOR32 : ILC_COLOR16), 4, 0); ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_UNICODE); -- cgit v1.2.3