Jump to content

How add Images in GuiCtrlCreateListViewItem ?


beginlove
 Share

Recommended Posts

Look for example at my log_view project. It's in my signature.

Hi Zedna,

I do'nt understand your language tchek? but

I looked at your code, great job !

I found something in it.

Your log file ends with a blank line, so the last line in the listbox is empty.

I change on line 216 to

$pocet = $log[0]-1; with this it seems rigth

As I do'nt understand all the words, can you explain me what is this program doing?

:)

Link to comment
Share on other sites

Hi Zedna,

...

As I do'nt understand all the words, can you explain me what is this program doing?

:)

Hi. Thanks for compliments and correction.

This program is Viewer with filtering capability for standard LOG files from WSFTPD program.

WSFTPD is FTP.

On this project I also successfully tested including of external ICO files into AutoIt compiled EXE and using them as icons for Listview items.

Source is ikony.rc which is compiled by this batch:

rc.exe ikony.rc

output is compiled resource file ikony.res

Now you can compile log_view.au3 in standard way and after that you must run this batch (res2exe_vse.bat):

upx.exe -d log_view.exe
ResHacker.exe -add log_view.exe, log_view.exe, ikony.res ,,,
upx.exe --compress-icons=0 log_view.exe

This will do:

- decompress EXE from UPX

- add compiled icons (RES) into log_view.exe

- compress EXE by UPX (icons stays uncompressed)

Now you can directly do GUICtrlSetImage() with icons from self EXE in AU3

as you can see in log_view.au3

Case 'LOGIN'
    If @compiled = 1 Then
        GUICtrlSetImage(-1, @ScriptFullPath, 5)
    Else
        GUICtrlSetImage(-1, "icons\login.ico")
    EndIf
Case 'DOWNLOAD'
    If @compiled = 1 Then
        GUICtrlSetImage(-1, @ScriptFullPath, 6)
    Else
        GUICtrlSetImage(-1, "icons\download.ico")
    EndIf
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...