diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/messagedialog.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/messagedialog.inc b/src/gui/messagedialog.inc index 5a6abfe8..26c5ce4f 100644 --- a/src/gui/messagedialog.inc +++ b/src/gui/messagedialog.inc @@ -44,6 +44,7 @@ type procedure PrepareButtons; protected procedure SetWindowTitle(const ATitle: string); override; + procedure HandleClose; override; procedure HandlePaint; override; procedure HandleShow; override; procedure HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); override; @@ -243,6 +244,13 @@ begin inherited SetWindowTitle(ATitle); end; +procedure TfpgMessageDialog.HandleClose; +begin + if ModalResult = mrNone then // Form was close via the X (window frame) button + ModalResult := mrCancel; + inherited HandleClose; +end; + procedure TfpgMessageDialog.HandlePaint; var logo: TfpgImage; |