Page 1 of 1

Posted: Thu Jan 09, 2003 10:04 am
by BackupUser
Restored from previous forum. Originally posted by talun.

Hi all,
I've two newbie questions related to the flags of MessageRequester

1) The help file reports that the the Flags of the MessageRequester can be:

#PB_MessageRequester_YesNo
#PB_MessageRequester_YesNoCancel
#PB_MessageRequester_Ok

However some of the example files uses other (WINAPI) flags for istance #MB_ICONERROR.
Maybe should be useful to add this chance to the Help file.


2) By trial seems that the result of the buttons of the MessageRequester is:

1: OK
2: Cancel
6: Yes
7: No

It's wrong? (I was not able to find this information in the help file).

Thanks to all

Sergio

Posted: Thu Jan 09, 2003 10:30 am
by BackupUser
Restored from previous forum. Originally posted by waffle.

your answers are in the win32.hlp file for the windows messagebox function.

Posted: Thu Jan 09, 2003 10:49 am
by BackupUser
Restored from previous forum. Originally posted by Fangbeast.
Originally posted by talun

Hi all,
I've two newbie questions related to the flags of MessageRequester

1) The help file reports that the the Flags of the MessageRequester can be:

#PB_MessageRequester_YesNo
#PB_MessageRequester_YesNoCancel
#PB_MessageRequester_Ok

However some of the example files uses other (WINAPI) flags for istance #MB_ICONERROR.
Maybe should be useful to add this chance to the Help file.


2) By trial seems that the result of the buttons of the MessageRequester is:

1: OK
2: Cancel
6: Yes
7: No

It's wrong? (I was not able to find this information in the help file).

Thanks to all

Sergio
Talun, you are correct, those are the correct values. I worked those out 8 months ago when the documents didn't have them in and they still don't. There is still a lot of PureBasic flags/information missing from the help and API stuff in the examples when they should not be. Confuses beginners even more.

Thank goodness we can get values in variables returned so we can check what they are :):)



Fangles woz ear orright den?

Posted: Fri Jan 10, 2003 10:00 pm
by BackupUser
Restored from previous forum. Originally posted by redacid.

BTW: isn´t it possible to get a "custom-made-Requester"? On Amiga with AmiBlitz you can get a requester with your own buttontext. So instead of "Yes/No" you could name it "Right/Wrong" or something else. It´s even possible to get a requester with 10 Buttons or more.

Is this possible with PureBasic/Windows?

regards,
Redacid
---
Viva Los Tioz!
registered user of PB3.50 on WinXP SP1

Posted: Fri Jan 10, 2003 11:54 pm
by BackupUser
Restored from previous forum. Originally posted by tinman.
Originally posted by redacid

Is this possible with PureBasic/Windows?
Probably, but the default under Windows is to use a numeric value for the buttons that are on the requester, so you cannot easily change the text using a standard MessageBox_() call

--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)

Posted: Sat Jan 11, 2003 1:11 am
by BackupUser
Restored from previous forum. Originally posted by Fangbeast.
Originally posted by tinman
Originally posted by redacid

Is this possible with PureBasic/Windows?
Probably, but the default under Windows is to use a numeric value for the buttons that are on the requester, so you cannot easily change the text using a standard MessageBox_() call

--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
Didn't PB or someone else recently make a custom requester?? I seem to remember something about it a few months ago... Might be worth checking the forum :):)

Fangles woz ear orright den?

Posted: Sat Jan 11, 2003 1:20 am
by BackupUser
Restored from previous forum. Originally posted by PB.

> Didn't PB or someone else recently make a custom requester??

It was InputBox() to replace InputRequester(); not a MessageBox.

Anyway, here is a VB example of replacing a standard MessageBox's
buttons with your own text, but it's probably not worth all the
hassle, and probably much easier to just write your own:

http://www.mvps.org/vbnet/index.html?co ... oxhook.htm

Posted: Sat Jan 11, 2003 12:19 pm
by BackupUser
Restored from previous forum. Originally posted by Andre.

To provide some more stuff about message requesters,
here are the possible flags (number based, can be changed to WinAPI equivalents, so don't flame me :)):

Code: Select all

Flag	PureBasic-Constant                 Button(s) shown
0       #PB_MessageRequester_Ok            „OK“
1                                          „OK“ and „Cancel“
2                                          „Cancel“, „Resume“ and „Ignore“
3       #PB_MessageRequester_YesNoCancel   „Yes“, „No“ and „Cancel“
4       #PB_MessageRequester_YesNo         „Yes“ and „No“
5                                          „Resume“ and „Cacnel“
6                                          „Cancel“, „Resume“ and „Continue“
And here the possible return values:

Code: Select all

Flag  Button1  ReturnValue  Button2  ReturnValue  Button3  ReturnValue
0       OK          1
1       OK          1       Cancel         2
2     Cancel        2       Resume         4      Ignore         5
3      Yes          6         No           7      Cancel         2
4      Yes          6         No           7
5     Resume        4       Cancel         2
6     Cancel        2       Resume        10      Continue      11

Flag = used flag value when calling the MessageRequester
Regards
André

*** German PureBasic Support ***

Posted: Mon Jan 13, 2003 8:33 am
by BackupUser
Restored from previous forum. Originally posted by talun.

Many to all for the replies. Thanks also to Danilo for the exhaustive list about MesageRequester flags reported in viewtopic.php?t=4765

bye
Sergio