08-09-2019 05:50 AM
Hi Yamaeda
Yes true enough, but it's very limited and from what I can see you can't take a 256 image and easily resize for 48,32,16 you have to redraw each time.
08-09-2019 06:56 AM - edited 08-09-2019 07:04 AM
Yes the distributed icon editor that comes with LabVIEW is an old LabWindows/CVI program. At that time 256 color icons and 32*32 pixel icons where about the hottest thing Windows would support. I'm still not sold on 48*48 or 64*64 to be necessary in any way nor do I see a lot of use for 10 million color icons.
That said the registry association as used in Windows definitely allows to define for each filetype an individual icon. The problem here is that there are several possibilities to define such icon associations and they all involve a multi stage setup.
The original principle is that you define a file extension specification in HKR\.<your file extension> whose key value defines a filetype name. Then the key value for HKR\<filetype name>\DefaultIcon contains the path to the icon resource. This can be directly an icon file somewhere in the file system or it can point to a dll or exe file, with an appended icon resource ID after a comma.
It's definitely NOT necessary (but possible through a resource compiler or editor) to add the icons to your built executable as the path can also simply point to an icon somewhere in the filesystem, such as an icon file in a support directory in your application installation directory.
Under HKR\<filetype name>\shell you have a list of keys which define different actions by well know verbs such as open, print, etc. Under there you have another key with the name "command" whose value defines the shell command to execute with the filepath of the executable to use, or optionally a registered ClassID instead which must be present elsewhere in the registry for the actual executable. The value %1 in the command is replaced with the file name that was activated by the user.
It's not exactly rocket science to figure out by simply looking at the filetypes LabVIEW registers for its own filetypes but it is definitely approaching relational database complexity
08-09-2019 07:21 AM
@NeilR wrote:
Hi Yamaeda
Yes true enough, but it's very limited and from what I can see you can't take a 256 image and easily resize for 48,32,16 you have to redraw each time.
Yes, true. 😕 The resizing i do in e.g. GIMP and simply copy/paste the buffer. You can technically create icons in GIMP but it has some issues of its own.
/Y
08-11-2019 10:25 PM
For icon creation I've found IcoFX is good (version 1.6 is freeware, current versions are paid). It can generate all icon colour + size combinations from a single image in one batch process. The results are good enough for 48x48 and most 32x32, but some 32x32 and 16x16 icons may need some hand edits depending on the source image.
10-26-2019 08:51 AM
Hi,
This is the last post of Mike Porter, and his super cool blog named notatamelion is down.
Does anyone has any news of him ?
Thx,