+
+ // When emulating wxSL_INVERSE style in wxWidgets, we need to update the
+ // value after changing the range to ensure that the value seen by the user
+ // code, i.e. the one returned by GetValue(), does not change.
+ if ( HasFlag(wxSL_INVERSE) )
+ {
+ ::SendMessage(GetHwnd(), TBM_SETPOS, TRUE, ValueInvertOrNot(valueOld));
+ }