@@ -298,6 +298,7 @@ class ParamsDialog {
298
298
unique_ptr<ParamSource> source;
299
299
HWND dialog;
300
300
HWND paramCombo;
301
+ WNDPROC paramComboOrigProc;
301
302
HWND slider;
302
303
HWND valueEdit;
303
304
HWND valueLabel;
@@ -461,6 +462,20 @@ class ParamsDialog {
461
462
return FALSE ;
462
463
}
463
464
465
+ static INT_PTR CALLBACK wndProc (HWND hwnd, UINT msg, WPARAM wParam,
466
+ LPARAM lParam
467
+ ) {
468
+ ParamsDialog* dialog = (ParamsDialog*)GetWindowLongPtr (GetParent (hwnd),
469
+ GWLP_USERDATA);
470
+ if (msg == WM_SETFOCUS && dialog && hwnd == dialog->paramCombo ) {
471
+ // Changing a param value might update param names; e.g. changing the
472
+ // band type in ReaEq.
473
+ dialog->updateParamList ();
474
+ return 0 ;
475
+ }
476
+ return CallWindowProc (dialog->paramComboOrigProc , hwnd, msg, wParam, lParam);
477
+ }
478
+
464
479
accelerator_register_t accelReg;
465
480
static int translateAccel (MSG* msg, accelerator_register_t * accelReg) {
466
481
ParamsDialog* dialog = (ParamsDialog*)accelReg->user ;
@@ -634,6 +649,8 @@ class ParamsDialog {
634
649
SetWindowText (this ->dialog , this ->source ->getTitle ().c_str ());
635
650
this ->paramCombo = GetDlgItem (this ->dialog , ID_PARAM);
636
651
WDL_UTF8_HookComboBox (this ->paramCombo );
652
+ this ->paramComboOrigProc = (WNDPROC)SetWindowLongPtr (this ->paramCombo ,
653
+ GWLP_WNDPROC, (LONG_PTR)this ->wndProc );
637
654
this ->slider = GetDlgItem (this ->dialog , ID_PARAM_VAL_SLIDER);
638
655
// We need to do exotic stuff with this slider that we can't support on Mac:
639
656
// 1. Custom step values (TBM_SETLINESIZE, TBM_SETPAGESIZE).
0 commit comments