This is a bit complex Problem, so read only, if you've enough time and fun!

First have a look on this code
Code: Select all
OpenWindow(0,300,300,300,300,#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget,"Hallo")
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_CloseWindow
aw = MessageRequester("Info","Do you really want to close the windows?",0) ; <-- The last value set the Option (COLUMN 1)
If aw = 1 ; <-- The possible value(s) set the event (COLUMN 2)
CloseWindow(0)
End
EndIf
EndSelect
ForEver
Options (COLUMNE 1)____________________Buttons-Event (COLUMNE 2)
0 = Ok_____________________________________1
1 = OK Cancel_______________________________1 2
2 = Cancel Retry Ignore_______________________3 4 5
3 = Yes No Cancel____________________________6 7 2
4 = Yes No__________________________________6 7
5 = Retry Cancel_____________________________4 2
6 = Cancel Retry Continue_____________________2 10 11
Do you understand the table? Here's a small explanation if you don't:
For example, we want a MessageRequester with Yes No - Buttons, we can write in Options the number 4 (the same like #PB_MessageRequester_YesNo). So we have two Buttons. The Button "Yes" have the value 6 and the Button "No" the value 7, how you can see in the table.
There are two Problems for me:
1) The "Yes","No","Ok" and "Ignore"-Buttons have always the same value (6,7,1,5) - thats defenitely Ok!
In Option (COLUMN 1) 2 and 5 the Cancel Button has the same Value (2) but in Option 3 you have to write value 3 for the Cancel Button - also another value for the same button!
The Same Problem has the Retry Button - in Option 2 and 5 its contains the value 4, but in Option 6 it needs the value 10 for call?!?!
It's an intention or a bug?!
Why it so and not always the same number for the same button? So you can introduce even constanst for the Button-event.
2) In the (German) Helpfile there are only listen three of the six (see COLUMN 1) options. Where are the 3 other? Why the 3 other options haven't constants?
I hope you understand the problem - I know, this English text is very hard readable...
My suggestion:
Add the other MessageRequester's like:
#PB_MessageRequester_OkCancel
#PB_MessageRequester_CancelRetryContinue
[...]
Give every button (Column 2) the same number and maybe a constant
e.g.
1 = OK = #PB_Event_Ok (or PB_Button_Ok or ....)
2 = Cancel = #PB_Event_Cancel
3 = Ignore = [...]
4 = Retry
5 = Continue
6 = Yes
7 = No
PUH I finished
Nice Week!