diff --git a/sane/DlgPage.cpp b/sane/DlgPage.cpp index 06cca17..b0b6895 100644 --- a/sane/DlgPage.cpp +++ b/sane/DlgPage.cpp @@ -1038,7 +1038,7 @@ void dlg_page::set_ctrl_value(HWND ctrl, SANE_Value_Type type, void* val, bool o { if (type == SANE_TYPE_BOOL) { - DWORD id = GetWindowLong(ctrl, GWL_ID); + DWORD id = GetWindowLong(ctrl, GWL_ID) - dlg_page::dyn_id_base; HWND host = (HWND)GetPropW(ctrl, dlg_page::property_host.c_str()); if (IsWindow(host) && (id == id_custom_area_ || id == id_custom_gamma_))