X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4075e9a40724d100c430a8b2fd288213bbb0b069..3eddf563edad7403f84906650506370f4f7dedb2:/src/msw/ole/droptgt.cpp?ds=sidebyside diff --git a/src/msw/ole/droptgt.cpp b/src/msw/ole/droptgt.cpp index 31615f3bb0..d1c729dbb4 100644 --- a/src/msw/ole/droptgt.cpp +++ b/src/msw/ole/droptgt.cpp @@ -22,7 +22,6 @@ #endif // For compilers that support precompilation, includes "wx.h". -#define IN_WX_MAIN_CPP #include "wx/wxprec.h" #if defined(__BORLANDC__) @@ -31,7 +30,7 @@ #include -#if USE_DRAG_AND_DROP +#if wxUSE_DRAG_AND_DROP #include @@ -108,7 +107,7 @@ wxIDropTarget::wxIDropTarget(wxDropTarget *pTarget) { m_cRef = 0; m_pTarget = pTarget; - m_cfFormat = 0; + m_cfFormat = (wxDataFormat) 0; m_pIDataObject = NULL; } @@ -330,7 +329,7 @@ bool wxDropTarget::IsAcceptedData(IDataObject *pIDataSource) const // means) for file drag and drop if ( pIDataSource->QueryGetData(&s_fmtMemory) == S_OK ) { // remember this format: we'll later ask for data in it - m_pIDropTarget->SetSupportedFormat(s_fmtMemory.cfFormat); + m_pIDropTarget->SetSupportedFormat((wxDataFormat) s_fmtMemory.cfFormat); return TRUE; } } @@ -354,7 +353,7 @@ size_t wxTextDropTarget::GetFormatCount() const wxDataFormat wxTextDropTarget::GetFormat(size_t WXUNUSED(n)) const { - return CF_TEXT; + return wxDF_TEXT; } // ============================================================================ @@ -372,7 +371,7 @@ bool wxFileDropTarget::OnDrop(long x, long y, const void *pData) HDROP hdrop = (HDROP)pData; // @@ it works, but I'm not sure about it // get number of files (magic value -1) - UINT nFiles = ::DragQueryFile(hdrop, -1, NULL, 0); + UINT nFiles = ::DragQueryFile(hdrop, (unsigned)-1, NULL, 0u); // for each file get the length, allocate memory and then get the name char **aszFiles = new char *[nFiles]; @@ -409,12 +408,12 @@ size_t wxFileDropTarget::GetFormatCount() const wxDataFormat wxFileDropTarget::GetFormat(size_t WXUNUSED(n)) const { #ifdef __WIN32__ - return CF_HDROP; + return wxDF_FILENAME; #else // TODO: how to implement this in WIN16? - return CF_TEXT; + return wxDF_TEXT; #endif } #endif - // USE_DRAG_AND_DROP + // wxUSE_DRAG_AND_DROP