#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
$Form1 = GUICreate("Form1", 405, 122, 192, 124)
Global $ListView1 = GUICtrlCreateListView("", 8, 8, 250, 102)
_GUICtrlListView_InsertColumn($ListView1, 0, 'Список', 230)
Global $Input1 = GUICtrlCreateInput("", 272, 8, 121, 21)
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
For $i = 1 To 10
GUICtrlCreateListViewItem('Текст - ' & $i, $ListView1)
Next
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func WM_NOTIFY($hWnd, $imsg, $wParam, $lParam)
#forceref $hWnd, $iMsg, $wParam
Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $tInfo,$text
$tNMHDR = DllStructCreate($tagNMHDR, $lParam)
$iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
$iCode = DllStructGetData($tNMHDR, "Code")
Switch $iIDFrom
Case $ListView1
Switch $iCode
Case $NM_DBLCLK
$tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam)
$text= _GUICtrlListView_GetItemText($ListView1, DllStructGetData($tInfo, "Index"))
GUICtrlSetData($Input1,$text)
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_NOTIFY