]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/gizmos/statpict.cpp
Don't use a saved label size incase the size changes. Patch from Hong Yuan.
[wxWidgets.git] / contrib / src / gizmos / statpict.cpp
index 42f38b202b9d0f3007a665e009018780290ad43c..a6fd9f768eaec819706f88adddd6f2a59bd21076 100644 (file)
@@ -9,20 +9,15 @@
 // Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-  #pragma implementation "statpict.h"
-#endif
-
 #include "wx/wxprec.h"
 #include "wx/defs.h"
 
 #include "wx/gizmos/statpict.h"
 #include "wx/dcclient.h"
 
 #include "wx/wxprec.h"
 #include "wx/defs.h"
 
 #include "wx/gizmos/statpict.h"
 #include "wx/dcclient.h"
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxStaticPicture, wxControl)
 IMPLEMENT_DYNAMIC_CLASS(wxStaticPicture, wxControl)
-#endif
-
+WXDLLIMPEXP_GIZMOS const wxChar * wxStaticPictureNameStr = wxT("staticPicture");
+    
 /*
  * wxStaticPicture
  */
 /*
  * wxStaticPicture
  */
@@ -94,7 +89,6 @@ void wxStaticPicture::OnPaint(wxPaintEvent& WXUNUSED(event))
 
     wxPaintDC dc( this );
     PrepareDC( dc );
 
     wxPaintDC dc( this );
     PrepareDC( dc );
-    dc.BeginDrawing();
 
     wxSize sz = GetSize();
     wxSize bmpsz( Bitmap.GetWidth(), Bitmap.GetHeight() );
 
     wxSize sz = GetSize();
     wxSize bmpsz( Bitmap.GetWidth(), Bitmap.GetHeight() );
@@ -150,9 +144,5 @@ void wxStaticPicture::OnPaint(wxPaintEvent& WXUNUSED(event))
     }
     else
         dc.DrawBitmap( Bitmap, pos.x, pos.y );
     }
     else
         dc.DrawBitmap( Bitmap, pos.x, pos.y );
-
-    dc.EndDrawing();
 }
 
 }
 
-//WXDLLEXPORT_DATA(const wxChar *) wxStaticPictureNameStr = wxT("message");
-const wxChar * wxStaticPictureNameStr = wxT("message");