vcl-dxmessagedialog-dot-dxshowmessage-x28-fd2b07ff-x29.md
Opens a generic message dialog box with an OK button.
procedure dxShowMessage(const AMessage: string; const AHyperlinkClickProc: TdxMessageDialogHyperlinkClickDelegate = nil; const AShowHyperlinkHintProc: TdxMessageDialogShowHyperlinkHintDelegate = nil);
| Name | Type | Description |
|---|---|---|
| AMessage | string |
Message dialog box content. The AMessage parameter value initializes the created form’s Message property.
The AMessage parameter supports a set of BBCode-inspired tags that allow you to format message box content.
| | AHyperlinkClickProc | TdxMessageDialogHyperlinkClickDelegate |
Optional. Specifies a procedure that handles a click on a hyperlink within the displayed message. The AHyperlinkClickProc parameter value initializes the HyperlinkClickProc property of the created message dialog box form.
You can define a click handler procedure to identify the clicked hyperlink and prevent certain links from being activated.
Tip
Refer to the TdxMessageDialogHyperlinkClickDelegate procedural type description for detailed information and a code example.
| | AShowHyperlinkHintProc | TdxMessageDialogShowHyperlinkHintDelegate |
Optional. Specifies a procedure that handles a hyperlink hint display event. The AShowHyperlinkHintProc parameter value initializes the ShowHyperlinkHintProc property of the created message dialog box form.
You can define a hyperlink hint handler procedure to change the predefined hint message (the hyperlink target URI) depending on certain conditions in your application.
Tip
Refer to the TdxMessageDialogShowHyperlinkHintDelegate procedural type description for detailed information and a code example.
|
Call the dxShowMessage procedure to open a generic message dialog box without a system icon. The created message dialog box uses the application name as a title.
The code example in this section displays a generic message dialog with a formatted message and a single OK button. The message dialog has no icon or sound, and uses the Application.Title value as the title.
uses
dxMessageDialog, // Declares the dxShowMessage method
Winapi.Windows; // Declares WinAPI constants
// ...
procedure TMyForm.DemonstrateDxShowMessage1();
var
AHelpURL, AMessage, ATitleURL: string;
begin
// Define a formatted message with hyperlinks (using the BBCode-inspired markup)
AHelpURL := 'https://docs.devexpress.com/VCL/dxMessageDialog.dxShowMessage(FD2B07FF)';
ATitleURL := 'https://docwiki.embarcadero.com/Libraries/en/Vcl.Forms.TApplication.Title';
AMessage :=
'[URL=' + AHelpURL + ']dxShowMessage[/URL] displays a generic message dialog box ' +
'with a formatted message ([B]AMessage[/B]) and an [B]OK[/B] button.' +
sLineBreak + sLineBreak + 'The message box has no icon and uses ' +
'[URL=' + ATitleURL + ']Application.Title[/URL] as a title.';
dxShowMessage(AMessage); // Displays a generic message dialog box
end;
#include "dxMessageDialog.hpp" // Declares the dxShowMessage method
#include <Winapi.Windows.hpp> // Declares WinAPI constants
// Add the following linker directive to the corresponding CPP source file:
#pragma link "dxMessageDialog" // Required to use dxMessageDialog.hpp declarations
// ...
void __fastcall TMyForm::DemonstrateDxShowMessage1()
{
UnicodeString AMessage, AHelpURL, ATitleURL;
// Define a formatted message with hyperlinks (using the BBCode-inspired markup)
AHelpURL = "https://docs.devexpress.com/VCL/dxMessageDialog.dxShowMessage(FD2B07FF)";
ATitleURL = "https://docwiki.embarcadero.com/Libraries/en/Vcl.Forms.TApplication.Title";
AMessage =
"[URL=" + AHelpURL + "]dxShowMessage[/URL] displays a generic message dialog box " +
"with a formatted message ([B]AMessage[/B]) and an [B]OK[/B] button." +
sLineBreak + sLineBreak + "The message box has no icon and uses " +
"[URL=" + ATitleURL + "]Application.Title[/URL] as a title.";
dxShowMessage(AMessage); // Displays a generic message dialog box
}
See Also
TdxMessageDialogForm.Create Constructor