本帖最后由 afan 于 2011-3-30 21:07 编辑 #include <WinAPI.au3>
GUICreate('test')
$ListView = GUICtrlCreateListView('1|2|3|4', 5, 5, 300, 300)
$hListView = GUICtrlGetHandle(-1)
GUICtrlCreateListViewItem('aa|ss|dd|ff', $ListView)
$Call = DllCallbackGetPtr(DllCallbackRegister('_test', 'int', 'hWnd;uint;wparam;lparam'))
$OCall = _WinAPI_SetWindowLong($hListView, -4, $Call)
GUISetState()
While GUIGetMsg() <> -3
WEnd
GUIDelete()
Func _test($hWnd, $iMsg, $wparam, $lparam)
If $iMsg = 0x004E Then Return 1
Return _WinAPI_CallWindowProc($OCall, $hWnd, $iMsg, $wparam, $lparam)
EndFunc ;==>_test
|