///////////////////////////////////////////////////////////////////////////////
// ============================================================================
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
private:
DWORD m_grfInitKeyState; // button which started the d&d operation
wxDropSource *m_pDropSource; // pointer to C++ class we belong to
private:
DWORD m_grfInitKeyState; // button which started the d&d operation
wxDropSource *m_pDropSource; // pointer to C++ class we belong to
// Name : DoDragDrop
// Purpose : start drag and drop operation
// Returns : wxDragResult - the code of performed operation
// Name : DoDragDrop
// Purpose : start drag and drop operation
// Returns : wxDragResult - the code of performed operation
{
wxCHECK_MSG( m_data != NULL, wxDragNone, wxT("No data in wxDropSource!") );
DWORD dwEffect;
HRESULT hr = ::DoDragDrop(m_data->GetInterface(),
m_pIDropSource,
{
wxCHECK_MSG( m_data != NULL, wxDragNone, wxT("No data in wxDropSource!") );
DWORD dwEffect;
HRESULT hr = ::DoDragDrop(m_data->GetInterface(),
m_pIDropSource,
}
else if ( dwEffect & DROPEFFECT_MOVE ) {
// consistency check: normally, we shouldn't get "move" at all
}
else if ( dwEffect & DROPEFFECT_MOVE ) {
// consistency check: normally, we shouldn't get "move" at all
- // here if !bAllowMove, but in practice it does happen quite often
- if ( bAllowMove )
- return wxDragMove;
- else
- return wxDragCopy;
+ // here if we don't allow it, but in practice it does happen quite often
+ return (flags & wxDrag_AllowMove) ? wxDragMove : wxDragCopy;