Bei nur einer "Drag"-Datei reichen auch die Standard-AutoIt-Funktionen (ohne GuiRegisterMsg):
Spoiler anzeigen
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Global $msg, $w, $h, $Input, $Radio1, $Radio2, $Radio3, $Button
$w = 640
$h = 480
GUICreate("Test", $w, $h, -1, -1, $WS_SIZEBOX + $WS_SYSMENU, $WS_EX_ACCEPTFILES)
GUICtrlCreatePic(@WindowsDir & "\Santa Fe-Stuck.bmp", 10, 10, 250, 250)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
$Input = GUICtrlCreateInput("", 8, 430, 517, 21, $ES_READONLY)
$Radio1 = GUICtrlCreateRadio("C:\", 8, 360, 57, 17)
$Radio2 = GUICtrlCreateRadio("D:\", 8, 380, 57, 17)
$Radio3 = GUICtrlCreateRadio("E:\", 8, 400, 57, 17)
$Button = GUICtrlCreateButton("OK", 560, 430, 57, 21)
GUISetState()
[/autoit] [autoit][/autoit] [autoit]While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_DROPPED
Switch StringLeft(@GUI_DragFile, 2)
Case 'c:'
GUICtrlSetState($Radio1, $GUI_CHECKED)
Case 'd:'
GUICtrlSetState($Radio2, $GUI_CHECKED)
Case 'e:'
GUICtrlSetState($Radio3, $GUI_CHECKED)
EndSwitch
GUICtrlSetData($Input, @GUI_DragFile)
EndSwitch
WEnd