3.46 DM_OpenBox

With this function, a specified messagebox or dialogbox (window with attribute .dialogbox = true) can be opened. The program waits until the user has closed this messagebox or dialogbox.

Note

When using functions that have records as parameters, please refer to the notes in chapter “Handling of String Parameters” and the chapter “Note for Using DM Functions” in manual “C Interface - Basics”.

DM_Boolean DM_OpenBox
(
  DM_ID       objectID,
  DM_ID       parentID,
  DM_Value   *retval,
  DM_Options  options
)

Parameters

-> DM_ID objectID

This parameter specifies the messagebox or dialogbox to be opened.

-> DM_ID parentID

This parameter specifies the window in which the messagebox should appear. The parameter may be ignored. If this parameter is specified, a window or NULL must be specified.

If the window system supports it, the messagebox is displayed centered in the parent window. Otherwise, the position is determined by the window system itself (e.g. screen center).

-> DM_Value *retval

Contains the return value of the respective object after closing the messagebox or dialogbox:

  • For messageboxes the number of the pressed button. There are the following definitions for this:

    • MB_abort
    • MB_cancel
    • MB_ignore
    • MB_no
    • MB_ok
    • MB_retry
    • MB_yes
  • For dialogboxes, the value defined in the closequery() function.

-> DM_Options options

This parameter is currently not used and must therefore be set to 0.

Return Value

The return value indicates whether the messagebox or dialogbox could be opened.

See Also

C function DM_QueryBox

Object messagebox

Built-in function querybox() in manual “Rule Language”