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 --- plugins/DbEditorPP/src/moduletree.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'plugins/DbEditorPP/src/moduletree.cpp') diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp index f7667f6f27..ea520eacc2 100644 --- a/plugins/DbEditorPP/src/moduletree.cpp +++ b/plugins/DbEditorPP/src/moduletree.cpp @@ -564,15 +564,11 @@ void __cdecl PopulateModuleTreeThreadFunc(LPVOID di) } - -static WNDPROC ModuleTreeLabelEditSubClass; - static LRESULT CALLBACK ModuleTreeLabelEditSubClassProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam) { switch(msg) { case WM_KEYUP: - switch (wParam) - { + switch (wParam) { case VK_RETURN: TreeView_EndEditLabelNow(GetParent(hwnd),0); return 0; @@ -582,8 +578,9 @@ static LRESULT CALLBACK ModuleTreeLabelEditSubClassProc(HWND hwnd,UINT msg,WPARA } break; } - return CallWindowProc(ModuleTreeLabelEditSubClass,hwnd,msg,wParam,lParam); + return mir_callNextSubclass(hwnd, ModuleTreeLabelEditSubClassProc, msg, wParam, lParam); } + void moduleListRightClick(HWND hwnd, WPARAM wParam,LPARAM lParam); void moduleListWM_NOTIFY(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)// hwnd here is to the main window, NOT the treview @@ -751,7 +748,7 @@ void moduleListWM_NOTIFY(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)// hwnd SetWindowLongPtr(hwnd, DWLP_MSGRESULT, TRUE); break; } - ModuleTreeLabelEditSubClass = (WNDPROC)SetWindowLongPtr(hwnd2Edit, GWLP_WNDPROC, (LONG)ModuleTreeLabelEditSubClassProc); + mir_subclassWindow(hwnd2Edit, ModuleTreeLabelEditSubClassProc); SetWindowLongPtr(hwnd, DWLP_MSGRESULT, FALSE); } break; -- cgit v1.2.3