4 * Copyright 2000 Joshua Thielen
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 BOOL CALLBACK
CustomDlgProc( HWND hDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)
29 static BOARD
*p_board
;
33 p_board
= (BOARD
*) lParam
;
34 SetDlgItemInt( hDlg
, IDC_EDITROWS
, p_board
->rows
, FALSE
);
35 SetDlgItemInt( hDlg
, IDC_EDITCOLS
, p_board
->cols
, FALSE
);
36 SetDlgItemInt( hDlg
, IDC_EDITMINES
, p_board
->mines
, FALSE
);
40 switch( LOWORD( wParam
) ) {
42 p_board
->rows
= GetDlgItemInt( hDlg
, IDC_EDITROWS
, &IsRet
, FALSE
);
43 p_board
->cols
= GetDlgItemInt( hDlg
, IDC_EDITCOLS
, &IsRet
, FALSE
);
44 p_board
->mines
= GetDlgItemInt( hDlg
, IDC_EDITMINES
, &IsRet
, FALSE
);
45 CheckLevel( p_board
);
58 BOOL CALLBACK
CongratsDlgProc( HWND hDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)
60 static BOARD
*p_board
;
64 p_board
= (BOARD
*) lParam
;
65 SetDlgItemText( hDlg
, IDC_EDITNAME
,
66 p_board
->best_name
[p_board
->difficulty
] );
70 switch( LOWORD( wParam
) ) {
72 GetDlgItemText( hDlg
, IDC_EDITNAME
,
73 p_board
->best_name
[p_board
->difficulty
],
74 sizeof( p_board
->best_name
[p_board
->difficulty
] ) );
87 BOOL CALLBACK
TimesDlgProc( HWND hDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)
89 static BOARD
*p_board
;
94 p_board
= (BOARD
*) lParam
;
97 for( i
= 0; i
< 3; i
++ )
98 SetDlgItemText( hDlg
, (IDC_NAME1
) + i
, p_board
->best_name
[i
] );
101 for( i
= 0; i
< 3; i
++ )
102 SetDlgItemInt( hDlg
, (IDC_TIME1
) + i
, p_board
->best_time
[i
], FALSE
);
106 switch( LOWORD( wParam
) ) {
109 EndDialog( hDlg
, 0 );
117 BOOL CALLBACK
AboutDlgProc( HWND hDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)
124 switch( LOWORD( wParam
) ) {
127 EndDialog( hDlg
, 0 );