Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Sat Apr 25, 2009 10:17 am Post subject: HOWTO: Disallow certain drag-drop operations when dragging from FolderView to an external place |
|
|
To disallow certain drag-drop operations when dragging from FolderView to an external place, use following code in the OnOleStartDrag event handler:
[C++]
Code: | void CFldrViewVCDlg::OnOnOleStartDragFolderviewctrl1(LPDISPATCH Data, LPDISPATCH Node, long FAR* effects, long Button, BOOL FAR* Cancel)
{
// Only allow items to be copied
*effects = FOVDragDropCopy;
} |
[VB6]
Code: | Private Sub fldrVw_OnOleStartDrag(ByVal Data As FolderViewControl.IFOVDataObject, ByVal Node As FolderViewControl.ITreeNode, effects As FolderViewControl.FOVDragDropEffects, ByVal Button As FolderViewControl.FOVMouseButtons, Cancel As Boolean)
' Only allow items to be copied
effects = FOVDragDropCopy
End Sub |
|
|