How to collect data from drag/drog WS_EX_ACCEPTFILES of Texbox.
Put code like the following in the CUSTOM message handler for the TEXTBOX.
'--------------------------------------------------------------------------------
Function FORM1_TEXT1_CUSTOM ( _
ControlIndex As Long, _ ' index in Control Array
hWndForm As Dword, _ ' handle of Form
hWndControl As Dword, _ ' handle of Control
wMsg As Long, _ ' type of message
wParam As Dword, _ ' first message parameter
lParam As Long _ ' second message parameter
) As Long
Select Case wMsg
Case %WM_DROPFILES
Local nFileCount As Long
Local i As Long
Local zFilename As Asciiz * %MAX_PATH
Local sTemp As String
nFileCount = DragQueryFile( wParam, -1, ByVal 0, 0 )
For i = 0 To nFileCount - 1
DragQueryFile wParam, i, zFilename, SizeOf(zFilename)
sTemp = sTemp & $CrLf & zFilename
Next i
DragFinish wParam
? "Dropped filenames: " & $CrLf & $CrLf & Trim$(sTemp, $CrLf)
End Select
End Function
I'm newbie but attempt learn
http://msdn.microsoft.com/en-us/library/windows/desktop/bb776408%28v=vs.85%29.aspx