#include "wx/metafile.h"
#endif // Windows
-#if defined(__WXGTK__) || defined(__WXMOTIF__)
+#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__)
#include "mondrian.xpm"
#include "dnd_copy.xpm"
~DnDFrame();
void OnPaint(wxPaintEvent& event);
+ void OnSize(wxSizeEvent& event);
void OnQuit (wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnDrag (wxCommandEvent& event);
EVT_LEFT_DOWN( DnDFrame::OnLeftDown)
EVT_RIGHT_DOWN( DnDFrame::OnRightDown)
EVT_PAINT( DnDFrame::OnPaint)
+ EVT_SIZE( DnDFrame::OnSize)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(DnDShapeFrame, wxFrame)
Close(TRUE);
}
+void DnDFrame::OnSize(wxSizeEvent& event)
+{
+ Refresh();
+
+ event.Skip();
+}
+
void DnDFrame::OnPaint(wxPaintEvent& WXUNUSED(event))
{
int w = 0;
GetClientSize( &w, &h );
wxPaintDC dc(this);
+ dc.Clear();
dc.SetFont( wxFont( 24, wxDECORATIVE, wxNORMAL, wxNORMAL, FALSE, "charter" ) );
dc.DrawText( "Drag text from here!", 100, h-50 );
}
wxLogStatus( _T("Decoding image file...") );
wxYield();
- wxBitmap bitmap( image.ConvertToBitmap() );
+ wxBitmap bitmap( image );
if ( !wxTheClipboard->Open() )
{