Archive: Hypertex on custom pages


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.


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.


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)?


Yes, or come to the NSIS IRC channel and ask me.


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.


Kichik knows more about InstallOptions, but maybe you can create a normal label, give it a color and catch the click-event.


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.


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?


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..


Ok, thanks for the suggestions kichik. I'll see what I can come up with.


Maybe this will help us to
change the textcolor in the static labels of the
installer?


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.