[Lazarus] TTaskDialog - correct ModalResult for "Close"?
Bart
bartjunk64 at gmail.com
Wed Sep 11 13:41:23 CEST 2019
On Wed, Sep 11, 2019 at 9:46 AM Alexander Hofmann via lazarus
<lazarus at lists.lazarus-ide.org> wrote:
> I am currently wondering how to interpret the ModalResult of TTaskDialog if the Button "Close" was clicked. "Close" returns "mrAll" in windows and "mrAbort" in Linux (GTK2) - is that intended? I somehow expected mrClose. In the code of TTaskDialog, for ButtonIDs < 100, the ModalResult is directly translated from the ButtonID, so maybe it is intended? (taskdialog.inc, Lines 98 and following:)
Pressing Alt+F4 border icon gives mrAll, it should give mrCancel
(pnButton=IDCANCEL according to
https://docs.microsoft.com/en-us/windows/win32/api/commctrl/nf-commctrl-taskdialog).
Pressing a button called Close should give mrClose IMO.
The other CommonButtons modalresults seem fine.
Tested on Win10.
--
Bart
More information about the lazarus
mailing list