]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dragimag/dragimag.cpp
Fix handling of help buttons with non-empty label under OS X.
[wxWidgets.git] / samples / dragimag / dragimag.cpp
index fc0755b6ff05e8290ba4437aaed8caf3137ecd82..cce62bcdfa16047aa339d8fd183a844a5c07cb82 100644 (file)
@@ -36,9 +36,9 @@
 
 #include "dragimag.h"
 
-#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
-#include "mondrian.xpm"
-#include "dragicon.xpm"
+#if !defined(__WXMSW__) && !defined(__WXPM__)
+    #include "../sample.xpm"
+    #include "dragicon.xpm"
 #endif
 
 // main program
@@ -135,8 +135,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event)
 
         m_dragImage->Hide();
         m_dragImage->EndDrag();
-        delete m_dragImage;
-        m_dragImage = NULL;
+        wxDELETE(m_dragImage);
 
         m_draggedShape->SetShow(true);
 
@@ -203,8 +202,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event)
 
             if (!m_dragImage->BeginDrag(beginDragHotSpot, this, fullScreen))
             {
-                delete m_dragImage;
-                m_dragImage = (wxDragImage*) NULL;
+                wxDELETE(m_dragImage);
                 m_dragMode = TEST_DRAG_NONE;
 
             } else
@@ -327,7 +325,7 @@ MyFrame::MyFrame()
     wxMenuBar *menu_bar = new wxMenuBar();
     menu_bar->Append(file_menu, wxT("&File"));
 
-    SetIcon(wxICON(mondrian));
+    SetIcon(wxICON(sample));
     SetMenuBar( menu_bar );
 
 #if wxUSE_STATUSBAR