]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/dnd.cpp
Added support for DrawArc and Blit to GNOME print.
[wxWidgets.git] / src / os2 / dnd.cpp
index 6a645291fcb00a8c1b1c0cb90d96a4c316ac006b..02cbfdd23fa9447b571bc98837c71e56877d0032 100644 (file)
 #pragma implementation "dnd.h"
 #endif
 
-#define INCL_PM
-#define INCL_DOS
-#include <os2.h>
 #include "wx/window.h"
 #include "wx/app.h"
 #include "wx/gdicmn.h"
 #include "wx/dnd.h"
 
+#define INCL_PM
+#define INCL_DOS
+#include <os2.h>
+
 #if wxUSE_DRAG_AND_DROP
 
 // ----------------------------------------------------------------------------
@@ -31,6 +32,7 @@
 // Private functions
 /////////////////////////////////////////////////////////////////////////////
 
+#if 0
 static wxDragResult ConvertDragEffectToResult (
   DWORD                             dwEffect
 )
@@ -72,6 +74,7 @@ static DWORD ConvertDragResultToEffect (
             return DO_DEFAULT;
     }
 } // end of ConvertDragResultToEffect
+#endif
 
 class CIDropTarget
 {
@@ -124,7 +127,7 @@ MRESULT CIDropTarget::DragOver ()
 {
     char                            zBuffer[128];
     ULONG                           ulBytes;
-    USHORT                          uOp;
+    USHORT                          uOp = 0;
     USHORT                          uIndicator;
     ULONG                           ulItems;
     ULONG                           i;
@@ -194,7 +197,7 @@ MRESULT CIDropTarget::Drop ()
 {
     char                            zBuffer[128];
     ULONG                           ulBytes;
-    USHORT                          uOp;
+    USHORT                          uOp = 0;
     USHORT                          uIndicator;
     ULONG                           ulItems;
     ULONG                           i;
@@ -247,7 +250,7 @@ MRESULT CIDropTarget::Drop ()
                           ,m_pDragInfo->yDrop
                          ))
     {
-        wxDragResult                 eRc;
+        wxDragResult                 eRc = wxDragNone;;
 
         //
         // And now it has the data
@@ -516,6 +519,11 @@ bool wxDropSource::GiveFeedback (
             case wxDragLink:
                 m_pDragInfo->usOperation = DO_LINK;
                 break;
+
+            case wxDragNone:
+            case wxDragCancel:
+            case wxDragError:
+                break;
         }
         return TRUE;
     }
@@ -562,7 +570,7 @@ void wxDropSource::Init ()
     hStrContainer = ::DrgAddStrHandle(zContainer);
 
     m_pDragItem = new DRAGITEM[m_ulItems];
-    for (ULONG i = 0; i < m_ulItems; i++);
+    for (ULONG i = 0; i < m_ulItems; i++)
     {
         m_pDragItem[i].hwndItem          = m_pWindow->GetHWND();
         m_pDragItem[i].hstrType          = hStrType;