diff --git a/src/include/86box/language.h b/src/include/86box/language.h index 9bb1d2534..002a0cc33 100644 --- a/src/include/86box/language.h +++ b/src/include/86box/language.h @@ -134,6 +134,8 @@ #define IDS_4117 4117 // "Remember to partition and format..." #define IDS_4118 4118 // "The selected file will be..." #define IDS_4119 4119 // "Unsupported disk image" +#define IDS_4120 4120 // "Overwrite" +#define IDS_4121 4121 // "Cancel" #define IDS_4352 4352 // "MFM/RLL" #define IDS_4353 4353 // "XT IDE" diff --git a/src/win/86Box.rc b/src/win/86Box.rc index b29b08b50..c5dbfde49 100644 --- a/src/win/86Box.rc +++ b/src/win/86Box.rc @@ -1021,6 +1021,8 @@ BEGIN IDS_4117 "Remember to partition and format the newly-created drive." IDS_4118 "The selected file will be overwritten. Are you sure you want to use it?" IDS_4119 "Unsupported disk image" + IDS_4120 "Overwrite" + IDS_4121 "Cancel" IDS_4352 "MFM/RLL" IDS_4353 "XTA" diff --git a/src/win/win_new_floppy.c b/src/win/win_new_floppy.c index 35efa6379..33c83299f 100644 --- a/src/win/win_new_floppy.c +++ b/src/win/win_new_floppy.c @@ -531,6 +531,23 @@ new_floppy_msgbox_header(HWND hwnd, int flags, void *header, void *message) } +static int +new_floppy_msgbox_ex(HWND hwnd, int flags, void *header, void *message, void *btn1, void *btn2, void *btn3) +{ + HWND h; + int i; + + h = hwndMain; + hwndMain = hwnd; + + i = ui_msgbox_ex(flags, header, message, btn1, btn2, btn3); + + hwndMain = h; + + return(i); +} + + #if defined(__amd64__) || defined(__aarch64__) static LRESULT CALLBACK #else @@ -637,7 +654,7 @@ NewFloppyDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) f = _wfopen(wopenfilestring, L"rb"); if (f != NULL) { fclose(f); - if (new_floppy_msgbox_header(hdlg, MBX_QUESTION, (wchar_t *) IDS_4111, (wchar_t *) IDS_4118) != 0) /* yes */ + if (new_floppy_msgbox_ex(hdlg, MBX_QUESTION, (wchar_t *) IDS_4111, (wchar_t *) IDS_4118, (wchar_t *) IDS_4120, (wchar_t *) IDS_4121, NULL) != 0) /* yes */ return FALSE; } SendMessage(h, WM_SETTEXT, 0, (LPARAM) wopenfilestring); diff --git a/src/win/win_settings.c b/src/win/win_settings.c index 0f4a1f548..a908ef64d 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -194,6 +194,23 @@ settings_msgbox_header(int flags, void *header, void *message) } +static int +settings_msgbox_ex(int flags, void *header, void *message, void *btn1, void *btn2, void *btn3) +{ + HWND h; + int i; + + h = hwndMain; + hwndMain = hwndParentDialog; + + i = ui_msgbox_ex(flags, header, message, btn1, btn2, btn3); + + hwndMain = h; + + return(i); +} + + /* This does the initial read of global variables into the temporary ones. */ static void win_settings_init(void) @@ -3043,7 +3060,7 @@ win_settings_hard_disks_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM f = _wfopen(wopenfilestring, L"rb"); if (f != NULL) { fclose(f); - if (settings_msgbox_header(MBX_QUESTION, (wchar_t *) IDS_4111, (wchar_t *) IDS_4118) != 0) /* yes */ + if (settings_msgbox_ex(MBX_QUESTION_YN, (wchar_t *) IDS_4111, (wchar_t *) IDS_4118, (wchar_t *) IDS_4120, (wchar_t *) IDS_4121, NULL) != 0) /* yes */ return FALSE; } }