]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/dnd.cpp
rebaked with baefile rev 928
[wxWidgets.git] / src / os2 / dnd.cpp
index 35d5717f78dd7bd4ea0028a96e36a1903736ad0b..e612b2ee65c5b725fa4df26f2dff184e5d2b4f86 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        dnd.cpp
+// Name:        src/os2/dnd.cpp
 // Purpose:     wxDropTarget, wxDropSource, wxDataObject implementation
 // Author:      David Webster
 // Modified by:
 
 #if wxUSE_DRAG_AND_DROP
 
-#include "wx/window.h"
-#include "wx/app.h"
-#include "wx/gdicmn.h"
 #include "wx/dnd.h"
 
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+    #include "wx/window.h"
+    #include "wx/gdicmn.h"
+#endif
+
 #define INCL_PM
 #define INCL_DOS
 #include <os2.h>
@@ -440,17 +443,12 @@ bool wxDropTarget::OnDrop (
 // wxDropSource
 //-------------------------------------------------------------------------
 
-wxDropSource::wxDropSource (
-  wxWindow*                         pWin
-)
+wxDropSource::wxDropSource ( wxWindow* WXUNUSED(pWin) )
 {
     Init();
 } // end of wxDropSource::wxDropSource
 
-wxDropSource::wxDropSource (
-  wxDataObject&                     rData
-, wxWindow*                         pWin
-)
+wxDropSource::wxDropSource ( wxDataObject& rData, wxWindow* WXUNUSED(pWin) )
 {
     Init();
     SetData(rData);
@@ -548,13 +546,13 @@ void wxDropSource::Init ()
     m_vDragImage.cxOffset       = 0;
     m_vDragImage.cyOffset       = 0;
 
-    HSTR                            hStrType = ::DrgAddStrHandle(DRT_UNKNOWN);
-    HSTR                            hStrRMF;
-    HSTR                            hStrContainer;
-    wxChar                          zFormats[128];
-    wxChar                          zContainer[128];
-    USHORT                          uSize = GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()) + 1;
-    wxChar*                         pzBuffer = new wxChar[uSize];
+    HSTR    hStrType = ::DrgAddStrHandle(DRT_UNKNOWN);
+    HSTR    hStrRMF;
+    HSTR    hStrContainer;
+    wxChar  zFormats[128];
+    wxChar  zContainer[128];
+    USHORT  uSize = (USHORT)(GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()) + 1);
+    wxChar* pzBuffer = new wxChar[uSize];
 
     memset(pzBuffer, '\0', GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()));
     pzBuffer[GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat())] = '\0';