This unit implements two customisable message dialogue box components. They are:
- TPJWinMsgDlg - This component wraps the Windows MessageBoxIndirect API call and displays a message box based on that provided by Windows. It will be suitable for most purposes and has the lighter footprint.
- TPJVCLMsgDlg - This component uses the Delphi VCL CreateMessageDialog function to create a form based message box. (CreateMessageDialog is used by the standard Delphi MessageDlgXXX functions). The component provides more flexibility than either the Delphi functions or TPJWinMsgDlg. It should be used when it is necessary to display buttons or combinations of buttons that are not supported by the Windows API message box or when a finer degree of control over the appearance and behaviour of the message box is required. TPJVCLMsgDlg supports all the features of TPJWinMsgDlg and extends them. The dialogue box component's form can be customised by handling the OnShow and OnHide events.
For full details please see the online documentation.
The components have been tested with the 32-bit Windows compiler of Delphi 7 and Delphi 2006 to XE4 and the the 64-bit Windows compiler of Delphi XE2 to XE4. They are believed to compile with any version of Delphi from Delphi 4 onwards but this has not been tested.
The unit has dependencies on the VCL and therefore cannot be used with the FireMonkey framework or with non-Windows targets.
The Message Dialogue Components and their associated files are supplied in a zip file. Before installing you need to extract all the files from the zip file, preserving the directory structure. The following files will be extracted:
PJMessageDialog.pas
– component source code.PJMessageDialog.dcr
– component palette glyphs.README.md
– this file.CHANGELOG.md
– project change log.MPL-2.txt
– the Mozilla Public License v2.0.Documentation.url
– short-cut to the components' online documentation.
You can now install the components into the Delphi IDE. To do this, the files PJMessageDialog.pas
and PJMessageDialog.dcr
should be added to a design time package. If you need help doing this see here.
A complete change log is provided in CHANGELOG.md
that is included in the download.
The Message Dialogue Components are released under the terms of the Mozilla Public License v2.0.
All relevant trademarks are acknowledged.
Bugs can be reported or new features requested via the project's Issue Tracker. A GitHub account is required.
Please check if an issue has already been created for a similar report or request. If so then please add a comment containing as much information as you can to the existing issue, or if you've nothing to add, just add a 👍 (:+1:
) comment. If there is no suitable existing issue then please add a new issue and give as much information as possible.
I'm Peter Johnson – a hobbyist programmer living in Ceredigion in West Wales, UK, writing mainly in Delphi. My programs and other library code are available from: https://delphidabbler.com/.
This document is copyright © 2005-2022, P D Johnson.