Jump to content
Sign in to follow this  

_GUIImageList_AddIcon load rom Array [SOLVED]

Recommended Posts


Local $hGui, $listview, $hImage

    Local $aArray = _FileListToArrayRec(IniRead($ini, "Name", "path", ""), "*file.exe", $FLTAR_FILES, 1, $FLTAR_SORT,$FLTAR_FULLPATH)

    $hGui = GUICreate("ImageList", 400, 300)
    $listview = _GUICtrlListView_Create($hGui, "", 2, 2, 394, 268)
    _GUICtrlListView_InsertColumn($listview, 0, "Programs", 300)
    $hImage = _GUIImageList_Create(32, 32)

    $fileArray = UBound($aArray) -1

        For $y = 1 To $fileArray
                _GUIImageList_AddIcon($hImage, $IniRead($ini,$aArray[$y], "icon", ""))
                _GUICtrlListView_SetImageList($listview, $hImage, 1)
                _GUICtrlListView_AddItem($listview, $aArray[$y])


I would like to place an icon dynamically from an .ini file. 
From the .ini file the name of the program is loaded properly , but the icon remains the same, It loads only the icon of the first program.

could Someone help me?


Mea culpa,

$ico =_GUIImageList_AddIcon($hImage, $IniRead($ini,$aArray[$y], "icon", ""))

_GUICtrlListView_SetImageList($listview, $hImage, 1)

_GUICtrlListView_AddItem($listview, $aArray[$y],$ico)

Edited by rootx

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By rootx
      I would like to know how to increase the resolution of the icons in the grid.
      $iColor = 5 is 32 bit DIB section.. but if I try with
      $Image = _GUIImageList_Create(48,48,5,1)
      the upscaling is very bad and pixelate, I have 32bit icon resolution with hight detail, how can I control or force the resolution of the icons ?
  • Create New...