Aceguy Posted June 1, 2008 Share Posted June 1, 2008 (edited) using $LVN_HOTTRACK so when i hover over the listview i get the image..... but it only works for the first 3-4 items in the listview. can u guys come up with something a bit more efficient please. maybee by loading images to memory.? then calling from memory Am using both .jpg files and .png Case $LVN_HOTTRACK; Sent by a list-view control when the user moves the mouse over an item Local $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) $row = DllStructGetData($tInfo, "Item") If $last = -1 Then GUICtrlSetImage($Pic1, "") If $last <> $row Then $last = $row $list_name=_GUICtrlListView_GetItemText($ListView, $row) $list_name=StringReplace($list_name," ","_") ConsoleWrite($list_name&@lf) _GDIPlus_Startup() for $ln=1 to $flist[0] if StringInStr($flist[$ln],".Jpg")>0 and StringInStr($list_name,$flist[$ln])>0 then $hImage = _GDIPlus_ImageLoadFromFile("C:\foo\"&$list_name&".jpg");png Else $hImage = _GDIPlus_ImageLoadFromFile("C:\foo\"&$list_name&".png") EndIf Next Local $hCLSID = _GDIPlus_EncodersGetCLSID("BMP") _GDIPlus_ImageSaveToFileEx($hImage, @ScriptDir & "\test.bmp", $hCLSID) $set=GUICtrlSetImage($Pic1, @ScriptDir & "\test.bmp") ;GUICtrlSetImage($Pic1, "C:\foo\"&$list_name&".Jpg") if $set=0 Then GUICtrlSetImage($Pic1, "") _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() ;ElseIf _GUICtrlListView_GetItemText($ListView, $row) = "testa" Then ; GUICtrlSetImage($Pic1, "C:\foo\Austere_Hat.Jpg") ;EndIf EndIf Edited June 1, 2008 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
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