projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed compilation errors, made messages more human-oriented
[wxWidgets.git]
/
src
/
msw
/
ole
/
droptgt.cpp
diff --git
a/src/msw/ole/droptgt.cpp
b/src/msw/ole/droptgt.cpp
index 8d8f6fbf1cd460a8cffb15ef8fc08c5380833be9..46da03329de8afb6eeedc28115bad92937d29924 100644
(file)
--- a/
src/msw/ole/droptgt.cpp
+++ b/
src/msw/ole/droptgt.cpp
@@
-17,7
+17,7
@@
// headers
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
-#if
def __GNUG__
+#if
defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "droptgt.h"
#endif
#pragma implementation "droptgt.h"
#endif
@@
-43,7
+43,7
@@
#ifdef __WIN32__
#if !defined(__GNUWIN32__) || wxUSE_NORLANDER_HEADERS
#if wxCHECK_W32API_VERSION( 1, 0 )
#ifdef __WIN32__
#if !defined(__GNUWIN32__) || wxUSE_NORLANDER_HEADERS
#if wxCHECK_W32API_VERSION( 1, 0 )
- #include
<windows.h>
+ #include
"wx/msw/wrapwin.h"
#endif
#include <shlobj.h> // for DROPFILES structure
#endif
#endif
#include <shlobj.h> // for DROPFILES structure
#endif
@@
-330,16
+330,23
@@
wxDropTarget::~wxDropTarget()
bool wxDropTarget::Register(WXHWND hwnd)
{
bool wxDropTarget::Register(WXHWND hwnd)
{
- HRESULT hr = ::CoLockObjectExternal(m_pIDropTarget, TRUE, FALSE);
+ HRESULT hr;
+
+ // May exist in later WinCE versions
+#ifndef __WXWINCE__
+ hr = ::CoLockObjectExternal(m_pIDropTarget, TRUE, FALSE);
if ( FAILED(hr) ) {
wxLogApiError(wxT("CoLockObjectExternal"), hr);
return FALSE;
}
if ( FAILED(hr) ) {
wxLogApiError(wxT("CoLockObjectExternal"), hr);
return FALSE;
}
+#endif
hr = ::RegisterDragDrop((HWND) hwnd, m_pIDropTarget);
if ( FAILED(hr) ) {
hr = ::RegisterDragDrop((HWND) hwnd, m_pIDropTarget);
if ( FAILED(hr) ) {
+ // May exist in later WinCE versions
+#ifndef __WXWINCE__
::CoLockObjectExternal(m_pIDropTarget, FALSE, FALSE);
::CoLockObjectExternal(m_pIDropTarget, FALSE, FALSE);
-
+#endif
wxLogApiError(wxT("RegisterDragDrop"), hr);
return FALSE;
}
wxLogApiError(wxT("RegisterDragDrop"), hr);
return FALSE;
}
@@
-358,7
+365,10
@@
void wxDropTarget::Revoke(WXHWND hwnd)
wxLogApiError(wxT("RevokeDragDrop"), hr);
}
wxLogApiError(wxT("RevokeDragDrop"), hr);
}
+ // May exist in later WinCE versions
+#ifndef __WXWINCE__
::CoLockObjectExternal(m_pIDropTarget, FALSE, TRUE);
::CoLockObjectExternal(m_pIDropTarget, FALSE, TRUE);
+#endif
m_pIDropTarget->SetHwnd(0);
}
m_pIDropTarget->SetHwnd(0);
}