+ for (n = 0; n < ulFormats; n++)
+ {
+ switch(pFormats[n].GetType())
+ {
+ case wxDF_TEXT:
+ case wxDF_FILENAME:
+ case wxDF_HTML:
+ sMechanism = _T("DRM_OS2FILE");
+ sFormat = _T("DRF_TEXT");
+ break;
+
+ case wxDF_OEMTEXT:
+ sMechanism = _T("DRM_OS2FILE");
+ sFormat = _T("DRF_OEMTEXT");
+ break;
+
+ case wxDF_BITMAP:
+ sMechanism = _T("DRM_OS2FILE");
+ sFormat = _T("DRF_BITMAP");
+ break;
+
+ case wxDF_METAFILE:
+ case wxDF_ENHMETAFILE:
+ sMechanism = _T("DRM_OS2FILE");
+ sFormat = _T("DRF_METAFILE");
+ break;
+
+ case wxDF_TIFF:
+ sMechanism = _T("DRM_OS2FILE");
+ sFormat = _T("DRF_TIFF");
+ break;
+
+ case wxDF_SYLK:
+ sMechanism = _T("DRM_OS2FILE");
+ sFormat = _T("DRF_SYLK");
+ break;
+
+ case wxDF_DIF:
+ sMechanism = _T("DRM_OS2FILE");
+ sFormat = _T("DRF_DIF");
+ break;
+
+ case wxDF_DIB:
+ sMechanism = _T("DRM_OS2FILE");
+ sFormat = _T("DRF_DIB");
+ break;
+
+ case wxDF_PALETTE:
+ case wxDF_PENDATA:
+ case wxDF_RIFF:
+ case wxDF_WAVE:
+ case wxDF_UNICODETEXT:
+ case wxDF_LOCALE:
+ sMechanism = _T("DRM_OS2FILE");
+ sFormat = _T("DRF_UNKNOWN");
+ break;
+
+ case wxDF_PRIVATE:
+ sMechanism = _T("DRM_OBJECT");
+ sFormat = _T("DRF_UNKNOWN");
+ break;
+ }
+ for (i = 0; i < ulItems; i++)
+ {
+ pDragItem = ::DrgQueryDragitemPtr(pDataSource, i);
+ if (::DrgVerifyRMF(pDragItem, (PSZ)sMechanism.c_str(), (PSZ)sFormat.c_str()))
+ {
+ bValid = TRUE;
+ break;
+ }
+ }
+ if (bValid)
+ {
+ vFormat = pFormats[n];
+ break;
+ }
+ }
+ if (pFormats != &vFormat)
+ {
+ //
+ // Free memory if we allocated it
+ //
+ delete [] pFormats;
+ }
+ return (n < ulFormats ? vFormat : wxFormatInvalid);
+} // end of wxDropTarget::GetSupportedFormat
+
+bool wxDropTarget::IsAcceptedData (
+ PDRAGINFO pDataSource
+) const
+{
+ return (GetSupportedFormat(pDataSource) != wxDF_INVALID);
+} // end of wxDropTarget::IsAcceptedData
+
+void wxDropTarget::Release ()
+{
+ m_pDropTarget->Free();
+} // end of wxDropTarget::Release
+
+
+wxDragResult wxDropTarget::OnData (
+ wxCoord WXUNUSED(vX)
+, wxCoord WXUNUSED(y)
+, wxDragResult WXUNUSED(vResult)
+)
+{
+ return (wxDragResult)0;
+} // end of wxDropTarget::OnData
+
+bool wxDropTarget::OnDrop (
+ wxCoord WXUNUSED(x)
+, wxCoord WXUNUSED(y)
+)