Archive: Plugin: MessageBoxEx


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
>

this is great
testing now :D


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


and thanks again :)


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?


very nice, looks good


Not bad. You could add this to the wiki http://nsis.sourceforge.net/Main_Page


Oh... :eek: that's new to me :eek:

I could but the plugin stil in beta development, not even is version 1 lol :blah:


What would be really useful is the ability to add 1-4 custom buttons (i.e., customized text on the buttons).


i've got prelimany support for the checkbox in my messagebox plugin, just need to finish the re-code of it all

-daz


How about wrapping XMessageBox as a plug-in?


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.

Originally posted by kichik
How about wrapping XMessageBox as a plug-in?
Oooooh... that would be fabulous!!!:up: :up: :up:

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)


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


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


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?

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

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)


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:

MessageBoxEx 0.5
  Version 0.5

New:
-Added a function to display a colorful MsgBox (need suggestions on this one)


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.


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?


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


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