[Lazarus] Inconsistent result from MessageDlg

Bart bartjunk64 at gmail.com
Fri Aug 19 15:27:51 CEST 2011


On 8/19/11, Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:
> Bart schrieb:
>
> IMO it's perfectly sufficient to also map Close to the Cancel button,
> and to disallow Close when no button has Cancel=True.

?

You won't be able to do this when using TaskDialogIndirect(), it's
just a Windows modal dialog form, and clicking on the "Close"
border-icon will close it no matter what we think is convenient...

> This will leave it
> up to the designer, to specify the intended behaviour and results of the
> dialog. Adding more actions and implicit return values, than specified
> by the designer, can cause a misinterpretation of these unexpected
> results, what is highly undesireable.


Well, this is sort of my point too.

If we specify [mbNo,mbYes,mbAbort] I would think it would be logical
to only have mrNo, mrYes and mrAbort as possible returnvalues.

Our implementation of the Win Vista dialog behaves like that, the others do not.

It would be pretty easy to make all MessageDlgs behave like that, but
I'ld like to hear the opinions of Lazarus devels about that.

Also there is the Delphi compatibility issue (cannot test that, my
Delphi is much to old).

Bart




More information about the Lazarus mailing list