summaryrefslogtreecommitdiff
path: root/plugins/BASS_interface/src/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/BASS_interface/src/Main.cpp')
-rw-r--r--plugins/BASS_interface/src/Main.cpp11
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);
}