Displaying OkCancel window

Thank you! I just solved this problem. For anyone who encountered the same problem, here’s the detailed solution.

const auto callback = juce::ModalCallbackFunction::create ([this](int result) {
    if (result == 0) {}// result == 0 means you click Cancel
    if (result == 1) {}// result == 1 means you click OK
});

juce::NativeMessageBox::showOkCancelBox(juce::AlertWindow::InfoIcon,
                    "Title", "Message", nullptr, callback);
3 Likes