Function native_windows_gui::message[][src]

pub fn message<'a>(params: &MessageParams<'_>) -> MessageChoice
Expand description

Create an application wide message box. It is recommended to use modal_message because it locks the window that creates the message box. This method may be deprecated in the future

Parameters:

  • params: A MessageParams structure that defines how the message box should look
use native_windows_gui as nwg;
fn test_message() {
    let p = nwg::MessageParams {
        title: "Hey",
        content: "Cats are cute",
        buttons: nwg::MessageButtons::Ok,
        icons: nwg::MessageIcons::Warning
    };

    assert!(nwg::message(&p) == nwg::MessageChoice::Ok)
}