我想找...

搜尋

分享

目錄

86HMI::showMessageBox()

[General Functions]

描述

Display the message window.
Displays the (title) text in the message window and, depending on the number of quotes, determines how many buttons are displayed, returning the number of the button when it is pressed. It is a blocking function in the main loop, but when it is called in a helper task, it continues directly and always returns -1.

語法

int showMessageBox(char* title, char* btn0 = "OK", char* btn1 = NULL, char* btn2 = NULL);

參數

  • [in] title
    Title.
  • [in] btn0
    Button 0.
  • [in] btn1
    Button 1.
  • [in] btn2
    Button 2.

Return

Return the pressed button of the message box.

範例

#include "myhmi.h"

void setup() {
  Hmi.begin();
  // put your setup code here, to run once:
}

void loop() {
  Hmi.showMessageBox("My Text", "OK", "No", "Yes");
  // ...
}

Please see the 86HMI 編輯器使用手冊 for more instructions on 86HMI widgets and API usage.

返回頂端