nmpShowDialog (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

MX2i pro, CX1 pro/flex/warp, SX1, MX2 turbo, NX-200, NX-400, NX-900, LX2

Firmware version:

2.80 / 1.00.00

Nav. API level:

2


This function will show a dialog with a number of buttons on the NMP. It can be used as a supplement to navMessageSend, as these dialogs are not saved and are shown immediately.

The response is returned in nmpDialogClickReceive.

 

Input:

type : SINT

Determines the type of dialog and buttons to show.

0

- OK

1

- OK, Cancel

2

- Abort, Retry, Ignore

3

- Yes, No, Cancel

4

- Yes, No

5

- Retry, Cancel

 

caption : STRING

The text to show at the top of the dialog. (Max. 39 characters)

 

message : STRING

The text to show in the dialog. (Max. 199 characters)

 

 

Returns: INT

0

- Success.

-1

- Navigation interface is not opened.

-2

- Error communicating with navigation device.

-4

- A dialog is already shown. Close the dialog with nmpRemoveDialog and try again.

-8

- Caption or message too long or buttons out of range.

-11

- This is not supported by the device (e.g. the device is not an NMP device).

-12

- Navigation interface is busy.

 

Declaration:

FUNCTION nmpShowDialog : INT;
VAR_INPUT
  type   : SINT;
  caption : STRING;
  message : STRING;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
BEGIN
  ...
  //Show dialog
  nmpShowDialog(type := 4, caption := "Drive?", message := "Do you want to drive?");
  ...
END;
END_PROGRAM;