X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fca36d9a0301c9bff307361f1f94048897ce2ae5..a6c129111b38341eb561b110fd1566b260740675:/contrib/src/gizmos/statpict.cpp diff --git a/contrib/src/gizmos/statpict.cpp b/contrib/src/gizmos/statpict.cpp index e3f39f4ec8..a6fd9f768e 100644 --- a/contrib/src/gizmos/statpict.cpp +++ b/contrib/src/gizmos/statpict.cpp @@ -9,19 +9,15 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ - #pragma implementation "statpict.h" -#endif - +#include "wx/wxprec.h" #include "wx/defs.h" -#include "statpict.h" +#include "wx/gizmos/statpict.h" #include "wx/dcclient.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxStaticPicture, wxControl) -#endif - +WXDLLIMPEXP_GIZMOS const wxChar * wxStaticPictureNameStr = wxT("staticPicture"); + /* * wxStaticPicture */ @@ -42,9 +38,9 @@ bool wxStaticPicture::Create(wxWindow *parent, wxWindowID id, wxSize size = s ; if ( bitmap.Ok() ) { - if ( size.x == -1 ) + if ( size.x == wxDefaultCoord ) size.x = bitmap.GetWidth() ; - if ( size.y == -1 ) + if ( size.y == wxDefaultCoord ) size.y = bitmap.GetHeight() ; } @@ -62,7 +58,7 @@ bool wxStaticPicture::Create(wxWindow *parent, wxWindowID id, OriginalImage = Bitmap.ConvertToImage(); #endif - if ( id == -1 ) + if ( id == wxID_ANY ) m_windowId = (int)NewControlId(); else m_windowId = id; @@ -93,7 +89,6 @@ void wxStaticPicture::OnPaint(wxPaintEvent& WXUNUSED(event)) wxPaintDC dc( this ); PrepareDC( dc ); - dc.BeginDrawing(); wxSize sz = GetSize(); wxSize bmpsz( Bitmap.GetWidth(), Bitmap.GetHeight() ); @@ -149,9 +144,5 @@ void wxStaticPicture::OnPaint(wxPaintEvent& WXUNUSED(event)) } else dc.DrawBitmap( Bitmap, pos.x, pos.y ); - - dc.EndDrawing(); } -//WXDLLEXPORT_DATA(const wxChar *) wxStaticPictureNameStr = wxT("message"); -const wxChar * wxStaticPictureNameStr = wxT("message");