don't call OnData() if OnEnter() rejected the drag (#9634)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-06-28 01:40:42 +00:00
parent 44de0d66d2
commit cf92614370

View File

@@ -239,15 +239,20 @@ STDMETHODIMP wxIDropTarget::DragOver(DWORD grfKeyState,
result = wxDragNone;
}
// we need client coordinates to pass to wxWin functions
if ( !ScreenToClient(m_hwnd, (POINT *)&pt) )
{
wxLogLastError(wxT("ScreenToClient"));
}
if ( result != wxDragNone ) {
// we need client coordinates to pass to wxWin functions
if ( !ScreenToClient(m_hwnd, (POINT *)&pt) )
{
wxLogLastError(wxT("ScreenToClient"));
}
*pdwEffect = ConvertDragResultToEffect(
m_pTarget->OnDragOver(pt.x, pt.y, result)
);
*pdwEffect = ConvertDragResultToEffect(
m_pTarget->OnDragOver(pt.x, pt.y, result)
);
}
else {
*pdwEffect = DROPEFFECT_NONE;
}
return S_OK;
}