]> git.saurik.com Git - wxWidgets.git/commitdiff
some compilation warnings/errors fixed (still doesn't compile under wxGTK though)
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 21 Oct 1999 12:46:48 +0000 (12:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 21 Oct 1999 12:46:48 +0000 (12:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/dnd/dnd.cpp

index ebadcfcd0c03e18790df6e3270faf8bac2aba5fc..7253d69fac99697e5ec07f0b9b62f0ac7ff20584 100644 (file)
@@ -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();
+    }
 }
 
 // ----------------------------------------------------------------------------