LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

associate several icons with one executable

Hello,
is it possible to associate several icon files to one CVI executable in order to associate, in registry, different icons for files openable with my application?
Thanks.
0 Kudos
Message 1 of 5
(3,156 Views)
You should be able to associate several file type (each with their own icon) with your application.
 
For more info on the registry entries needed, see this thread:
 
Hope this helps.
 
--Ian

Message Edited by Ian W on 07-20-2005 10:40 AM

0 Kudos
Message 2 of 5
(3,140 Views)

Thanks for replying, but I already know all of that. The problem is when I fill the DefaultIcon key in the registry, because here, the only way to specify an icon is to specify an exe file and an index which corresponds to an element of the icon's list associated with this exe file. In labwindows CVI, we can only associate one icon to the executable file so I have only the index 0 available. It works fine when I want to have the same icon for all the files of my application but not when I don't want to. So is there a way to associate several icons to my application executable, in order to set an index different from 0 in the registry.

Thanks.

0 Kudos
Message 3 of 5
(3,136 Views)

yc,

Perhaps we are not using consistent terminology. You say that you want to "associate several icons to my application executable". I take it you mean that you want to associate (in a Windows sense) several file types to your app, and you want to associate several different icons (again, in a Windows sense) to those file types, and you want all those icons embedded in your .exe.

You are correct that "In labwindows CVI, we can only associate" [i.e. embed] "one icon to the executable file" but you say that "the only way to specify an icon is to specify an exe file and an index ". Not quite true: I think that you will find that the use of ".ico" files (rather than your .exe file) to specify a different icon, as mentioned near the end of that thread will work -- albeit not all nicely embedded in your .exe. (Use of .ico files is also mentioned here: http://forums.ni.com/ni/board/message?board.id=180&message.id=3116

Hopefully this will give you a usable solution.

To use a non-zero index with your CVI-built app is not possible, because as you correctly state, you can't embed more than one icon in your exe with CVI. There was a thread topic some time ago, but I can't find it. Perhaps someone else can help us with that link.

If you were hoping for a third party tool to add icons to your CVI-built .exe, we'll both be happy if someone can point us to it!

As an aside, I feel compelled to point out that giving a "mid-range" star rating to an answer tends to almost always drag down a person's credibility score in this forum.  Some people think of one star as "bad", while others see one or more stars as always positive - hence the weird situation where for many people an unrated message is more valuable than getting 4 stars! It shouldn't matter, I know ..... I'll take it elsewhere.Smiley Sad

Good luck!

--Ian

Message 4 of 5
(3,119 Views)

OK, i didn't know that I could put an icon file as DefaultIcon in the registry because there's no example of that in my registry. That was exactly what I need, thanks.

Sorry, about the rating but I don't really know what is behind that...

0 Kudos
Message 5 of 5
(3,103 Views)