]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/gauge95.cpp
drawing optimization fix
[wxWidgets.git] / src / msw / gauge95.cpp
index 285d0581c113830cb5f8eed6ff3ca6e80a30397b..e48513d6808526355d317f6919f6b7437f8619e8 100644 (file)
@@ -24,7 +24,7 @@
 #include "wx/defs.h"
 #endif
 
-#if USE_GAUGE && defined(__WIN95__)
+#if wxUSE_GAUGE && defined(__WIN95__)
 
 #include "wx/msw/gauge95.h"
 #include "wx/msw/private.h"
@@ -50,9 +50,10 @@ bool wxGauge95::Create(wxWindow *parent, wxWindowID id,
 
   if (parent) parent->AddChild(this);
   m_rangeMax = range;
+  m_gaugePos = 0;
 
-  SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
-  SetForegroundColour(parent->GetDefaultForegroundColour()) ;
+  SetBackgroundColour(parent->GetBackgroundColour()) ;
+  SetForegroundColour(parent->GetForegroundColour()) ;
 
   m_windowStyle = style;
 
@@ -177,4 +178,4 @@ void wxGauge95::SetBackgroundColour(const wxColour& col)
   m_backgroundColour = col ;
 }
 
-#endif // USE_GAUGE
+#endif // wxUSE_GAUGE