03-11-2009, 09:44 PM
wow!
now it needs some fine tuning.
thank you very much!
Function tb_drag_drop_hook
now it needs some fine tuning.
thank you very much!
Function tb_drag_drop_hook
;/tb_drag_drop
function# hWnd message wParam lParam
if(TB_DetectDragDropButton(&hWnd _s))
,out "dropped %s" _s
sel message
,case WM_INITDIALOG
,int htb=wParam
,QmRegisterDropTarget(htb hWnd 16)
,
,case WM_DESTROY
,case WM_QM_DRAGDROP
,,;get button
,,htb=id(9999 hWnd)
,,POINT p; xm p htb 1
,,int b=SendMessage(htb TB_HITTEST 0 &p) ;;toolbar line
,,if(b<1) ret
,,Acc a=acc("" "TOOLBAR" htb "" "" 0x1000)
,,a.elem=b+1; str buttonText=a.Name; err ret
,,out "dropped on '%s':" buttonText
,,
,,;get files
,,QMDRAGDROPINFO& di=+lParam
,,str s
,,foreach(s di.files) out s