Index: reactos/base/applications/games/solitaire/resource.h =================================================================== --- reactos/base/applications/games/solitaire/resource.h (revision 75147) +++ reactos/base/applications/games/solitaire/resource.h (working copy) @@ -13,6 +13,7 @@ #define IDM_GAME_EXIT 1004 #define IDM_HELP_CONTENTS 1005 #define IDM_HELP_ABOUT 1006 +#define IDM_GAME_OVER 1007 /* Dialogs */ #define IDD_OPTIONS 1200 Index: reactos/base/applications/games/solitaire/solgame.cpp =================================================================== --- reactos/base/applications/games/solitaire/solgame.cpp (revision 75147) +++ reactos/base/applications/games/solitaire/solgame.cpp (working copy) @@ -1,4 +1,5 @@ #include "solitaire.h" +#include "resource.h" #if 1 #define TRACE(s) @@ -357,30 +358,7 @@ KillTimer(hwndMain, IDT_PLAYTIMER); PlayTimer = 0; - if ((dwOptions & OPTION_SHOW_TIME) && (GetScoreMode() == SCORE_STD)) - { - lScore = lScore + (700000 / dwTime); - } - - UpdateStatusBar(); - - MessageBox(SolWnd, MsgWin, szAppName, MB_OK | MB_ICONINFORMATION); - - for(int i = 0; i < 4; i++) - { - pSuitStack[i]->Flash(11, 100); - } - - if( IDYES == MessageBox(SolWnd, MsgDeal, szAppName, MB_YESNO | MB_ICONQUESTION) ) - { - NewGame(); - } - else - { - SolWnd.EmptyStacks(); - - fGameStarted = false; - } + PostMessage(hwndMain, WM_COMMAND, IDM_GAME_OVER, 0); } TRACE("EXIT SuitStackAddProc()\n"); Index: reactos/base/applications/games/solitaire/solitaire.cpp =================================================================== --- reactos/base/applications/games/solitaire/solitaire.cpp (revision 75147) +++ reactos/base/applications/games/solitaire/solitaire.cpp (working copy) @@ -591,6 +591,34 @@ } } +void GameOver() +{ + if ((dwOptions & OPTION_SHOW_TIME) && (GetScoreMode() == SCORE_STD)) + { + lScore = lScore + (700000 / dwTime); + } + + UpdateStatusBar(); + + MessageBox(SolWnd, MsgWin, szAppName, MB_OK | MB_ICONINFORMATION); + + for(int i = 0; i < 4; i++) + { + pSuitStack[i]->Flash(11, 100); + } + + if (IDYES == MessageBox(SolWnd, MsgDeal, szAppName, MB_YESNO | MB_ICONQUESTION)) + { + NewGame(); + } + else + { + SolWnd.EmptyStacks(); + + fGameStarted = false; + } +} + //----------------------------------------------------------------------------- LRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) { @@ -719,6 +747,10 @@ case IDM_GAME_EXIT: PostMessage(hwnd, WM_CLOSE, 0, 0); return 0; + + case IDM_GAME_OVER: + GameOver(); + return 0; } return 0;