From: Vadim Zeitlin Date: Thu, 21 Oct 1999 12:46:48 +0000 (+0000) Subject: some compilation warnings/errors fixed (still doesn't compile under wxGTK though) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/79ec2ce20ebe8d6ea2bb876e7aedb53801dbeb43 some compilation warnings/errors fixed (still doesn't compile under wxGTK though) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/dnd/dnd.cpp b/samples/dnd/dnd.cpp index ebadcfcd0c..7253d69fac 100644 --- a/samples/dnd/dnd.cpp +++ b/samples/dnd/dnd.cpp @@ -972,7 +972,7 @@ void DnDFrame::OnPasteBitmap(wxCommandEvent& WXUNUSED(event)) } wxBitmapDataObject data; - if ( !wxTheClipboard->GetData(&data) ) + if ( !wxTheClipboard->GetData(data) ) { wxLogError(_T("Can't paste bitmap from the clipboard")); } @@ -1029,7 +1029,7 @@ void DnDFrame::OnPaste(wxCommandEvent& WXUNUSED(event)) } wxTextDataObject text; - if ( !wxTheClipboard->GetData(&text) ) + if ( !wxTheClipboard->GetData(text) ) { wxLogError(_T("Can't paste data from the clipboard")); } @@ -1305,7 +1305,7 @@ void DnDShapeFrame::OnCopyShape(wxCommandEvent& event) void DnDShapeFrame::OnPasteShape(wxCommandEvent& event) { DnDShapeDataObject shapeDataObject(NULL); - if ( wxTheClipboard->GetData(&shapeDataObject) ) + if ( wxTheClipboard->GetData(shapeDataObject) ) { SetShape(shapeDataObject.GetShape()); } @@ -1328,9 +1328,15 @@ void DnDShapeFrame::OnUpdateUIPaste(wxUpdateUIEvent& event) void DnDShapeFrame::OnPaint(wxPaintEvent& event) { if ( m_shape ) - m_shape->Draw(wxPaintDC(this)); + { + wxPaintDC dc(this); + + m_shape->Draw(dc); + } else + { event.Skip(); + } } // ----------------------------------------------------------------------------