Function win_msgbox::error
source · pub fn error<T>(text: impl Into<PCWSTR>) -> MessageBox<T>Expand description
Creates a new message box where its icon is set to Error.
Examples found in repository?
examples/options.rs (line 8)
7 8 9 10 11 12 13 14 15 16 17 18 19
fn main() -> Result<()> {
let response = win_msgbox::error::<CancelTryAgainContinue>(w!("Couldn't download resource"))
.title(w!("Download Error"))
.show()?;
match response {
Cancel => println!("Cancelling downlaod..."),
TryAgain => println!("Attempting redownload..."),
Continue => println!("Skipping resource"),
}
Ok(())
}