Drag&Drop changes?
Christian Buhtz
exsudat at gmx.de
Wed Aug 15 01:48:22 PDT 2007
Did something was changed on the D&D code (MSW) in the last month?
This methode works. The AddFile() argument is right!
void BFDirCtrl::OnBeginDrag (wxTreeEvent& event)
{
wxFileDataObject my_data;
wxDropSource dragSource ( this );
pDirCtrl_->GetTreeCtrl()->SelectItem(event.GetItem());
my_data.AddFile(pDirCtrl_->GetPath());
dragSource.SetData(my_data);
wxDragResult result = dragSource.DoDragDrop( TRUE );
}
In this methode 'filenames' only contains character-salat (sometimes
chinese characters, etc).
bool BFBackupTree::BFBackupDropTarget::OnDropFiles(wxCoord x, wxCoord y,
const wxArrayString& filenames)
{
if (pBackupTree_ == NULL)
return false;
BFSystem::Info(filenames[0]);
return pBackupTree_->OnDropFiles(x, y, filenames);
}
The code wasn't changed in the last month and worked for some months.
More information about the wx-dev
mailing list