+void wxGauge95::SetIndeterminateMode()
+{
+ // add the PBS_MARQUEE style to the progress bar
+ LONG style = ::GetWindowLong(GetHwnd(), GWL_STYLE);
+ if ((style & PBS_MARQUEE) == 0)
+ ::SetWindowLong(GetHwnd(), GWL_STYLE, style|PBS_MARQUEE);
+
+ // now the control can only run in indeterminate mode
+}
+
+void wxGauge95::SetDeterminateMode()
+{
+ // remove the PBS_MARQUEE style to the progress bar
+ LONG style = ::GetWindowLong(GetHwnd(), GWL_STYLE);
+ if ((style & PBS_MARQUEE) != 0)
+ ::SetWindowLong(GetHwnd(), GWL_STYLE, style & ~PBS_MARQUEE);
+
+ // now the control can only run in determinate mode
+}
+
+void wxGauge95::Pulse()
+{
+ if (wxApp::GetComCtl32Version() >= 600)
+ {
+ // switch to indeterminate mode if required
+ SetIndeterminateMode();
+
+ // NOTE: when in indeterminate mode, the PBM_SETPOS message will just make
+ // the bar's blocks move a bit and the WPARAM value is just ignored
+ // so that we can safely use zero
+ SendMessage(GetHwnd(), (UINT) PBM_SETPOS, (WPARAM)0, (LPARAM)0);
+ }
+ else
+ {
+ // emulate indeterminate mode
+ wxGaugeBase::Pulse();
+ }
+}
+