- NSIS Discussion
- Hypertex on custom pages
Archive: Hypertex on custom pages
rsegal
7th May 2003 21:01 UTC
Hypertex on custom pages
Is it possible to have a word or piece of text in a custom dialog page that is clickable, linking it to a URL? Some programs have this feature, I know it can be done in MFC. I'm not sure if anyone has actually done this for NSIS.
Joost Verburg
7th May 2003 22:27 UTC
This feature is not available in InstallOptions (the plug-in for custom pages). You can post a feature request at http://nsis.sf.net or if you can write C++, you migth want to add it yourself.
rsegal
8th May 2003 16:35 UTC
Thanks joost. I was thinking of trying to add the feature in myself. If I have any questions about the current InstallOptions code can I post those questions in this forum (NSIS Discussion)?
kichik
8th May 2003 16:39 UTC
Yes, or come to the NSIS IRC channel and ask me.
rsegal
8th May 2003 19:58 UTC
Ok, so I've been looking through the install options DLL. It looks like all the controls are actually created with a call to CreateWindowEx. One of the parameters to CreateWindowEx specifies the type of control to create. Which could be a text box, combo box, radio button, etc. Now lets say I have a class derived from CStatic, say CStaticEx which adds some functionality to the normal static text control. Can I get CreateWindowEx to create this newly define class? I'm looking at the documentation for CreateWindowEx on MSDN to see if this is possible. However, it's not really telling me what I want to know.
Joost Verburg
8th May 2003 20:02 UTC
Kichik knows more about InstallOptions, but maybe you can create a normal label, give it a color and catch the click-event.
kichik
8th May 2003 20:05 UTC
InstasllOptions doesn't use MFC. It will be a very bad idea to make the installer depend on MFC run time files because they will have to be installed before the installer shows the InstallOptions page, bloat the installer, and might even require a reboot just to run the installer.
rsegal
8th May 2003 21:03 UTC
That's fine I don't have to use MFC. I have a Win32 version available I can use. But can I get CreateWindowEx to create a derived version of a static control?
kichik
8th May 2003 21:52 UTC
You'd have to register your own class for that. You don't really need it... You can just respond to WM_CTLCOLORSTATIC, set the color and the font and subclass the static control using SetWindowLong, create it with the SS_NOTIFY style, in your WndProc respond to WM_NOTIFY and call ShellExecute if you got STN_CLICKED..
rsegal
8th May 2003 23:28 UTC
Ok, thanks for the suggestions kichik. I'll see what I can come up with.
Joel
9th May 2003 01:03 UTC
Maybe this will help us to
change the textcolor in the static labels of the
installer?
Sunjammer
9th May 2003 08:42 UTC
Not really. KiCHiK has been aware of how to code a solution to that for a while I suspect but has been busy doing other things. You can't use the technique in an NSIS script because it requires that you respond to an event (WM_CTLCOLORSTATIC) that you have no way of catching in the first place.