win_msgbox/
cancel_try_again_continue.rs1use super::Options;
2use windows_sys::Win32::UI::WindowsAndMessaging::{
3 IDCONTINUE, IDTRYAGAIN, MB_CANCELTRYCONTINUE, MESSAGEBOX_RESULT, MESSAGEBOX_STYLE,
4};
5
6#[derive(Debug, Eq, PartialEq, Clone, Copy, Hash)]
9pub enum CancelTryAgainContinue {
10 Cancel,
12 TryAgain,
14 Continue,
16}
17
18impl From<MESSAGEBOX_RESULT> for CancelTryAgainContinue {
19 fn from(value: MESSAGEBOX_RESULT) -> Self {
20 match value {
21 IDTRYAGAIN => Self::TryAgain,
22 IDCONTINUE => Self::Continue,
23 _ => Self::Cancel,
24 }
25 }
26}
27
28impl Options for CancelTryAgainContinue {
29 fn flags() -> MESSAGEBOX_STYLE {
30 MB_CANCELTRYCONTINUE
31 }
32}