Commit 020facea authored by Alexandre Julliard's avatar Alexandre Julliard

winemine: Convert to Unicode.

parent be917909
MODULE = winemine.exe MODULE = winemine.exe
APPMODE = -mwindows APPMODE = -mwindows -municode
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
IMPORTS = user32 gdi32 advapi32 IMPORTS = user32 gdi32 advapi32
DELAYIMPORTS = shell32 DELAYIMPORTS = shell32
......
...@@ -63,16 +63,15 @@ INT_PTR CALLBACK CongratsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lP ...@@ -63,16 +63,15 @@ INT_PTR CALLBACK CongratsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lP
switch( uMsg ) { switch( uMsg ) {
case WM_INITDIALOG: case WM_INITDIALOG:
p_board = (BOARD*) lParam; p_board = (BOARD*) lParam;
SetDlgItemText( hDlg, IDC_EDITNAME, SetDlgItemTextW( hDlg, IDC_EDITNAME, p_board->best_name[p_board->difficulty] );
p_board->best_name[p_board->difficulty] );
return TRUE; return TRUE;
case WM_COMMAND: case WM_COMMAND:
switch( LOWORD( wParam ) ) { switch( LOWORD( wParam ) ) {
case IDOK: case IDOK:
GetDlgItemText( hDlg, IDC_EDITNAME, GetDlgItemTextW( hDlg, IDC_EDITNAME,
p_board->best_name[p_board->difficulty], p_board->best_name[p_board->difficulty],
sizeof( p_board->best_name[p_board->difficulty] ) ); sizeof( p_board->best_name[p_board->difficulty] ) / sizeof(WCHAR) );
EndDialog( hDlg, 0 ); EndDialog( hDlg, 0 );
return TRUE; return TRUE;
...@@ -96,7 +95,7 @@ INT_PTR CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara ...@@ -96,7 +95,7 @@ INT_PTR CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
/* set best names */ /* set best names */
for( i = 0; i < 3; i++ ) for( i = 0; i < 3; i++ )
SetDlgItemText( hDlg, (IDC_NAME1) + i, p_board->best_name[i] ); SetDlgItemTextW( hDlg, (IDC_NAME1) + i, p_board->best_name[i] );
/* set best times */ /* set best times */
for( i = 0; i < 3; i++ ) for( i = 0; i < 3; i++ )
......
...@@ -86,7 +86,7 @@ typedef struct tagBOARD ...@@ -86,7 +86,7 @@ typedef struct tagBOARD
unsigned rows; unsigned rows;
unsigned cols; unsigned cols;
unsigned mines; unsigned mines;
char best_name [3][MAX_PLAYER_NAME_SIZE+1]; WCHAR best_name [3][MAX_PLAYER_NAME_SIZE+1];
DWORD best_time [3]; DWORD best_time [3];
DIFFICULTY difficulty; DIFFICULTY difficulty;
......
...@@ -52,3 +52,14 @@ ...@@ -52,3 +52,14 @@
#define IDS_ABOUT 1103 #define IDS_ABOUT 1103
#define IDA_WINEMINE 1201 #define IDA_WINEMINE 1201
#define IDM_WINEMINE 1
#define IDI_WINEMINE 1
#define IDI_FACES 2
#define IDI_LEDS 3
#define IDI_MINES 4
#define DLG_TIMES 1
#define DLG_CONGRATS 2
#define DLG_CUSTOM 3
...@@ -29,7 +29,7 @@ STRINGTABLE { ...@@ -29,7 +29,7 @@ STRINGTABLE {
IDS_ABOUT, "Copyright 2000 Joshua Thielen" IDS_ABOUT, "Copyright 2000 Joshua Thielen"
} }
MENU_WINEMINE MENU IDM_WINEMINE MENU
{ {
POPUP "&Game" { POPUP "&Game" {
MENUITEM "&New\tF2", IDM_NEW MENUITEM "&New\tF2", IDM_NEW
...@@ -102,13 +102,13 @@ IDA_WINEMINE ACCELERATORS ...@@ -102,13 +102,13 @@ IDA_WINEMINE ACCELERATORS
LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
/* @makedep: winemine.ico */ /* @makedep: winemine.ico */
WINEMINE ICON winemine.ico IDI_WINEMINE ICON winemine.ico
/* @makedep: faces.bmp */ /* @makedep: faces.bmp */
FACES BITMAP faces.bmp IDI_FACES BITMAP faces.bmp
/* @makedep: leds.bmp */ /* @makedep: leds.bmp */
LEDS BITMAP leds.bmp IDI_LEDS BITMAP leds.bmp
/* @makedep: mines.bmp */ /* @makedep: mines.bmp */
MINES BITMAP mines.bmp IDI_MINES BITMAP mines.bmp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment