WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > MessageBox with more buttons
Pages (3): [1] 2 3 »   Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
n0On3
Senior Member

Registered: Jan 2001
From: Barcelona

MessageBox with more buttons

I am looking for a way to make a MessageBox with the buttons "yes", "yes to all", "no" and "no to all".

I searched, and checked documentation but still don't know how to do it.

anyone?

Quick Link | Report this post to a moderator | IP: Logged

n0On3 is offline Old Post 09-12-2003 09:37 AM
Click Here to See the Profile for n0On3 Click here to Send n0On3 a Private Message Click Here to Email n0On3 Visit n0On3's homepage! Find more posts by n0On3 Add n0On3 to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Israel

As always, it's a built-in Windows API function, you need a plug-in to change it.

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 09-12-2003 10:02 AM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
n0On3
Senior Member

Registered: Jan 2001
From: Barcelona

A brand new plugin, or a trick with the system plugin?

I think you meant a brand new plugin but since I saw many nice tricks with that system plugin, maybe I can find a workaround

If I can't find a workaround, users will have to click 'yes' to all

Quick Link | Report this post to a moderator | IP: Logged

n0On3 is offline Old Post 09-12-2003 11:05 PM
Click Here to See the Profile for n0On3 Click here to Send n0On3 a Private Message Click Here to Email n0On3 Visit n0On3's homepage! Find more posts by n0On3 Add n0On3 to your buddy list Edit/Delete Message Reply w/Quote
Joel
Debian user
(Forum King)

Registered: Jan 2003
From: Ubuntu land

With system plugin? I don't know... too much API calls since we're subclassing

__________________

* Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM.
* Ubuntu 9.10 64-bits.
* Firefox (Namoroka) 3.6.2.
* lighttpd, php5, perl, eruby, python.
* geany, XHTML & CSS & JavaScript, Gtk+, QT4, bindings.

Quick Link | Report this post to a moderator | IP: Logged

Joel is offline Old Post 09-12-2003 11:23 PM
Click Here to See the Profile for Joel Click here to Send Joel a Private Message Click Here to Email Joel Visit Joel's homepage! Find more posts by Joel Add Joel to your buddy list Edit/Delete Message Reply w/Quote
n0On3
Senior Member

Registered: Jan 2001
From: Barcelona

mmm.... I was playing with messagboxes and saw that I can't use two sets of buttons at once, so the max buttons is three (abor, retry, ignore or yes, no, cancel), but there's a MB_DEFBUTTON4 for making default the 4th button. I am missing something?

Lobo, are you saying that using system plugin for this would be difficult but possible?

Quick Link | Report this post to a moderator | IP: Logged

n0On3 is offline Old Post 09-13-2003 12:31 AM
Click Here to See the Profile for n0On3 Click here to Send n0On3 a Private Message Click Here to Email n0On3 Visit n0On3's homepage! Find more posts by n0On3 Add n0On3 to your buddy list Edit/Delete Message Reply w/Quote
Joel
Debian user
(Forum King)

Registered: Jan 2003
From: Ubuntu land

actually...in VB you are using the same MsgBox but you edit
the strings, you know: "OK", "CANCEL" with stuff you like.
Is subclassing. I think Nsis have one, maybe the developers can put some test code so we can convert it to system plugin syntax.

__________________

* Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM.
* Ubuntu 9.10 64-bits.
* Firefox (Namoroka) 3.6.2.
* lighttpd, php5, perl, eruby, python.
* geany, XHTML & CSS & JavaScript, Gtk+, QT4, bindings.

Quick Link | Report this post to a moderator | IP: Logged

Joel is offline Old Post 09-14-2003 02:50 AM
Click Here to See the Profile for Joel Click here to Send Joel a Private Message Click Here to Email Joel Visit Joel's homepage! Find more posts by Joel Add Joel to your buddy list Edit/Delete Message Reply w/Quote
Joost Verburg
NSIS MUI Dev

Registered: Nov 2001
From:

I don't think this is possible using the System plug-in. You have to write a new one.

Quick Link | Report this post to a moderator | IP: Logged

Joost Verburg is offline Old Post 09-14-2003 10:07 AM
Click Here to See the Profile for Joost Verburg Click here to Send Joost Verburg a Private Message Find more posts by Joost Verburg Add Joost Verburg to your buddy list Edit/Delete Message Reply w/Quote
brainsucker
Senior Member

Registered: Sep 2002
From: Minsk, Belarus

System allows to do everething needed to create custom dialog, but NSIS somehow brokes all the dialogs created at the scripting thread. And the system couldn't create a new thread for it...

Quick Link | Report this post to a moderator | IP: Logged

brainsucker is offline Old Post 09-14-2003 09:28 PM
Click Here to See the Profile for brainsucker Click here to Send brainsucker a Private Message Find more posts by brainsucker Add brainsucker to your buddy list Edit/Delete Message Reply w/Quote
n0On3
Senior Member

Registered: Jan 2001
From: Barcelona



Quick Link | Report this post to a moderator | IP: Logged

n0On3 is offline Old Post 09-15-2003 10:31 AM
Click Here to See the Profile for n0On3 Click here to Send n0On3 a Private Message Click Here to Email n0On3 Visit n0On3's homepage! Find more posts by n0On3 Add n0On3 to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

Try this (isn't complete yet but it shows the basics i hope )

It allows you to set the title and caption as a normal messagebox but you can define the number of buttons to include and also the text for the 4 buttons on the messagebox (the 4th is the 'help' button).

Has a few problems still in handling the number of buttons and some of the standard styles of a messagebox but it works eg MB_HELP.

note: if a button text isn't associated for a button then in most cases the button text will be cleared - haven't put checking of that in yet .

Example is basic but should give you an idea of things so far (more complete info will come soon). I will alter the way of setting the button text so that you just pass in what you want to change
eg
with a yes|no|cancel then you can pass only the text needed for the 'no' to change it to yes|blah|cancel.

Feedback welcome

Daz

ps when using the 'help' button nothing happens at the moment - thinking of playing with it to act as a full button eventually if things work out

Attachment: msgbox.zip
This has been downloaded 1000 time(s).

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 09-18-2003 03:18 PM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
Joel
Debian user
(Forum King)

Registered: Jan 2003
From: Ubuntu land

Nice Thanks dude...

__________________

* Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM.
* Ubuntu 9.10 64-bits.
* Firefox (Namoroka) 3.6.2.
* lighttpd, php5, perl, eruby, python.
* geany, XHTML & CSS & JavaScript, Gtk+, QT4, bindings.

Quick Link | Report this post to a moderator | IP: Logged

Joel is offline Old Post 09-18-2003 07:09 PM
Click Here to See the Profile for Joel Click here to Send Joel a Private Message Click Here to Email Joel Visit Joel's homepage! Find more posts by Joel Add Joel to your buddy list Edit/Delete Message Reply w/Quote
brainsucker
Senior Member

Registered: Sep 2002
From: Minsk, Belarus

huh Windows Hooks Nice idea!

Quick Link | Report this post to a moderator | IP: Logged

brainsucker is offline Old Post 09-18-2003 09:17 PM
Click Here to See the Profile for brainsucker Click here to Send brainsucker a Private Message Find more posts by brainsucker Add brainsucker to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

quote:
Originally posted by brainsucker
huh Windows Hooks Nice idea!


that's what i thought to

found it when i was playing with hooks to get all visible windows to dock to the edge of the desktop and found that i could catch a messagebox being created, so i can get its hwnd

will upload the new version when i get on the other work machine in a bit. changed a few bits so that now the 'help' button will react as a proper button (apart from a few cases still ) and fixed some bugs and stuff.

what's the normal buffer limit for the included messagebox?

-daz

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 09-19-2003 12:44 PM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

update

latest version attached

now you can set only the button text you want to otherwise the existing text will be kept. also it doesn't matter which way round you pass in the button order

done a number of internal changes so that now there is a functional 'forth' button on the dialog so it is possible to do "yes", "yes to all", "no" and "no to all" and have the option working.

setting the number of buttons to -1 allows the normal button states to be set and the text can still be set for the buttons.

still are a few issues ie using MB_HELP to get the forth button will not always close for a few mode combinations when using '-1'.

enjoy
daz

Attachment: msgbox2.zip
This has been downloaded 747 time(s).

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 09-19-2003 02:18 PM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
n0On3
Senior Member

Registered: Jan 2001
From: Barcelona

wow!!!

I missed all this replies!!!

How could I!!!???

Thanks DrO, gonna test this

Quick Link | Report this post to a moderator | IP: Logged

n0On3 is offline Old Post 09-19-2003 10:51 PM
Click Here to See the Profile for n0On3 Click here to Send n0On3 a Private Message Click Here to Email n0On3 Visit n0On3's homepage! Find more posts by n0On3 Add n0On3 to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

quote:
Originally posted by n0On3
wow!!!

I missed all this replies!!!

How could I!!!???

Thanks DrO, gonna test this



don't worry about it

done a few more bits on it so that the 'help' button will always work as a full button whatever style is passed in and some more bug fixes/changes

also trying to get custom icon setting working for the messagebox as well - thought it might be useful

-daz

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 09-21-2003 11:39 AM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
n0On3
Senior Member

Registered: Jan 2001
From: Barcelona

And where's the update?

I looked in the Archive and couldn't find it.

Quick Link | Report this post to a moderator | IP: Logged

n0On3 is offline Old Post 09-21-2003 08:31 PM
Click Here to See the Profile for n0On3 Click here to Send n0On3 a Private Message Click Here to Email n0On3 Visit n0On3's homepage! Find more posts by n0On3 Add n0On3 to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

quote:
I looked in the Archive and couldn't find it.


latest version is now attached (with readme explaining how to use it that makes sense i hope )

only real feature missing now is the ability to set the icon shown by the messagebox to be a user defined icon (ran out of time last night).

wahtever mode you use now, the button texts will always be altered correctly and the 'help' button will always close the messagebox whatever the style used (wasa glaring issue in the last release)

has anyone tried it with a language other than english yet? i'm interested to see how it works with other languages.

also would the ability to alter the button sizes on the messagebox so that the text passed in will fit correctly be a good to implement?
(noted that NT has small buttons so the example may not appear correctly )

enjoy

-daz

ps will put a copy into the archive soon once i've got the user icon part working

Attachment: msgbox3.zip
This has been downloaded 647 time(s).

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 09-22-2003 12:41 PM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
n0On3
Senior Member

Registered: Jan 2001
From: Barcelona

thanks for posting

I haven't used any other languages than english.

and yes, auto-resize buttons seems nice


thanks for working in this plugin


Note: thanks for writing my name in the text files, can you write 'n0On3' instead of 'n0on3'?

Quick Link | Report this post to a moderator | IP: Logged

n0On3 is offline Old Post 09-23-2003 03:45 AM
Click Here to See the Profile for n0On3 Click here to Send n0On3 a Private Message Click Here to Email n0On3 Visit n0On3's homepage! Find more posts by n0On3 Add n0On3 to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

At last user icon support works!!

Attached is now the latest version including a few typo fixes for the readme file.

@n0On3 - sorry for getting it wrong, it was 2:30am when i was writing that file

note: if using the user icon option and the icon does not exist then a blank space will be seen where the icon goes - likely to happen with the second test messagebox in the example script (at least on NT, i found 2k was fine).

I will setup a archive page for this in a bit and when i get the chance to tonight i will work on the resizing of the text buttons so that the text will always fit (may take a while with other things on at the moment)

enjoy this people

-daz

Attachment: msgbox4.zip
This has been downloaded 565 time(s).

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 09-23-2003 02:21 PM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

quote:
auto-resize buttons seems nice

well it's implemented now so when you set the button text if you want it then the button will be resized to the text (and a bit more either side for a nicer look )
eg
"/but1 /trim install me now"

still a few little issues such as getting the sizing to work correctly when the text is just too big for the button.

also the messagebox will max out at 80% of the screen size (not fully supported yet and may add a little extra when this limit is reached...)

-daz

Attachment: msgbox_beta.zip
This has been downloaded 550 time(s).

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 09-24-2003 02:52 PM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
n0On3
Senior Member

Registered: Jan 2001
From: Barcelona

thanks

I wanted to say that I find the command a bit confusing:

I can pass which styles I want to use(like MB_OKCANCEL) but if I want to use them I have to pass "-1", but if i also pass "/but3 c" then the style is overwritten.

I also don't understand the hwnd. I thought these messageboxes will always be created from the installer, or is this plugin doing something more?

I tried to think a simpler format. Describing the window from up to down:

MessageBox::Show "window title" "icon.dll,3" "window text" 4 "IDYES" "yes to all" "IDNO" "no to all"

I used IDYES for telling that I want a 'yes' style in the first button and IDNO for having a no in the third. And I think that making it always return the number of the button instead of No = 9 is easier to understand.

I also think that if somebody uses a long text for a button, he will always want it resized, so the /trim switch can be avoided.

just some suggestions


PS: maybe with this format you can pass things that can't be done, like this: MessageBox::Show "window title" "" "window text" 2 "IDNO" "IDYES" and you can't have a first button with a 'no' and the second be a 'yes'. If this is the case you can make the script refuse to compile and say that it has to be 'yes' and 'no' instead.

Quick Link | Report this post to a moderator | IP: Logged

n0On3 is offline Old Post 09-24-2003 05:35 PM
Click Here to See the Profile for n0On3 Click here to Send n0On3 a Private Message Click Here to Email n0On3 Visit n0On3's homepage! Find more posts by n0On3 Add n0On3 to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

suggestions are good

thought it was getting a bit confusing too for the parameters (was going to overhaul how they are passed anyway for v1.0).

quote:
I thought these messageboxes will always be created from the installer, or is this plugin doing something more?
when you pass a 0 for the parameter then it will use the installer as the owner. the reason it is in there is basically from the initial development phase of the plugin (since i ported the basics of what i had from another program) and was going to drop it anyway

quote:
I also think that if somebody uses a long text for a button, he will always want it resized, so the /trim switch can be avoided.
was going to drop it too - since that part isn't finished yet i was using the /trim to allow me to test the feature for specific button positions (without hard coding tests into the code) to make sure that the messagebox would resize and move subsequent buttons correctly.
quote:
MessageBox::Show "window title" "icon.dll,3" "window text" 4 "IDYES" "yes to all" "IDNO" "no to all"
nice
i like that idea and it's not to difficult to change the existing code to do it as well. also the "icon.dll,3" is better for the whole icon thing since "0,3" could be used to get the resource from the installer.

about the '-1' thing, the idea was that with it the function will return what the messagebox returns but with the ability if needed to alter the button text if wanted (late night programming that ). so if the forth is 'no' then it will return 9 since that is the button's id.

can understand the confusion about it so i will map the return to 1,2,etc in all cases now (does make it more consistant) and will drop the -1 option.

"IDYES" "yes to all" "IDNO" "no to all" part - i like that idea and it isn't hard to put it in as things are since i can just set internally set the button text to 'yes' when a 'IDYES' is passed for example.

i can see what you're getting at about the IDNO can't be first but i think that if the return value is going to be mapped to the button number then it should not matter which way round the buttons are - just my thought on it.

hope that clarifies a few bits.
thanks for the suggestions n0On3 , always good to have a different view point on things. will get on with this tonight and get a test version uploaded tomorrow.

-daz

ps just had a thought, if doing "IDYES" "yes to all" "IDNO" "no to all" then it's possible to drop the number of buttons specification. instead it can be worked out from the number of button texts passed in

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 09-25-2003 12:51 PM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
n0On3
Senior Member

Registered: Jan 2001
From: Barcelona

Great!

I am very glad you liked my ideas

Quick Link | Report this post to a moderator | IP: Logged

n0On3 is offline Old Post 09-25-2003 03:16 PM
Click Here to See the Profile for n0On3 Click here to Send n0On3 a Private Message Click Here to Email n0On3 Visit n0On3's homepage! Find more posts by n0On3 Add n0On3 to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

latest test version

changed the calling syntax of the function to be simpler and hopefully make more sense

now the number of buttons to show is all based on the number of button strings passed with default button texts used when you pass the defines
e.g.
IDYES => 'Yes' IDCANCEL => 'Cancel' (see the readme for the supported options)

buttons are resized in all cases (more logical) and the resizing is more gradual especially when the text is near to the existing button width.

the handling of long button texts when the messagebox width is exceeded (that's the 80% of the screen limit) is not done yet.
also the MB_DEFBUTTON? style will not work for resized buttons (defaults to the first button but i have the fix worked out for it).

-daz

Attachment: msgbox_b2.zip
This has been downloaded 524 time(s).

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 09-26-2003 12:31 PM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
n0On3
Senior Member

Registered: Jan 2001
From: Barcelona

yes, this plugin works great

I found that I can't use the installer icon when the installer is set to silent:

SilentInstall "Silent"


great plugin, thanks

Quick Link | Report this post to a moderator | IP: Logged

n0On3 is offline Old Post 09-29-2003 02:41 AM
Click Here to See the Profile for n0On3 Click here to Send n0On3 a Private Message Click Here to Email n0On3 Visit n0On3's homepage! Find more posts by n0On3 Add n0On3 to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

quote:
I found that I can't use the installer icon when the installer is set to silent
will have a look at that tonight, thanks for pointing it out (and will have a go at the few other bits left to do).

-daz

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 09-29-2003 10:41 AM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
Joost Verburg
NSIS MUI Dev

Registered: Nov 2001
From:

Can you create an archive page when it's finished?

Quick Link | Report this post to a moderator | IP: Logged

Joost Verburg is offline Old Post 09-29-2003 10:49 AM
Click Here to See the Profile for Joost Verburg Click here to Send Joost Verburg a Private Message Find more posts by Joost Verburg Add Joost Verburg to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

quote:
Can you create an archive page when it's finished?
Will do that once i've got the last few bits fixed (and got the code readable )

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 09-29-2003 11:52 AM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

quote:
I found that I can't use the installer icon when the installer is set to silent
had a check of the code and the icon part works fine in a silent installer.

i did notice that in the example with v0.98 beta, the last messagebox did not have the icon set, instead it has a "" where the icon part goes.

working on the button widths at the moment for the 80% limit being reached. also fixed the default button issue - just needed to prevent a message being sent to the messagebox

should have the new version with the button adjustment fully done by tomorrow i hope

-daz

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 09-30-2003 10:42 AM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
n0On3
Senior Member

Registered: Jan 2001
From: Barcelona

quote:
Originally posted by DrO
[B]had a check of the code and the icon part works fine in a silent installer.



You mean that you could use the icon when silent installer in the messagebox? I used your example and now, not only it's not showed but even crashes

I attach the thingy.



also, what's this "MB_ICONHAND" style? the nsis I use doesn't have it...

Attachment: crash.zip
This has been downloaded 463 time(s).

Quick Link | Report this post to a moderator | IP: Logged

n0On3 is offline Old Post 10-03-2003 10:50 AM
Click Here to See the Profile for n0On3 Click here to Send n0On3 a Private Message Click Here to Email n0On3 Visit n0On3's homepage! Find more posts by n0On3 Add n0On3 to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

what OS are you using?
(checked the example and it is fine on NT4 and 2k)

also is it the last messagebox that is failing?

quote:
messagebox::show MB_TOPMOST|MB_DEFBUTTON2|MB_RIGHT "look at me a title" \
"" \
"and for a messagebox that will show an icon... )$\n" "ah go on if you dare" IDYES IDYES2


with the second line, to get the installer icon it should be "0,103" instead of "" - typo on my part (was trying to get that test version done beofre i left for work)

-daz

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 10-03-2003 11:39 AM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

@n0On3 - if you can, can you let me know what the crash error is please (picture?)

I'll have a look at the code tonight (haven't touched it for a few days) and i'll make sure that any potential parts that could cause a crash are catered for. Will try and get a newer version up for tomorrow which should hopefully fix things for you.

Adding in parameter checks so that you can't do IDYES "blah" IDYES since it's not good having two 'Yes' buttons

quote:
also, what's this "MB_ICONHAND" style? the nsis I use doesn't have it...
magic that is it is just the stop sign icon but using a different name (throw back to Windows 3.x before 95 came along and they altered the defined names that's all, check here)

-daz

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 10-03-2003 03:43 PM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

added a page into the archive for the Customisable MessageBox plugin (thought a proper name would be good for it instead of 'MessageBox with more buttons' )

-daz

[p.s. is it fine to just link to here for the downloads since i haven't anywhere to host files ]

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 10-03-2003 07:10 PM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
n0On3
Senior Member

Registered: Jan 2001
From: Barcelona

quote:
Originally posted by DrO
[B]what OS are you using?
(checked the example and it is fine on NT4 and 2k)

also is it the last messagebox that is failing?

sorry, I left that info. I use win98se. Does the compiled exe work in your 2k?

and is the first messagebox that fails. Strange because it works in another silent installer I made. But in that other it always shows 4 buttons. This is the code:
code:
MessageBox::Show MB_ICONQUESTION "Can't Move, Copy instead?" "" \ `We can't move through different drives.$\nBut we can copy and \ delete if no errors` "Copy && Delete" "Copy" "IDCANCEL"

Attachment: crash.png
This has been downloaded 489 time(s).

Quick Link | Report this post to a moderator | IP: Logged

n0On3 is offline Old Post 10-04-2003 07:03 AM
Click Here to See the Profile for n0On3 Click here to Send n0On3 a Private Message Click Here to Email n0On3 Visit n0On3's homepage! Find more posts by n0On3 Add n0On3 to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Israel

quote:
Originally posted by DrO
[p.s. is it fine to just link to here for the downloads since i haven't anywhere to host files ]


It can be put on the Archive too. Just e-mail the file to an Archive admin and we'll upload it.

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 10-04-2003 12:05 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

give this version a try - have altered the handling of one or two strings internally so hopefully it won't crash (had not fully checked the module handle for a "" situation).

also included two compiled versions (normal and silent) which work on my machine at least

note: long button text handling is still fudged (got to get full limit checking working still)

note 2: just looking at the function call, the "IDCANCEL" should be just IDCANCEL (no "'s around it) if you want the button text to be 'cancel'

@n0On3: will test that later. i tested your file on NT4 and it worked (will check later on my machine under both oses)

@kichik: will pm it once it's working fully

-daz

Attachment: messagebox v0.98 beta 2.zip
This has been downloaded 490 time(s).

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 10-04-2003 01:57 PM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
n0On3
Senior Member

Registered: Jan 2001
From: Barcelona

ok, I won't use "IDCANCEL"


please, can some moderator edit my post and make it not soooooooo wide?


and... doesn't anybody know when this forum decides to create a second page???

Quick Link | Report this post to a moderator | IP: Logged

n0On3 is offline Old Post 10-04-2003 03:32 PM
Click Here to See the Profile for n0On3 Click here to Send n0On3 a Private Message Click Here to Email n0On3 Visit n0On3's homepage! Find more posts by n0On3 Add n0On3 to your buddy list Edit/Delete Message Reply w/Quote
DrO
Moderator

Registered: Sep 2003
From: UK

quote:
Originally posted by n0On3
ok, I won't use "IDCANCEL"
ignore what i said about that, was half asleep at work and not remembering that the "" are stripped before being passed to the plugin
(also it looks neater without the ""s for the predefined texts i think)

tested your file under 98 and 2k - crashed under 98

found the problem (was only related to silent installers!) so new none crashing version is attached

-daz

ps issue is that with the silent installer it does not have a window title and so my code for that was incorrectly handling a "" for the caption (so it was the second messagebox crashing ) - i just can't code at times

Attachment: messagebox v0.98 beta 3.zip
This has been downloaded 4964 time(s).

__________________
My Plugin Site | Current Plugin Releases | Winamp-en-gb Lang Pack [14/03/2009 (Rev #2)]

Quick Link | Report this post to a moderator | IP: Logged

DrO is offline Old Post 10-05-2003 11:51 AM
Click Here to See the Profile for DrO Click here to Send DrO a Private Message Find more posts by DrO Add DrO to your buddy list Edit/Delete Message Reply w/Quote
Afrow UK
Moderator

Registered: Nov 2002
From: Shropshire, England

I currently know nothing about win32 programming; you obviously must know quite a bit!

Good work!!

-Stu

__________________
afrowuk.co.uk

Quick Link | Report this post to a moderator | IP: Logged

Afrow UK is offline Old Post 10-05-2003 12:30 PM
Click Here to See the Profile for Afrow UK Click here to Send Afrow UK a Private Message Click Here to Email Afrow UK Visit Afrow UK's homepage! Find more posts by Afrow UK Add Afrow UK to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 08:47 PM. Post New Thread    Post A Reply
Pages (3): [1] 2 3 »   Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > MessageBox with more buttons
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON