Re: Using Win32Lib's geFileInfo to show system icon

new topic     » goto parent     » topic index » view thread      » older message » newer message

Larry Miller wrote:
> 
> Using the code you are using could cause problems, particularly if the code
> is called many times and with Win98. 

That's what I was afraid of...

> 
> But there is an alternative you might consider. Win32Lib does maintain it's
> own imagelist but you do not have to use it. You may be able to use the system
> imagelist whose handle can be obtained with the following code:
> 
> file_info=getFileInfo("*.txt",#80,
>      or_all({SHGFI_SYSICONINDEX+SHGFI_USEFILEATTRIBUTES+SHGFI_SMALLICON})
> 
> file_info[7] will contain the handle to the system imagelist.
> 
> You can then do:
> 
> void=sendMessage(MainTV,TVM_SETIMAGELIST,TVSIL_NORMAL,file_info[7])
> 
> to use this image list in the Treeview control.
> 

But what if I have other images not in the system image list that I want to use?
 Will using the TVM_SETIMAGELIST replace Win32Lib's image list that I'm using for
other non-system images?


Jonas Temple
http://www.yhti.net/~jktemple

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu