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/BASS_interface/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/BASS_interface/src')
-rw-r--r-- | plugins/BASS_interface/src/Main.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index d477ba81bb..0d94cba08c 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -325,8 +325,6 @@ static void EnableFrameIcon(bool bEnable) }
}
-static WNDPROC OldSliderWndProc = 0;
-
static void fnPainter(MButtonCtrl *btn, HDC hdc)
{
DrawIconEx(hdc, 0, 0, btn->hIcon, 16, 16, 0, hBkgBrush, DI_NORMAL);
@@ -338,7 +336,7 @@ static LRESULT CALLBACK SliderWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case WM_ERASEBKGND:
return TRUE;
}
- return CallWindowProc(OldSliderWndProc, hwnd, msg, wParam, lParam);
+ return mir_callNextSubclass(hwnd, SliderWndProc, msg, wParam, lParam);
}
static LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -358,7 +356,7 @@ static LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR hwnd, (HMENU)0, (HINSTANCE)GetWindowLongPtr(hwnd, GWLP_HINSTANCE), NULL);
SendMessage(hwndSlider, TBM_SETRANGE, FALSE, MAKELONG(SLIDER_MIN, SLIDER_MAX));
SendMessage(hwndSlider, TBM_SETPOS, TRUE, Volume);
- OldSliderWndProc = (WNDPROC)SetWindowLongPtr(hwndSlider, GWLP_WNDPROC, (LPARAM)SliderWndProc);
+ mir_subclassWindow(hwndSlider, SliderWndProc);
break;
case WM_COMMAND:
@@ -409,11 +407,6 @@ static LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR }
break;
- case WM_DESTROY:
- if (hwndSlider && IsWindow(hwndSlider) && OldSliderWndProc != 0)
- SetWindowLongPtr(hwndSlider, GWLP_WNDPROC, (LONG)OldSliderWndProc);
- break;
-
default:
return DefWindowProc(hwnd, msg, wParam, lParam);
}
|