Jump to content

Question - $GUI_DROPACCEPTED isn't working in windows10 x64


 Share

Recommended Posts

Hi everyone,

GUICtrlSetState Function example ,i found $GUI_DROPACCEPTED isn't working in windows10 x64(windows_10_enterprise_2016_ltsb_x64).

if the example put to windows10 x86 or windows xp, the $GUI_DROPACCEPTED is effective,

the AutoIt Edition is v3.3.14.2.

any ideas? thanks you.

 

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
    ; Create a GUI with various controls.
    Local $hGUI = GUICreate("Example", 420, 200, -1, -1, -1, $WS_EX_ACCEPTFILES)

    ; Create a label and set the state as drop accepted.
    Local $idLabel = GUICtrlCreateLabel("Drop a file on this label.", 10, 10, 400, 40, $WS_BORDER)
    GUICtrlSetState($idLabel, $GUI_DROPACCEPTED)

    ; Create an input and set the state as drop accepted.
    Local $idInput = GUICtrlCreateInput("", 10, 60, 400, 22)
    GUICtrlSetState($idInput, $GUI_DROPACCEPTED)

    Local $idOK = GUICtrlCreateButton("OK", 310, 170, 85, 25)

    ; Display the GUI.
    GUISetState(@SW_SHOW, $hGUI)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $idOK
                ExitLoop

            Case $GUI_EVENT_DROPPED
                ; If the value of @GUI_DropId is $idLabel, then set the label of the dragged file.
                If @GUI_DropId = $idLabel Then GUICtrlSetData($idLabel, @GUI_DragFile)

        EndSwitch
    WEnd

    ; Delete the previous GUI and all controls.
    GUIDelete($hGUI)
EndFunc   ;==>Example

 

Link to comment
Share on other sites

it worked just fine for me on win10 pro x64. what is the expected behavior? when i drop to either control they get the name populated on that control, the label and the text control both for me.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...