From: Andrey Semakin and-semakin@ya.ru
Without translations.
Signed-off-by: Andrey Semakin and-semakin@ya.ru Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- programs/winemine/dialog.c | 8 ++++++++ programs/winemine/resource.h | 3 +++ programs/winemine/winemine.rc | 8 +++++--- 3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/programs/winemine/dialog.c b/programs/winemine/dialog.c index 1f55f73e90..27558b1203 100644 --- a/programs/winemine/dialog.c +++ b/programs/winemine/dialog.c @@ -88,6 +88,8 @@ INT_PTR CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara { static BOARD *p_board; unsigned i; + int confirm_msgbox_result; + WCHAR confirm_title[256], confirm_text[256];
switch( uMsg ) { case WM_INITDIALOG: @@ -105,6 +107,12 @@ INT_PTR CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara case WM_COMMAND: switch( LOWORD( wParam ) ) { case IDC_RESET: + LoadStringW( NULL, IDC_CONFIRMTITLE, confirm_title, sizeof(confirm_title)/sizeof(WCHAR) ); + LoadStringW( NULL, IDC_CONFIRMTEXT, confirm_text, sizeof(confirm_text)/sizeof(WCHAR) ); + confirm_msgbox_result = MessageBoxW( NULL, confirm_text, confirm_title, MB_OKCANCEL | MB_DEFBUTTON2 | MB_ICONWARNING ); + if( confirm_msgbox_result != IDOK ) + break; + /* reset best names and times */ ResetResults( p_board );
diff --git a/programs/winemine/resource.h b/programs/winemine/resource.h index 22e4128fc8..7a576a6564 100644 --- a/programs/winemine/resource.h +++ b/programs/winemine/resource.h @@ -48,6 +48,9 @@ #define IDC_EDITMINES 1033
#define IDC_RESET 1041 +#define IDC_CONFIRMTITLE 1042 +#define IDC_CONFIRMTEXT 1043 + #define IDS_APPNAME 1101 #define IDS_NOBODY 1102 #define IDS_ABOUT 1103 diff --git a/programs/winemine/winemine.rc b/programs/winemine/winemine.rc index ddf43db11e..ce1dca740a 100644 --- a/programs/winemine/winemine.rc +++ b/programs/winemine/winemine.rc @@ -26,9 +26,11 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE { - IDS_APPNAME, "WineMine" - IDS_NOBODY, "Nobody" - IDS_ABOUT, "Copyright 2000 Joshua Thielen" + IDS_APPNAME, "WineMine" + IDS_NOBODY, "Nobody" + IDS_ABOUT, "Copyright 2000 Joshua Thielen" + IDC_CONFIRMTITLE, "Reset Results" + IDC_CONFIRMTEXT, "All results will be lost. Are you sure?" }
IDM_WINEMINE MENU