Vcl.Dialogs.MessageDlgPos

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function MessageDlgPos(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint; X, Y: Integer): Integer;
function MessageDlgPos(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint; X, Y: Integer; DefaultButton: TMsgDlgBtn): Integer; overload;

C++

extern DELPHI_PACKAGE int __fastcall MessageDlgPos(const System::UnicodeString Msg, System::Uitypes::TMsgDlgType DlgType, System::Uitypes::TMsgDlgButtons Buttons, int HelpCtx, int X, int Y)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
Vcl.Dialogs.pas
Vcl.Dialogs.hpp
Vcl.Dialogs Vcl.Dialogs

Description

Displays a message dialog box at the specified screen coordinates.

Call MessageDlgPos to bring up a message box at a particular location when you do not need to specify a caption. (If you need to specify the caption as well, use the MessageDlg function.)

Msg is the content of the message that appears.

DlgType indicates the purpose of the dialog. See the Vcl.Dialogs.TMsgDlgType page for a list of possible values.

Buttons indicates what buttons should appear in the message box. Buttons is of type Vcl.Dialogs.TMsgDlgButtons.

HelpCtx specifies the context ID for the help topic that should appear when the user clicks the help button or presses F1 while the dialog is displayed.

X and Y specify the screen coordinates where the dialog should appear. A value of –1 means that the message box can appear anywhere in the specified dimension.

DefaultBtn specifies which button from among those specified by Buttons is the default button for the dialog. If DefaultBtn is mbNo, then there is no default button set. See the Vcl.Dialogs.TMsgDlgType page for a list of possible enumerations.

Note: If the user types CTRL+C in the message box, the text of the message is copied to the clipboard.

See Also

Code Examples