| View previous topic :: View next topic |
| Author |
Message |
Markus M.
Joined: 17 Apr 2007 Posts: 14 Location: Stuttgart (Ger)
|
Posted: Thu Apr 19, 2007 11:47 am Post subject: changing imageliste item |
|
|
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
 |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3626 Location: Belgrade
|
Posted: Thu Apr 19, 2007 12:35 pm Post subject: |
|
|
Ah, I see you started to realise...
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 |
|
 |
Markus M.
Joined: 17 Apr 2007 Posts: 14 Location: Stuttgart (Ger)
|
Posted: Thu Apr 19, 2007 1:15 pm Post subject: |
|
|
ok.
i realize, i have to live with my workaround
 |
|
| Back to top |
|
 |
Helpy Guest
|
Posted: Thu Apr 19, 2007 1:25 pm Post subject: |
|
|
| 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
|
Posted: Thu Apr 19, 2007 1:31 pm Post subject: |
|
|
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:
cmon, lets repeat it loud:
ADD REMOVE
ADD REMOVE
ADD REMOVE
you see... you understand now _________________
 |
|
| Back to top |
|
 |
Helpy Guest
|
Posted: Thu Apr 19, 2007 1:56 pm Post subject: |
|
|
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
|
Posted: Thu Apr 19, 2007 2:20 pm Post subject: |
|
|
| 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
| 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  _________________
 |
|
| Back to top |
|
 |
Markus M.
Joined: 17 Apr 2007 Posts: 14 Location: Stuttgart (Ger)
|
Posted: Thu Apr 19, 2007 3:05 pm Post subject: |
|
|
the need for replacing an imagelist icon is simply speed.
it took a while to recreate the whole list. not much, but it does
the link to the msdn article looks interesting, but it would be a huge task to implement it.
 |
|
| Back to top |
|
 |
Helpy Guest
|
Posted: Thu Apr 19, 2007 3:38 pm Post subject: |
|
|
| 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
|
Posted: Thu Apr 19, 2007 3:42 pm Post subject: |
|
|
| Quote: | | A Google Code Search shows 300 occurences |
Strange how ppl evolve here from one post to another
| Quote: | | most of them in Windows API wrapper |
ROFL.
Did you searh how many times wrappers are used ? _________________
 |
|
| Back to top |
|
 |
Helpy Guest
|
Posted: Thu Apr 19, 2007 3:59 pm Post subject: |
|
|
| majkinetor wrote: | | Quote: | | A Google Code Search shows 300 occurences |
Strange how ppl evolve here from one post to another  | 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 |
|
 |
|