Jump to content

Search the Community

Showing results for tags 'dragquerypoint'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I spent few hours trying to figure out how to get results from the _WinAPI_DragQueryPoint when the script runs on elevated rights with a WM_DROPFILES registered message. I searched everywhere but I wasn't able to find the right message to allow on my GUI. So I finally decided to allow all messages under 0x400, to finally find THE ONE that makes it work. It was really a surprise to find out that it is $WM_NCHITTEST !!! To test you start Windows Explorer and you simply Drag & Drop anywhere into the GUI. If you remove any of the _WinAPI_ChangeWindowMessageFilterEx it will not fully work. Anyway since I was not able to find it on the Web may as well document it here. #include <GUIConstantsEx.au3> #include <WinAPIEx.au3> #include <WindowsConstants.au3> #RequireAdmin Global $hGUI = GUICreate('WM_DROPFILES', 400, 200, -1, -1, -1, $WS_EX_ACCEPTFILES) GUISetState() GUIRegisterMsg($WM_DROPFILES, "WM_DROPFILES") _WinAPI_ChangeWindowMessageFilterEx($hGUI, $WM_NCHITTEST, $MSGFLT_ALLOW) _WinAPI_ChangeWindowMessageFilterEx($hGUI, $WM_DROPFILES, $MSGFLT_ALLOW) _WinAPI_ChangeWindowMessageFilterEx($hGUI, $WM_COPYGLOBALDATA, $MSGFLT_ALLOW) ;_WinAPI_ChangeWindowMessageFilterEx ($hGUI, $WM_COPYDATA, $MSGFLT_ALLOW) ; useless ? While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func WM_DROPFILES($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg, $lParam Local $aFileList Switch $hWnd Case $hGUI $tPoint = _WinAPI_DragQueryPoint($wParam) $iXpos = DllStructGetData($tPoint, 1) $iYpos = DllStructGetData($tPoint, 2) ConsoleWrite ($iXpos & "/" & $iYpos & @CRLF) $aFileList = _WinAPI_DragQueryFileEx($wParam) If IsArray($aFileList) Then For $i = 1 To $aFileList[0] ConsoleWrite($aFileList[$i] & @CRLF) Next EndIf _WinAPI_DragFinish($wParam) Return 0 EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_DROPFILES Tested on Win7.
×
×
  • Create New...