Skip to content

ddablib/msgdlg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Message Dialogue Components

Description

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.

Compatibility

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.

Installation

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.

In addition to the above files you will find the source code of a demo project in the Demo sub-directory.

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.

Demo Program

A demo program that exercises the components is included in the download.

This demo requires Delphi 7 as a minimum.

For more information about the demo see the file README.md in the Demo directory.

Update History

A complete change log is provided in CHANGELOG.md that is included in the download.

License

The Message Dialogue Components are released under the terms of the Mozilla Public License v2.0.

All relevant trademarks are acknowledged.

Bugs and Feature Requests

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.

About the Author

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.