daywalkereg Posted September 11, 2007 Posted September 11, 2007 #include <GUIConstants.au3>#include <GuiListView.au3>$AForm1 = GUICreate("AForm1", 633, 447, 193, 125)$ListView1 = GUICtrlCreateListView("", 8, 54, 613, 385, BitOR($LVS_SMALLICON,$LVS_EDITLABELS,$LVS_SINGLESEL,$LVS_SHOWSELALWAYS), BitOR($WS_EX_CLIENTEDGE,$LVS_EX_SUBITEMIMAGES,$LVS_EX_TRACKSELECT))$Button1 = GUICtrlCreateButton("Button1", 264, 10, 75, 25, 0)GUISetState(@SW_SHOW)_GUICtrlListViewSetView($ListView1,$LVS_ICON)While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 EndSwitchWEndWhat I Need Is :When I Press Button1 Add Item To The ListView1 from the computer like "G:\CodeWarrior_Personal_Edition_31.exe" With Its Icon Can 1 Any Help Me ? 1 £0\\/3 |-|3® $0 |\\/|µ(|-|
Zedna Posted September 11, 2007 Posted September 11, 2007 (edited) #include <GUIConstants.au3> #include <GuiListView.au3> $AForm1 = GUICreate("AForm1", 633, 447, 193, 125) $ListView1 = GUICtrlCreateListView("Column1", 8, 54, 613, 385, BitOR($LVS_SMALLICON, $LVS_EDITLABELS, $LVS_SINGLESEL, $LVS_SHOWSELALWAYS), BitOR($WS_EX_CLIENTEDGE, $LVS_EX_SUBITEMIMAGES, $LVS_EX_TRACKSELECT)) $Button1 = GUICtrlCreateButton("Button1", 264, 10, 75, 25, 0) GUISetState(@SW_SHOW) _GUICtrlListViewSetView ($ListView1, $LVS_ICON) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $file_name = "G:\CodeWarrior_Personal_Edition_31.exe" GUICtrlCreateListViewItem($file_name, $ListView1) GUICtrlSetImage(-1,$file_name) EndSwitch WEnd Edited September 11, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
daywalkereg Posted September 11, 2007 Author Posted September 11, 2007 Thanx Zedna I Made It But I Still Have Proplem How can show real icons for .txt .doc .jpeg .mp3 etc. 1 £0\\/3 |-|3® $0 |\\/|µ(|-|
Zedna Posted September 11, 2007 Posted September 11, 2007 Thanx Zedna I Made It But I Still Have Proplem How can show real icons for .txt .doc .jpeg .mp3 etc.I think ExtractAssociatedIcon API function is for that. See MSDNLook at my Log_View project in my signature to see how is similar ExtractIconEx API function called/used and make it in this way for ExtractAssociatedIcon. Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now