mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
Change About box implementation from separate dialog to str resource
passed to MessageBox
This commit is contained in:
parent
b7f35d2958
commit
0bf21a1b5e
3 changed files with 18 additions and 28 deletions
|
@ -2049,6 +2049,15 @@ ceToggleFullScreen( CEAppGlobals* globals )
|
||||||
} /* ceToggleFullScreen */
|
} /* ceToggleFullScreen */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static void
|
||||||
|
doAbout( CEAppGlobals* globals )
|
||||||
|
{
|
||||||
|
wchar_t* buf[1024];
|
||||||
|
LPTSTR lpBuffer = (LPTSTR)buf;
|
||||||
|
(void)LoadString( globals->hInst, (UINT)IDS_ABOUT, lpBuffer, VSIZE(buf) );
|
||||||
|
MessageBox( globals->hWnd, lpBuffer, L"About", MB_OK );
|
||||||
|
}
|
||||||
|
|
||||||
LRESULT CALLBACK
|
LRESULT CALLBACK
|
||||||
WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
@ -2109,8 +2118,7 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
// Parse the menu selections:
|
// Parse the menu selections:
|
||||||
switch (wmId) {
|
switch (wmId) {
|
||||||
case ID_FILE_ABOUT:
|
case ID_FILE_ABOUT:
|
||||||
DialogBoxParam(globals->hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd,
|
doAbout( globals );
|
||||||
(DLGPROC)ceAbout, 0L );
|
|
||||||
break;
|
break;
|
||||||
case ID_GAME_GAMEINFO: {
|
case ID_GAME_GAMEINFO: {
|
||||||
GameInfoState state;
|
GameInfoState state;
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#define IDC_XWORDS4 3
|
#define IDC_XWORDS4 3
|
||||||
#define IDI_XWORDS4 101
|
#define IDI_XWORDS4 101
|
||||||
#define IDM_MENU 102
|
#define IDM_MENU 102
|
||||||
#define IDD_ABOUTBOX 103
|
|
||||||
#define IDD_DIALOG1 104
|
#define IDD_DIALOG1 104
|
||||||
#define IDD_GAMEINFO 104
|
#define IDD_GAMEINFO 104
|
||||||
#define IDD_STRBOX 106
|
#define IDD_STRBOX 106
|
||||||
|
@ -201,6 +200,7 @@
|
||||||
#define IDS_DUMMY 40003
|
#define IDS_DUMMY 40003
|
||||||
#define IDS_CANCEL 40004
|
#define IDS_CANCEL 40004
|
||||||
#define IDS_OK 40005
|
#define IDS_OK 40005
|
||||||
|
#define IDS_ABOUT 40006
|
||||||
|
|
||||||
// Don't use the numbers after 4009: one string needs not to be there
|
// Don't use the numbers after 4009: one string needs not to be there
|
||||||
// to stop the progression in cedict.c
|
// to stop the progression in cedict.c
|
||||||
|
|
|
@ -163,31 +163,7 @@ END
|
||||||
#define REPOS_BUTTON_VPAD 2
|
#define REPOS_BUTTON_VPAD 2
|
||||||
#define REPOS_BUTTON_HPAD 2
|
#define REPOS_BUTTON_HPAD 2
|
||||||
|
|
||||||
|
// ******** IDD_GAMEINFO DIALOG *********
|
||||||
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 129, 95
|
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | DS_CENTER
|
|
||||||
EXSTYLE 0x80000000L
|
|
||||||
CAPTION "About Crosswords"
|
|
||||||
FONT 8, "System"
|
|
||||||
BEGIN
|
|
||||||
ICON IDI_XWORDS4,IDC_STATIC,5,17,20,20
|
|
||||||
/* For some reason, the mingw compiler (win32) doesn't like my
|
|
||||||
string concatenation trick any more. Need to fix or file a bug
|
|
||||||
or something. */
|
|
||||||
#ifdef _WIN32_WCE
|
|
||||||
LTEXT "Crosswords 4.2b1 (rev " SVN_REV ") "\
|
|
||||||
"for PocketPC. Copyright 1998-2008 by "\
|
|
||||||
"Eric House. This software is released under the GNU "\
|
|
||||||
"Public License.\r\r"\
|
|
||||||
"For dictionaries, a manual, or source code go to "\
|
|
||||||
"http://xwords.sf.net or http://eehouse.org/xwords/."
|
|
||||||
#else
|
|
||||||
LTEXT "Crosswords 4.2b1"
|
|
||||||
#endif
|
|
||||||
,
|
|
||||||
IDC_STATIC,29,4,95,101,SS_NOPREFIX
|
|
||||||
END
|
|
||||||
|
|
||||||
#ifdef CEFEATURE_CANSCROLL
|
#ifdef CEFEATURE_CANSCROLL
|
||||||
# define ROW_HEIGHT 10
|
# define ROW_HEIGHT 10
|
||||||
# define ROW_SPACE 12
|
# define ROW_SPACE 12
|
||||||
|
@ -742,6 +718,12 @@ BEGIN
|
||||||
IDS_DUMMY "--"
|
IDS_DUMMY "--"
|
||||||
IDS_CANCEL "Cancel"
|
IDS_CANCEL "Cancel"
|
||||||
IDS_OK "Ok"
|
IDS_OK "Ok"
|
||||||
|
IDS_ABOUT "Crosswords 4.2b1 (rev " SVN_REV ") "\
|
||||||
|
"for PocketPC. Copyright 1998-2008 by "\
|
||||||
|
"Eric House. This software is released under the GNU "\
|
||||||
|
"Public License.\r\r"\
|
||||||
|
"For dictionaries, a manual, or source code go to "\
|
||||||
|
"http://xwords.sf.net or http://eehouse.org/xwords/."
|
||||||
#ifdef _WIN32_WCE
|
#ifdef _WIN32_WCE
|
||||||
IDS_DICTDIRS "\\Program Files\\Crosswords"
|
IDS_DICTDIRS "\\Program Files\\Crosswords"
|
||||||
IDS_DICTDIRS+1 "\\SD Card\\Crosswords"
|
IDS_DICTDIRS+1 "\\SD Card\\Crosswords"
|
||||||
|
|
Loading…
Reference in a new issue