2009-7-8 17:56
pazvante
Bug in MessageBox Visual designer and C++ Builder
The code generated by the [b]MessageBox Visual designer[/b] for [b]MessageDlg[/b] and [b]C++ Builder[/b] is sometimes incorrect.
For example instead of
MessageDlg("text", mtConfirmation, [mbOK], 0);
it should be
MessageDlg("text", mtConfirmation, TMsgDlgButtons() << mbOK, 0);
The same for
MessageDlg("text", mtConfirmation, [mbYes, mbNo], 0);
MessageDlg("text", mtConfirmation, [mbRetry, mbCancel], 0);
it should be
MessageDlg("text", mtConfirmation, TMsgDlgButtons() << mbYes << mbNo, 0);
MessageDlg("text", mtConfirmation, TMsgDlgButtons() << mbRetry << mbCancel, 0);
Tested with CnWizards_0.9.2.522 and BCB 6.0.
BTW, thank you for a great addon!
[[i] Last edited by pazvante at 2009-7-8 17:58 [/i]]
2009-7-8 21:40
pazvante
Thanks for the quick reply!
Tested build 525 and it works.
One note though.
There are some [b]#defines[/b] in Dialogs:[table=50%][tr][td][b]Constant[/b][/td][td][b]Meaning[/b][/td][/tr][tr][td]mbYesNoCancel[/td][td]mbYes, mbNo, and mbCancel
[/td][/tr][tr][td]mbYesNoAllCancel[/td][td]mbYes, mbYesToAll, mbNo, mbNoToAll, and mbCancel[/td][/tr][tr][td]mbOKCancel[/td][td]mbOK and mbCancel[/td][/tr][tr][td]mbAbortRetryIgnore[/td][td]mbAbort, mbRetry, and mbIgnore[/td][/tr][tr][td]mbAbortIgnore[/td][td]mbAbort, mbIgnore[/td][/tr][/table]that can be used instead (like the previous version did)
So
MessageDlg("text", mtConfirmation, TMsgDlgButtons() << mbAbort << mbRetry << mbIgnore, 0);
becomes
MessageDlg("text", mtConfirmation, mbAbortRetryIgnore, 0);
The only messages that failed were the ones (3) mentioned by me in the 1st post. Everything else worked fine.
You can leave it like it is now or you can change to use [b]TMsgDlgButtons()[/b] only where absolutely needed (like [b]GExperts[/b] does).
[[i] Last edited by pazvante at 2009-7-8 21:43 [/i]]