Old 31st May 2007, 22:56   #1
grizadams73
Junior Member
 
Join Date: Apr 2007
Posts: 4
Question 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:
PHP Code:
GetDlgItem $R0 $HWNDPARENT 4
SendMessage $R0 
${WM_SETTEXT"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?
Attached Images
File Type: png mui_help_button.png (22.1 KB, 154 views)
grizadams73 is offline   Reply With Quote
Old 31st May 2007, 23:03   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
You need to create a plugin that subclasses the main window

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 1st June 2007, 01:09   #3
grizadams73
Junior Member
 
Join Date: Apr 2007
Posts: 4
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.
grizadams73 is offline   Reply With Quote
Old 1st June 2007, 01:11   #4
grizadams73
Junior Member
 
Join Date: Apr 2007
Posts: 4
Since it didn't like my urls, here they are as text:

code:

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



I hope this works.
grizadams73 is offline   Reply With Quote
Old 1st June 2007, 08:08   #5
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Also you may find useful the ButtonEvent plugin,

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

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump