1 | /***
|
---|
2 | This file belongs to the Gotcha! distribution.
|
---|
3 | Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
|
---|
4 |
|
---|
5 | This program is free software; you can redistribute it and/or modify
|
---|
6 | it under the terms of the GNU General Public License as published by
|
---|
7 | the Free Software Foundation; either version 2 of the License, or
|
---|
8 | (at your option) any later version.
|
---|
9 |
|
---|
10 | This program is distributed in the hope that it will be useful,
|
---|
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
13 | GNU General Public License for more details.
|
---|
14 |
|
---|
15 | You should have received a copy of the GNU General Public License
|
---|
16 | along with this program; if not, write to the Free Software
|
---|
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
18 | ***/
|
---|
19 |
|
---|
20 | #include "gotcha.h"
|
---|
21 |
|
---|
22 | #ifndef _QUIET_
|
---|
23 | MRESULT EXPENTRY AboutWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
24 | {
|
---|
25 |
|
---|
26 | switch (msg) {
|
---|
27 | case WM_INITDLG:{
|
---|
28 |
|
---|
29 | HMQ hmq;
|
---|
30 | BOOL bUniCodeFont = FALSE;
|
---|
31 | CHAR ucFont[FACESIZE];
|
---|
32 | CHAR ucLangStr[300];
|
---|
33 | INT i;
|
---|
34 |
|
---|
35 | if (pset->GetLangID() == RU) {
|
---|
36 | hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
|
---|
37 | WinSetCp(hmq, 866);
|
---|
38 | bUniCodeFont = TRUE;
|
---|
39 | }
|
---|
40 | else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
|
---|
41 | hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
|
---|
42 | WinSetCp(hmq, 852);
|
---|
43 | bUniCodeFont = TRUE;
|
---|
44 | }
|
---|
45 | else {
|
---|
46 | hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
|
---|
47 | WinSetCp(hmq, 850);
|
---|
48 | }
|
---|
49 |
|
---|
50 | if (bUniCodeFont) {
|
---|
51 | strcpy(ucFont, "9.Times New Roman MT 30");
|
---|
52 | WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
|
---|
53 | }
|
---|
54 | for (i = 0; i < WID_ST_END - 400; i++) {
|
---|
55 | WinLoadString(hab, g_hmod, LANG_COPYRIGHT + i, sizeof(ucLangStr), ucLangStr);
|
---|
56 | WinSetDlgItemText(hwnd, WID_ST_COPYRIGHT + i, ucLangStr);
|
---|
57 | }
|
---|
58 | return (MRESULT) TRUE;
|
---|
59 | }
|
---|
60 | case WM_COMMAND:
|
---|
61 | switch (SHORT1FROMMP(mp1)) {
|
---|
62 | case DID_OK:
|
---|
63 | case DID_CANCEL:
|
---|
64 | WinPostMsg(WinQueryWindow(hwnd, QW_OWNER), msg, mp1, mp2);
|
---|
65 | break;
|
---|
66 | default:
|
---|
67 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
68 | }
|
---|
69 | break;
|
---|
70 | default:
|
---|
71 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
72 | }
|
---|
73 | return 0;
|
---|
74 | }
|
---|
75 |
|
---|
76 | VOID AboutBox (HWND hwnd)
|
---|
77 | {
|
---|
78 | WinDlgBox (HWND_DESKTOP, hwnd, AboutWndProc, GETMODULE, ID_DLG_ABOUT, NULL);
|
---|
79 | }
|
---|
80 |
|
---|
81 | #endif
|
---|