Skip to main content
A newer version of this page is available. .

dxMessageDlgPos(string,TMsgDlgType,TMsgDlgButtons,Longint,Integer,Integer) Method

Invokes a modal message box dialog at the specified position on the screen.

Declaration

function dxMessageDlgPos(const AMessage: string; ADialogType: TMsgDlgType; AButtons: TMsgDlgButtons; AHelpContext: Longint; X: Integer; Y: Integer): Integer;

Parameters

Name Type Description
AMessage string

Content of the message dialog box.

ADialogType TMsgDlgType

The type of the message dialog box. This type determines the predefined caption, system icon, and sound of the message box.

AButtons TMsgDlgButtons

A set of buttons on the message dialog box form.

AHelpContext Longint

Specifies the context ID for the help topic that a click on the Help button or the F1 keystroke should invoke while the message box is displayed.

X Integer

A horizontal offset (in pixels) of the upper-left form corner from the upper-left screen corner.

Y Integer

A vertical offset (in pixels) of the upper-left form corner from the upper-left screen corner.

Returns

Type Description
Integer

An integer value that indicates the button clicked to close the message box. The dxMessageBox function returns 0 if it fails to invoke a message box. Refer to the list of possible return values below.

Remarks

Call this function to invoke the message dialog box associated with a help topic. The created message dialog box has the mdsMessageDlg style.

Message Dialog Box Example

Return Values

IDOK
A user clicked the OK button to close the message box.
IDCANCEL
A user clicked the Cancel button to close the message box.
IDABORT
A user clicked the Abort button to close the message box.
IDRETRY
A user clicked the Retry button to close the message box.
IDIGNORE
A user clicked the Ignore button to close the message box.
IDYES
A user clicked the Yes button to close the message box.
IDNO
A user clicked the No button to close the message box.
See Also