Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   User Selectable Icons for Main Executable (http://forums.winamp.com/showthread.php?t=231611)

Ambience-Design 21st November 2005 21:39

User Selectable Icons for Main Executable
 
My program has five different icons. I want the user to be able to choose which one the Desktop and Start Menu shortcuts use. Is this possible? And if so, how?

Animaether 21st November 2005 22:51

You *could* use InstallOptions or InstallOptionsEx for this purpose. Create a dialog with 5 radiobuttons layed out in a vertical or horizontal fashion, and stick bitmaps beside/above/below each - each bitmap being your icons. You can have the user pick one that way quite visually.

Alternatively, you could use one of the 'radiobutton' behaviors for Sections so that the user has to select it in the Components page. That doesn't allow you to show what the icon looks like, though, and the code of those Section handlers is typically quite frightening ;)

Joel 21st November 2005 23:14

Agree with Animaether... tey IO or IOex and show in a custom page your icons, letting the user to choose...

Alternative, you can use the components page, but the icons won't be visible there :(

Ambience-Design 22nd November 2005 00:13

Okay, I get that part. But how would I make it so that whatever radio button is seleted tell the shortcut to use a different IconGroup in the exe's resources. I tried looking at some sample code that came with the NSIS system, but none of them that I could tell had a way of pointing to a specific IconGroup, they just used the default group.

Animaether 22nd November 2005 00:29

I don't know about IconGroups, but if you just have a bunch of icon resources in your DLL/EXE, you can specify the icon index in the CreateShortcut command?

Ambience-Design 22nd November 2005 01:35

Okay, forgive me if I sound incredibly stupid. I downloaded an InstallOptions form designer, but I'm completely clueless on how to assign a bitmap to a bitmap control. It doesn't have an option to let me pick the bitmap file, the help file doesn't mention it either, not even the NSIS help file mentions it.

:/

Animaether 22nd November 2005 07:19

Text
(optional)
Specifies the caption of a label, checkbox, or radio button control. For DirRequest control this specifies the title of the browse dialog. For icon and bitmaps control this specifies the path to the image.
---
From the InstallOptions readme :)


All times are GMT. The time now is 05:17.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.