Archive: Adding Help Button to installer: MUI


Adding Help Button to installer: MUI
I would like to add a Help button to the installer, similar to other installers that I have seen. I modified ${NSISDIR}\Contrib\UIs\modern.exe using Resource Hacker to add a blank button, and added the following to my custom GUI Init function:

GetDlgItem$R0$HWNDPARENT4

SendMessage$R0
${WM_SETTEXT}0"STR:Help"
This produces the button just fine (see attached picture), but how do I call a function when the user clicks on it? I want the function to open a URL to the online help page for the application.

I think I need to set a callback using the System plugin, but I'm not sure how to do that. Is this the right way? If so, how? If not, what is?

You need to create a plugin that subclasses the main window


I checked the forum for info on subclassing, and since I'm not a win32 programmer, that's not an option. Fortunately, I found a plugin that already does this: the HelpButton plug-in. For those looking for it, here's the forum thread and the wiki page.


Since it didn't like my urls, here they are as text:


http://forums.winamp.com/showthread.php?s=&threadid=149292
http://nsis.sourceforge.net/HelpButton_plug-in


I hope this works.

Also you may find useful the ButtonEvent plugin,

http://nsis.sourceforge.net/ButtonEvent_plug-in