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/Clist_nicer/src/Coolsb/coolsblib.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/Clist_nicer/src/Coolsb/coolsblib.cpp') diff --git a/plugins/Clist_nicer/src/Coolsb/coolsblib.cpp b/plugins/Clist_nicer/src/Coolsb/coolsblib.cpp index beb4d164e8..127d11f173 100644 --- a/plugins/Clist_nicer/src/Coolsb/coolsblib.cpp +++ b/plugins/Clist_nicer/src/Coolsb/coolsblib.cpp @@ -240,7 +240,7 @@ BOOL WINAPI InitializeCoolSB(HWND hwnd) sw->bPreventStyleChange = FALSE; - sw->oldproc = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)CoolSBWndProc); + mir_subclassWindow(hwnd, CoolSBWndProc); CoolSB_SetMinThumbSize(hwnd, SB_BOTH, CoolSB_GetDefaultMinThumbSize()); @@ -574,17 +574,14 @@ HRESULT WINAPI UninitializeCoolSB(HWND hwnd) SCROLLWND *sw = GetScrollWndFromHwnd(hwnd); if ( !sw) return E_FAIL; - //restore the window procedure with the original one - SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)sw->oldproc); - RemoveProp(hwnd, szPropStr); //SetWindowLongPtr(hwnd, GWLP_USERDATA, 0); //finally, release the memory needed for the cool scrollbars HeapFree(GetProcessHeap(), 0, sw); - //Force WM_NCCALCSIZE and WM_NCPAINT so the original scrollbars can kick in - RedrawNonClient(hwnd, TRUE); + //Force WM_NCCALCSIZE and WM_NCPAINT so the original scrollbars can kick in + RedrawNonClient(hwnd, TRUE); return S_OK; } -- cgit v1.2.3