win_msgbox/
retry_cancel.rs1use super::Options;
2use windows_sys::Win32::UI::WindowsAndMessaging::{
3 IDRETRY, MB_RETRYCANCEL, MESSAGEBOX_RESULT, MESSAGEBOX_STYLE,
4};
5
6#[derive(Debug, Eq, PartialEq, Clone, Copy, Hash)]
8pub enum RetryCancel {
9 Retry,
11 Cancel,
13}
14
15impl From<MESSAGEBOX_RESULT> for RetryCancel {
16 fn from(value: MESSAGEBOX_RESULT) -> Self {
17 match value {
18 IDRETRY => Self::Retry,
19 _ => Self::Cancel,
20 }
21 }
22}
23
24impl Options for RetryCancel {
25 fn flags() -> MESSAGEBOX_STYLE {
26 MB_RETRYCANCEL
27 }
28}