AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

changing imageliste item

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Markus M.



Joined: 17 Apr 2007
Posts: 14
Location: Stuttgart (Ger)

PostPosted: Thu Apr 19, 2007 11:47 am    Post subject: changing imageliste item Reply with quote

is it possible to change an image of an imagelist item?

it seems only to be possible to add items to the list and destroy the complete list.
so my workaround is to destroy the list an reinitalize it. not the best way as the list disappears for some 10th of a second Crying or Very sad

Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 3626
Location: Belgrade

PostPosted: Thu Apr 19, 2007 12:35 pm    Post subject: Reply with quote

Ah, I see you started to realise... Laughing

Don't anybody full you, AHK is full of such things... this is certanly not lonely spot that needs to be fixed.
_________________
Back to top
View user's profile Send private message MSN Messenger
Markus M.



Joined: 17 Apr 2007
Posts: 14
Location: Stuttgart (Ger)

PostPosted: Thu Apr 19, 2007 1:15 pm    Post subject: Reply with quote

ok.
i realize, i have to live with my workaround Rolling Eyes

Back to top
View user's profile Send private message
Helpy
Guest





PostPosted: Thu Apr 19, 2007 1:25 pm    Post subject: Reply with quote

Can you give an example why you need to replace an image instead of adding one and using it?
Back to top
majkinetor



Joined: 24 May 2006
Posts: 3626
Location: Belgrade

PostPosted: Thu Apr 19, 2007 1:31 pm    Post subject: Reply with quote

OMG!

Why ppl around need examples for every thing in the world.

New keyword: extraploation
New kyeword: multiverse

If I add an image to the list, the most natural thing is to be able to remove it. Those things come together:

    ADD     REMOVE



cmon, lets repeat it loud:


    ADD     REMOVE

    ADD     REMOVE

    ADD     REMOVE


you see... you understand now
_________________
Back to top
View user's profile Send private message MSN Messenger
Helpy
Guest





PostPosted: Thu Apr 19, 2007 1:56 pm    Post subject: Reply with quote

majkinetor, AutoHotkey's handling of GUI has been designed as a balance between functionalities and ease of use.
If Chris has implemented all the Win32 API, there would have been no need for DllCall (except for 3rd party DLLs) but we would use a 10MB software with a 1000 page reference manual...
He chose to implement what he finds to be the most useful/used features. He can be wrong in his choices, but wish list is there to debate for that.

I found the ImageList_Replace function, which can be used with DllCall in the rare cases it is needed.
I write "rare case" because when I searched with Google for examples of use of this function, I found 88 hits (you might have more with less restrictions on languages), including the references and alternate implementations (ReactOS, Wine, etc.).

Having a perfectly orthogonal language is very nice in theory, but might not be very practical.
Back to top
majkinetor



Joined: 24 May 2006
Posts: 3626
Location: Belgrade

PostPosted: Thu Apr 19, 2007 2:20 pm    Post subject: Reply with quote

Quote:
majkinetor, AutoHotkey's handling of GUI has been designed as a balance between functionalities and ease of use.

Remove function has nothing to do with that. It wouldn't change easines as you don't need to use it if you dont' need it, and it would add new functionality.

Quote:
If Chris has implemented all the Win32 API,

When did I say that all api have to be implemented ?
As usual, ppl give me extremes of my ideas. I can give extreme of your ideas too, just I am serious enough (may be hard to grasp for some) not to do so.


Quote:
but we would use a 10MB software with a 1000 page reference manual...

Oh, so if we add few functions it imediately becomes Java, like PhiLho already "explained". About your 1000 pages manual, you can always use existing and add one link: "You want more, ha, do you? Well click here for more you crazy son of a ... "


Quote:
He can be wrong in his choices, but wish list is there to debate for that.

Ok, if you like, ask Jonny the boy to move this to the wish list, I wont mind Very Happy

Quote:
I found 88 hits (you might have more with less restrictions on languages)
Yeah, if you put CSound as a language restriction, there is 0. What a stupid function. Nobody uses it. (its not very nice to use extreme's in discussion isn't it )

Quote:
I found the ImageList_Replace function, which can be used with DllCall in the rare cases it is needed.

Really ?
Can you show me an example ?
I wonder what will you put as HIMAGELIST parameter.
Ah... I know... it has to be implemented all the way again, in AHK... good luck with your example that you are going to show me, right ?

Quote:
Having a perfectly orthogonal language is very nice in theory, but might not be very practical.

I am not talking about theories here. For that, I use different nickname Very Happy
_________________
Back to top
View user's profile Send private message MSN Messenger
Markus M.



Joined: 17 Apr 2007
Posts: 14
Location: Stuttgart (Ger)

PostPosted: Thu Apr 19, 2007 3:05 pm    Post subject: Reply with quote

the need for replacing an imagelist icon is simply speed.
it took a while to recreate the whole list. not much, but it does Wink

the link to the msdn article looks interesting, but it would be a huge task to implement it.

Back to top
View user's profile Send private message
Helpy
Guest





PostPosted: Thu Apr 19, 2007 3:38 pm    Post subject: Reply with quote

Markus M. wrote:
the need for replacing an imagelist icon is simply speed.
You didn't understood the question. Why do you need to change an image of the list?
In other words, I just want a real world use case of this functionnality.
A Google Code Search shows 300 occurences of the ImageList_Replace function, most of them in Windows emulators or Windows API wrapper (like wxWidgets). I didn't looked at all the pages, but the first (and only) case outside these was in a program which changed an image on the toolbar. And it probably could instead change the index in the image list, which would have been faster and more logical (that's the purpose of an IL).
On the other hand, searching ImageList_Add returns more than 2000 occurences. It shows the relative importance (use) of these APIs.

The problem isn't to add new functionalities, but to demonstrate they are compelling, beyond extrapolation...
Back to top
majkinetor



Joined: 24 May 2006
Posts: 3626
Location: Belgrade

PostPosted: Thu Apr 19, 2007 3:42 pm    Post subject: Reply with quote

Quote:
A Google Code Search shows 300 occurences

Strange how ppl evolve here from one post to another Laughing

Quote:
most of them in Windows API wrapper

ROFL.
Did you searh how many times wrappers are used ?
_________________
Back to top
View user's profile Send private message MSN Messenger
Helpy
Guest





PostPosted: Thu Apr 19, 2007 3:59 pm    Post subject: Reply with quote

majkinetor wrote:
Quote:
A Google Code Search shows 300 occurences

Strange how ppl evolve here from one post to another Laughing
First search is plain Google, with a disclaimer that I have a filter on language used in pages (ie. it won't list serbo-croatian pages...).
Second search used the most specialized Google Code Search, a handy tool which looks in archives too.

Quote:
Quote:
most of them in Windows API wrapper

ROFL.
Did you searh how many times wrappers are used ?
I wrote:
I didn't looked at all the pages
Another disclaimer...
You can see the project in the displayed results.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group