1. addIcon return
- Posted by aku saya <akusaya at gmx.net> May 31, 2003
- 435 views
I found that when addIcon fails, it returns 1, so it can refer to other icon that has index 1 on the ImageList. How about adding if equal(hIcon, 0) then return 0 end if to the beginning of addIcon()? Sample code: include win32lib.ew constant win = create(Window, "win", 0, Default, Default, Default, Default, 0), lv = create(ListView, {"column1", "column2"}, win, 0, 0, 1000, 1000, LVS_REPORT) object ret, wk, dd dd = dir("c:\\windows\\*.exe") for i = 1 to 100 do ret = addIcon(extractIcon("c:\\windows\\" & dd[i][D_NAME])) ret = addLVItem(lv, ret, {dd[i][D_NAME], "xxx"}) end for WinMain(win, Normal) using current addIcon, some items will have incorrect icons. Thanks!
2. Re: addIcon return
- Posted by Derek Parnell <ddparnell at bigpond.com> May 31, 2003
- 414 views
----- Original Message ----- From: "aku saya" <akusaya at gmx.net> To: "EUforum" <EUforum at topica.com> Subject: addIcon return > > > I found that when addIcon fails, it returns 1, > so it can refer to other icon that has index 1 on the ImageList. > > How about adding > if equal(hIcon, 0) then > return 0 > end if > to the beginning of addIcon()? > Sure. I've added this now.