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 /src/modules/skin/hotkey_opts.cpp | |
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 'src/modules/skin/hotkey_opts.cpp')
-rw-r--r-- | src/modules/skin/hotkey_opts.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/modules/skin/hotkey_opts.cpp b/src/modules/skin/hotkey_opts.cpp index b2159e5032..ed6a4bd40b 100644 --- a/src/modules/skin/hotkey_opts.cpp +++ b/src/modules/skin/hotkey_opts.cpp @@ -142,29 +142,23 @@ static LRESULT CALLBACK sttHotkeyEditProc(HWND hwnd, UINT msg, WPARAM wParam, LP return TRUE;
case WM_DESTROY:
- {
- WNDPROC saveOldWndProc = data->oldWndProc;
- SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)data->oldWndProc);
- SetWindowLongPtr(hwnd, GWLP_USERDATA, 0);
- mir_free(data);
- return CallWindowProc(saveOldWndProc, hwnd, msg, wParam, lParam);
- }
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, 0);
+ mir_free(data);
}
- return CallWindowProc(data->oldWndProc, hwnd, msg, wParam, lParam);
+ return mir_callNextSubclass(hwnd, sttHotkeyEditProc, msg, wParam, lParam);
}
void HotkeyEditCreate(HWND hwnd)
{
THotkeyBoxData *data = (THotkeyBoxData *)mir_alloc(sizeof(THotkeyBoxData));
SetWindowLongPtr(hwnd, GWLP_USERDATA, (ULONG_PTR)data);
- data->oldWndProc = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (ULONG_PTR)sttHotkeyEditProc);
+ mir_subclassWindow(hwnd, sttHotkeyEditProc);
}
void HotkeyEditDestroy(HWND hwnd)
{
THotkeyBoxData *data = (THotkeyBoxData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
- SetWindowLongPtr(hwnd, GWLP_WNDPROC, (ULONG_PTR)data->oldWndProc);
SetWindowLongPtr(hwnd, GWLP_USERDATA, 0);
mir_free(data);
}
|