Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Sat Apr 25, 2009 10:20 am Post subject: HOWTO: Disallow certain drag-drop operations when dragging from FileView to an external place |
|
|
To disallow certain drag-drop operations when dragging from FileView to an external place, use following code in the OnOleStartDrag event handler:
[C++]
Code: | void CFileViewVCDlg::OnOnOleStartDragFileviewctrl1(LPDISPATCH Data, long FAR* effects, long Button, BOOL FAR* Cancel)
{
// Only allow items to be copied
*effects = FIVDragDropCopy;
} |
[VB6]
Code: | Private Sub fileVw_OnOleStartDrag(ByVal Data As FileViewControl.IFIVDataObject, effects As FileViewControl.FIVDragDropEffects, ByVal Button As FileViewControl.FIVMouseButtons, Cancel As Boolean)
' Only allow items to be copied
effects = FIVDragDropCopy
End Sub |
|
|