Solitaire patch by Pierre Schweitzer (bug #2275).

svn path=/trunk/; revision=26971
This commit is contained in:
Dmitry Gorbachev 2007-06-02 21:47:06 +00:00
parent d6d5cf7f99
commit 244e1cd74b
15 changed files with 111 additions and 19 deletions

View file

@ -56,6 +56,13 @@ BEGIN
END END
STRINGTABLE
BEGIN
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire by J Brown\n\nCardLib version 1.0."
IDS_SOL_QUIT "Quit the current game?"
END
///// /////
// DESIGNINFO // DESIGNINFO

View file

@ -56,6 +56,13 @@ BEGIN
PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14 PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14
END END
STRINGTABLE
BEGIN
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire by J Brown\n\nCardLib version 1.0."
IDS_SOL_QUIT "Quit the current game?"
END
///// /////
// DESIGNINFO // DESIGNINFO

View file

@ -55,6 +55,14 @@ BEGIN
PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14 PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14
END END
STRINGTABLE
BEGIN
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire by J Brown\n\nCardLib version 1.0."
IDS_SOL_QUIT "Quit the current game?"
END
///// /////
// DESIGNINFO // DESIGNINFO

View file

@ -39,22 +39,31 @@ BEGIN
PUSHBUTTON "Annuler",IDCANCEL,129,24,50,14 PUSHBUTTON "Annuler",IDCANCEL,129,24,50,14
END END
IDD_OPTIONS DIALOG DISCARDABLE 0, 0, 186, 118 IDD_OPTIONS DIALOG DISCARDABLE 0, 0, 186, 118
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Options" CAPTION "Options"
FONT 8, "MS Shell Dlg" FONT 8, "MS Shell Dlg"
BEGIN BEGIN
GROUPBOX "Cards", -1, 7, 7, 65, 40 GROUPBOX "Cartes", -1, 7, 7, 65, 40
AUTORADIOBUTTON "Draw &One", IDC_OPT_DRAWONE, 14, 19, 52, 10, WS_GROUP | WS_TABSTOP AUTORADIOBUTTON "En tirer une", IDC_OPT_DRAWONE, 14, 19, 52, 10, WS_GROUP | WS_TABSTOP
AUTORADIOBUTTON "Draw &Three", IDC_OPT_DRAWTHREE, 14, 32, 52, 10 AUTORADIOBUTTON "En tirer trois", IDC_OPT_DRAWTHREE, 14, 32, 52, 10
AUTOCHECKBOX "&Show Time", IDC_OPT_SHOWTIME, 7 ,51 ,65 ,10, WS_TABSTOP AUTOCHECKBOX "Afficher le temp&s", IDC_OPT_SHOWTIME, 7 ,51 ,65 ,10, WS_TABSTOP
AUTOCHECKBOX "S&tatus bar", IDC_OPT_STATUSBAR, 7, 66, 64, 10, WS_TABSTOP AUTOCHECKBOX "Barre de s&tatus", IDC_OPT_STATUSBAR, 7, 66, 64, 10, WS_TABSTOP
DEFPUSHBUTTON "OK", IDOK, 35, 97, 50, 14 DEFPUSHBUTTON "OK", IDOK, 35, 97, 50, 14
PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14 PUSHBUTTON "Annuler", IDCANCEL, 101, 97, 50, 14
END END
STRINGTABLE
BEGIN
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire par J Brown\n\nCardLib version 1.0."
IDS_SOL_QUIT "Quitter le jeu actuel?"
END
///// /////
// DESIGNINFO // DESIGNINFO
@ -71,7 +80,6 @@ BEGIN
END END
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
///// /////

View file

@ -56,6 +56,14 @@ BEGIN
PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14 PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14
END END
STRINGTABLE
BEGIN
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire by J Brown\n\nCardLib version 1.0."
IDS_SOL_QUIT "Quit the current game?"
END
///// /////
// DESIGNINFO // DESIGNINFO

View file

@ -55,6 +55,14 @@ BEGIN
PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14 PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14
END END
STRINGTABLE
BEGIN
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire by J Brown\n\nCardLib version 1.0."
IDS_SOL_QUIT "Quit the current game?"
END
///// /////
// DESIGNINFO // DESIGNINFO

View file

@ -56,6 +56,14 @@ BEGIN
PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14 PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14
END END
STRINGTABLE
BEGIN
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire by J Brown\n\nCardLib version 1.0."
IDS_SOL_QUIT "Quit the current game?"
END
///// /////
// DESIGNINFO // DESIGNINFO

View file

@ -54,6 +54,14 @@ BEGIN
PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14 PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14
END END
STRINGTABLE
BEGIN
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire by J Brown\n\nCardLib version 1.0."
IDS_SOL_QUIT "Quit the current game?"
END
///// /////
// DESIGNINFO // DESIGNINFO

View file

@ -56,6 +56,14 @@ BEGIN
PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14 PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14
END END
STRINGTABLE
BEGIN
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire by J Brown\n\nCardLib version 1.0."
IDS_SOL_QUIT "Quit the current game?"
END
///// /////
// DESIGNINFO // DESIGNINFO

View file

@ -55,6 +55,14 @@ BEGIN
PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14 PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14
END END
STRINGTABLE
BEGIN
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire by J Brown\n\nCardLib version 1.0."
IDS_SOL_QUIT "Quit the current game?"
END
///// /////
// DESIGNINFO // DESIGNINFO

View file

@ -56,6 +56,14 @@ BEGIN
PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14 PUSHBUTTON "Cancel", IDCANCEL, 101, 97, 50, 14
END END
STRINGTABLE
BEGIN
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire by J Brown\n\nCardLib version 1.0."
IDS_SOL_QUIT "Quit the current game?"
END
///// /////
// DESIGNINFO // DESIGNINFO

View file

@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}} //{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file. // Microsoft Developer Studio generated include file.
// Used by Solitaire.rc // Used by rsrc.rc
// //
#define IDD_DIALOG1 101 #define IDD_DIALOG1 101
#define IDR_MENU1 102 #define IDR_MENU1 102
@ -21,6 +21,10 @@
#define IDC_OPT_SHOWTIME 1203 #define IDC_OPT_SHOWTIME 1203
#define IDC_OPT_STATUSBAR 1204 #define IDC_OPT_STATUSBAR 1204
#define IDS_SOL_NAME 1300
#define IDS_SOL_ABOUT 1301
#define IDS_SOL_QUIT 1302
// Next default values for new objects // Next default values for new objects
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED

View file

@ -1 +0,0 @@
#include "rsrc.rc"

View file

@ -15,7 +15,9 @@ HWND hwndMain;
HWND hwndStatus; HWND hwndStatus;
HINSTANCE hInstance; HINSTANCE hInstance;
TCHAR szAppName[] = _T("Solitaire"); TCHAR szAppName[128];
TCHAR MsgQuit[128];
TCHAR MsgAbout[128];
INT nOptions = 8; INT nOptions = 8;
CardWindow SolWnd; CardWindow SolWnd;
@ -49,6 +51,12 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, PSTR szCmdLine, int iCmdSh
hInstance = hInst; hInstance = hInst;
// Load application title
LoadString(hInst, IDS_SOL_NAME, szAppName, sizeof(szAppName) / sizeof(szAppName[0]));
// Load MsgBox() text here to avoid loading it many times later
LoadString(hInst, IDS_SOL_ABOUT, MsgAbout, sizeof(MsgAbout) / sizeof(MsgAbout[0]));
LoadString(hInst, IDS_SOL_QUIT, MsgQuit, sizeof(MsgQuit) / sizeof(MsgQuit[0]));
//Window class for the main application parent window //Window class for the main application parent window
wndclass.cbSize = sizeof(wndclass); wndclass.cbSize = sizeof(wndclass);
wndclass.style = 0;//CS_HREDRAW | CS_VREDRAW; wndclass.style = 0;//CS_HREDRAW | CS_VREDRAW;
@ -232,7 +240,7 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
return 0; return 0;
case IDM_HELP_ABOUT: case IDM_HELP_ABOUT:
MessageBox(hwnd, _T("Solitaire by J Brown\r\n\r\nCardLib version 1.0."), szAppName, MB_OK|MB_ICONINFORMATION); MessageBox(hwnd, MsgAbout, szAppName, MB_OK|MB_ICONINFORMATION);
return 0; return 0;
case IDM_GAME_EXIT: case IDM_GAME_EXIT:
@ -244,12 +252,7 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
case WM_CLOSE: case WM_CLOSE:
ret = IDOK; ret = MessageBox(hwnd, MsgQuit, szAppName, MB_OKCANCEL|MB_ICONQUESTION);
if(fGameStarted)
{
ret = MessageBox(hwnd, _T("Quit the current game?"), szAppName, MB_OKCANCEL|MB_ICONQUESTION);
}
if(ret == IDOK) if(ret == IDOK)
{ {

View file

@ -1,6 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd"> <!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
<module name="sol" type="win32gui" installbase="system32" installname="solitaire.exe" allowwarnings="true" stdlib="host"> <module name="sol" type="win32gui" installbase="system32" installname="solitaire.exe" unicode="no" allowwarnings="yes" stdlib="host">
<include base="sol">.</include> <include base="sol">.</include>
<include base="sol">cardlib</include> <include base="sol">cardlib</include>
<linkerflag>-lstdc++</linkerflag> <linkerflag>-lstdc++</linkerflag>
@ -31,5 +31,5 @@
<file>cardwindow.cpp</file> <file>cardwindow.cpp</file>
<file>dropzone.cpp</file> <file>dropzone.cpp</file>
</directory> </directory>
<file>sol.rc</file> <file>rsrc.rc</file>
</module> </module>