AutoHotkey Community

It is currently May 27th, 2012, 11:05 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: changing imageliste item
PostPosted: April 19th, 2007, 11:47 am 
Offline

Joined: April 17th, 2007, 1:49 pm
Posts: 14
Location: Stuttgart (Ger)
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 :cry:

Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2007, 12:35 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Ah, I see you started to realise... :lol:

Don't anybody full you, AHK is full of such things... this is certanly not lonely spot that needs to be fixed.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2007, 1:15 pm 
Offline

Joined: April 17th, 2007, 1:49 pm
Posts: 14
Location: Stuttgart (Ger)
ok.
i realize, i have to live with my workaround :roll:

Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2007, 1:25 pm 
Can you give an example why you need to replace an image instead of adding one and using it?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2007, 1:31 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2007, 1:56 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2007, 2:20 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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 :D

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 :D

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2007, 3:05 pm 
Offline

Joined: April 17th, 2007, 1:49 pm
Posts: 14
Location: Stuttgart (Ger)
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.

Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2007, 3:38 pm 
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...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2007, 3:42 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Quote:
A Google Code Search shows 300 occurences

Strange how ppl evolve here from one post to another :lol:

Quote:
most of them in Windows API wrapper

ROFL.
Did you searh how many times wrappers are used ?

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2007, 3:59 pm 
majkinetor wrote:
Quote:
A Google Code Search shows 300 occurences

Strange how ppl evolve here from one post to another :lol:
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.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Edd, Exabot [Bot], Google Feedfetcher, HotkeyStick, Yahoo [Bot] and 13 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group