| 989 | } |
| 990 | |
| 991 | int FTPWindow::OnFileItemDrop(FileObject* item, FileObject* parent, bool bIsMove) |
| 992 | { |
| 993 | if (item == NULL || parent == NULL) return false; |
| 994 | |
| 995 | int ret = -1; |
| 996 | if (parent->GetChildByName(item->GetName()) != NULL) { |
| 997 | MessageDialog md; |
| 998 | |
| 999 | int res = md.Create(m_hwnd, TEXT("Target item exists"), TEXT("Are you sure you want to overwrite existing item?")); |
| 1000 | if (res != 1) { |
| 1001 | TreeView_SetItemState(m_treeview.GetHWND(), (HTREEITEM)m_currentDragObject->GetData(), ~TVIS_CUT, TVIS_CUT); |
| 1002 | m_currentDragObject = NULL; |
| 1003 | return FALSE; |
| 1004 | } |
| 1005 | |
| 1006 | } |
| 1007 | |
| 1008 | if (bIsMove) |
| 1009 | ret = Move(item, parent); |
| 1010 | else |
| 1011 | ret = Copy(item, parent); |
| 1012 | |
| 1013 | if(ret) m_currentDragObject = NULL; |
| 1014 | return ret; |
| 1015 | |
| 1016 | } |
| 1017 | |
| 1018 | bool FTPWindow::AcceptType(LPDATAOBJECT pDataObj) { |
| 1019 | FORMATETC fmtetc{}; |
nothing calls this directly
no test coverage detected