DragDrop Cursor

forum.advanced.programming (1998-2005)
Thomas Lauzi

DragDrop Cursor

Post by Thomas Lauzi » 28 Jan 2005, 10:22

 Posted by:  Thomas Lauzi 

Hi NG,
I have a question regarding to dragdrop.
How is the NO-Drop cursor shown??
I return On SAM_DragDrop and On SAM_DRagMove FALSE, but the DragDrop cursor
is not set to the NO-Drop cursor.
So I load manually a NO-Drop cursor, but this is bad to handle. because on
other windows I must load/unload this cursor.The dragdrop sample also does
not explain this.
How does the standard work??

Regards,
Thomas L.

You do not have the required permissions to view the files attached to this post.

Christian Astor

Re: DragDrop Cursor

Post by Christian Astor » 28 Jan 2005, 13:00

 Posted by:  Christian ASTOR 


The standard method is with IDropSource & IDropTarget interfaces.

Gerhard Achrainer

Re: DragDrop Cursor

Post by Gerhard Achrainer » 28 Jan 2005, 13:46

 Posted by:  g.achrainer 

Hi,

in your sample:

Multiline Field: ml2
Message Actions
On SAM_DragEnter
Call SalDragDropDisableDrop ()
On SAM_DragExit
Call SalDragDropEnableDrop ()

should do what you want, hopefully :wink:

Regards,

gerhard.

Thomas Lauzi

Re: DragDrop Cursor

Post by Thomas Lauzi » 28 Jan 2005, 16:03

 Posted by:  Thomas Lauzi 

Yes Gerhard,
this commands I missed, but unfortunatly my code doesn´t work anymore.
I have tree where you can drag-drop folders.
If I replace my cursor loading/unloading with
SalDragDropEnableDrop/SalDragDropDisableDrop my code hangs.

!!CB!! 173
On SAM_DragMove
!
If SalNumberToWindowHandle( wParam ) = hWndItem
! Quelle und Ziel ist er selbst, d.h es werden nur Ordner verschoben
If .. ActionAllowed( SAM_DragMove )
Call SalCursorSet( hWndItem,CURSOR_Drop, CURSOR_DragDrop )
<-SalDragDropEnableDrop
Else
Call SalCursorSet( hWndItem,CURSOR_NoDrop, CURSOR_DragDrop )
<-SalDragDropDisableDrop
Else
! Quelle ist ein anderes Control, d.h. es wird etwas in die Ordner
geschoben
If .. ActionAllowed( PM_DragDropExtern )
Call SalCursorSet( hWndItem,CURSOR_Drop, CURSOR_DragDrop )
<-SalDragDropEnableDrop
Else
Call SalCursorSet( hWndItem,CURSOR_NoDrop, CURSOR_DragDrop )
<-SalDragDropDisableDrop
Call SalSendClassMessage( SAM_DragMove,wParam, lParam )

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 0 guests