PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: WS_EX_ACCEPTFILES  (Read 1067 times)

Pedro Marquez

  • Junior Member
  • **
  • Posts: 90
  • FF3 User
WS_EX_ACCEPTFILES
« on: November 06, 2013, 05:41:23 PM »

How to collect data from drag/drog WS_EX_ACCEPTFILES of Texbox.
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8848
  • Windows 10
    • PlanetSquires Software
Re: WS_EX_ACCEPTFILES
« Reply #1 on: November 06, 2013, 09:09:01 PM »

Put code like the following in the CUSTOM message handler for the TEXTBOX.

Code: [Select]
'--------------------------------------------------------------------------------
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
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Pedro Marquez

  • Junior Member
  • **
  • Posts: 90
  • FF3 User
Re: WS_EX_ACCEPTFILES
« Reply #2 on: November 07, 2013, 04:58:34 PM »

Logged