- NSIS Discussion
- Plugin: MessageBoxEx
Archive: Plugin: MessageBoxEx
Joel
9th January 2006 03:22 UTC
Plugin: MessageBoxEx
Version: 0.1
A plugin to display the typical MessageBox with a checkbox.
WARNING: a debug version to test. Copy MessageBoxEx to your ${NSISDIR}\Plugins folder.
'MessageBoxEx'
>!define INST_VER '0.1'
>Name "${INST_NAME}-${INST_VER}"
>OutFile "${INST_NAME}-${INST_VER}.exe"
>ShowInstDetails show
XPStyle on
Section
>; Show: ***91;Title***93; ***91;flags***93; ***91;Body***93; ***91;Check_Text***93;
;Title : Caption of the MB.
;flags: integer to display icon and buttons for the MB, for example: 35 = MB_YESNOCANCEL|MB_ICONQUESTION
>; Body: the text of the MB
>; Check_Text: The caption for the check box.
;returns: $0 the ID of the button; $1 1=checkec 0=uncheked
MessageBoxEx
::Show "Hello World" 35 "Good bye wonderfull world" "Do you like me? Check ME!"
>DetailPrint "MessageBox returning value: $0"
>DetailPrint "CheckBox returning value: $1"
>SectionEnd
>
sixcode
9th January 2006 19:24 UTC
this is great
testing now :D
Joel
10th January 2006 01:11 UTC
MessageBoxEx 0.2
Version: 0.2
New:
-Now is centered upon installer dialog.
-Add a dummy help file...yeah, the flags are in there :p
sixcode
10th January 2006 17:52 UTC
and thanks again :)
Joel
11th January 2006 00:47 UTC
MessageBoxEx 0.3
Version 0.3
New:
-Added a line between the buttons & the checkbox control
-Now MessageBox is a little smaller then old versions...nice?
sixcode
11th January 2006 15:54 UTC
very nice, looks good
{_trueparuex^}
11th January 2006 15:55 UTC
Not bad. You could add this to the wiki http://nsis.sourceforge.net/Main_Page
Joel
11th January 2006 19:52 UTC
Oh... :eek: that's new to me :eek:
I could but the plugin stil in beta development, not even is version 1 lol :blah:
iceman_k
12th January 2006 15:27 UTC
What would be really useful is the ability to add 1-4 custom buttons (i.e., customized text on the buttons).
DrO
12th January 2006 16:09 UTC
i've got prelimany support for the checkbox in my messagebox plugin, just need to finish the re-code of it all
-daz
kichik
12th January 2006 16:19 UTC
How about wrapping XMessageBox as a plug-in?
l_d_allan
12th January 2006 16:19 UTC
This looks VERY interesting .... and thanks for providing it.
What would be really useful is the ability to add 1-4 custom buttons (i.e., customized text on the buttons).
I've been flailing with how to collect a three way RadioButton-like choice from the end-user regarding which directory to install to ... I've wondered if a "smarter MessageBox" would work ... I can now accomplish what I want to do with two MessageBoxes now, but that seems flawed.
(see this thread:
http://forums.winamp.com/showthread....hreadid=235301)
Can your provide the source code for the plug-in you are working on? (but I'm very much a plug-in newbie)?
The MessageBoxEx would end up looking something like:
---------------------
Which directory do you want to install myapp.exe in?
O = Same as FAMILY_PATH = X:\Bin\Family
0 = Same as sibling.exe = C:\Program Files\sibling
0 = Neither of the above ... use:
Type=DirRequest entry field
----------------------
This has three radiobuttons .... the last Type=DirRequest would only be enabled if its associated RadioButton was picked.
These choices would be "figured out" during .onInit by detecting the presence or absence of the environment variable FAMILY_PATH and whether sibling.exe left "InstallDir bread crumbs entries" in the registry to indicate that it had been installed ... and where.
The issue is that there are a "family of applications" that want to be able to flexibly share common resources. The FAMILY_PATH can be used to point to the resources. However, it is possible to leave this undefined, especially for testing purposes. This allows sibling.exe and myapp.exe to be more or less independent of each other.
iceman_k
12th January 2006 16:40 UTC
Originally posted by kichik
How about wrapping XMessageBox as a plug-in?
Oooooh... that would be fabulous!!!:up: :up: :up:
l_d_allan
12th January 2006 17:33 UTC
I've used MFC quite a bit, "borrowed" often from CodeProject, and would be willing to help if appropriate (but I'm a newbie to plug-ins)
DrO
12th January 2006 17:39 UTC
i'll be updating/porting as needed with my plugin tonight (to save you trying to duplicate coding time) plus i need this for some other projects i'm working on now so i'm happy to spend the time on it
-daz
Joel
12th January 2006 18:39 UTC
Just don't be confused:
DrO already has a plugin for multiple buttons and stuff, I'm just helping the little dude about the checkbox... I vote for DrO's...
I'm not as pro as DrO ;)
sixcode
14th January 2006 13:12 UTC
Originally posted by Joel
Just don't be confused:
DrO already has a plugin for multiple buttons and stuff, I'm just helping the little dude about the checkbox... I vote for DrO's...
I'm not as pro as DrO ;)
"little dude" :D
btw... if you use the MB in the function .onInit the MB pops up in the right down korner of the screen
can this be fixed?
Joel
14th January 2006 18:41 UTC
if you use the MB in the function .onInit the MB pops up in the right down korner of the screen
can this be fixed?
Well... that's because there's no handle of a window by NSIS, I can use the desktop to centered upon it...
Joel
15th January 2006 01:08 UTC
MessageBoxEx 0.4
Version 0.4
New:
-Now is centered, even when isn't a nsis dialog window.
-Add a interaction between button & checkbox...(there you go sixcode)
sixcode
15th January 2006 01:25 UTC
Re: MessageBoxEx 0.4
Originally posted by Joel
Version 0.4
New:
-Now is centered, even when isn't a nsis dialog window.
-Add a interaction between button & checkbox...(there you go sixcode)
yup.. working great now
thanks for al the help Joel :up: :up:
Joel
16th January 2006 04:05 UTC
MessageBoxEx 0.5
Version 0.5
New:
-Added a function to display a colorful MsgBox (need suggestions on this one)
Clammerz
18th December 2006 19:15 UTC
Hi, the checkbox option on this plugin is really useful.
The problem is that it seems to have a limit on the number of characters you can use for the text?
It seems to crash if I use over 63 characters.
Is this a bug? Or is it by design that you cannot have more?
Thank you for your time.
Comperio
21st April 2007 19:39 UTC
Hey Joel,
I was just playing around with this plugin.
I found that the DLL actually contains 4 functions, but only one is explained in the help files. And a differnet fucntion is in the examples:
The four functions I see (at least when using ExclipseNSIS) are:
Show
ShowEx
ShowClr
Ver
Show is documented in the HTM file. ShowClr is documented in the example, but what are ShowEx and Ver? (I assume VER returns the vesion, but nothing happens when I call it.)
also:
I don't see MessageBoxEx on your plugins website or the Wiki. Should it be?
Joel
22nd April 2007 19:35 UTC
Hi!
It's been a while..no, is not meant to be in my plugins because was a personal project based on an user suggestion...
Should I continue develop it? I mean there are more great plugins than this :)
Comperio
22nd April 2007 23:04 UTC
The extra checkbox is a nice feature (and something I've not seen in other msgbox plugins.)
But since you're the author, I guess ultimately it's whatever you want to do. ;)