07-19-2005 05:02 AM
07-20-2005 09:39 AM - edited 07-20-2005 09:39 AM
Message Edited by Ian W on 07-20-2005 10:40 AM
07-20-2005 10:04 AM
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.
07-20-2005 02:16 PM
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.
Good luck!
--Ian
07-21-2005 01:44 AM
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...