diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-04 07:23:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-04 07:23:42 +0000 |
commit | 66cb770a982a2502456d10d73838df2b7239fd89 (patch) | |
tree | fc419dde94a9be3ebe8f2266ff46feb90d2bcbec /plugins/Ping/src | |
parent | bc256df33a57e585367edffe33d3e58d53f82ce8 (diff) |
new subclassing functions applied to all plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@3880 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Ping/src')
-rw-r--r-- | plugins/Ping/src/pingthread.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index 415f9d7fcc..bf2e0053c8 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -930,8 +930,6 @@ void UpdateFrame() { SetWindowPos(hpwnd, 0, r_clist.left, r_clist.top - height, (r_clist.right - r_clist.left), height, SWP_NOZORDER | SWP_NOACTIVATE);
}
-WNDPROC wpOrigClistProc;
-
// Subclass procedure
LRESULT APIENTRY ClistSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
@@ -948,11 +946,10 @@ LRESULT APIENTRY ClistSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l }
}
- if(uMsg == WM_SHOWWINDOW) {
+ if(uMsg == WM_SHOWWINDOW)
ShowWindow(hpwnd, wParam);
- }
- return CallWindowProc(wpOrigClistProc, hwnd, uMsg, wParam, lParam);
+ return mir_callNextSubclass(hwnd, ClistSubclassProc, uMsg, wParam, lParam);
}
void AttachToClist(bool attach)
@@ -965,15 +962,13 @@ void AttachToClist(bool attach) SetWindowPos(hpwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE);
// subclass clist to trap move/size
- wpOrigClistProc = (WNDPROC) SetWindowLongPtr(hwnd_clist, GWLP_WNDPROC, (LONG_PTR) ClistSubclassProc);
-
+ mir_subclassWindow(hwnd_clist, ClistSubclassProc);
UpdateFrame();
- } else {
+ }
+ else {
SetWindowLong(hpwnd, GWL_STYLE, (WS_POPUPWINDOW | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_VISIBLE | WS_CLIPCHILDREN));
SetWindowLong(hpwnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
SetWindowPos(hpwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE);
-
- SetWindowLongPtr(hwnd_clist, GWLP_WNDPROC, (LONG_PTR) wpOrigClistProc);
}
}
|