[WINMINE] Sync with Wine Staging 1.7.37 while keeping our own resources. CORE-9246
authorAmine Khaldi <amine.khaldi@reactos.org>
Tue, 12 May 2015 14:40:23 +0000 (14:40 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Tue, 12 May 2015 14:40:23 +0000 (14:40 +0000)
svn path=/trunk/; revision=67692

33 files changed:
reactos/base/applications/games/winmine/CMakeLists.txt
reactos/base/applications/games/winmine/dialog.c
reactos/base/applications/games/winmine/lang/bg-BG.rc
reactos/base/applications/games/winmine/lang/cs-CZ.rc
reactos/base/applications/games/winmine/lang/da-DK.rc
reactos/base/applications/games/winmine/lang/de-DE.rc
reactos/base/applications/games/winmine/lang/en-US.rc
reactos/base/applications/games/winmine/lang/es-ES.rc
reactos/base/applications/games/winmine/lang/fi-FI.rc
reactos/base/applications/games/winmine/lang/fr-FR.rc
reactos/base/applications/games/winmine/lang/he-IL.rc
reactos/base/applications/games/winmine/lang/it-IT.rc
reactos/base/applications/games/winmine/lang/ja-JP.rc
reactos/base/applications/games/winmine/lang/ko-KR.rc
reactos/base/applications/games/winmine/lang/lt-LT.rc
reactos/base/applications/games/winmine/lang/nl-NL.rc
reactos/base/applications/games/winmine/lang/no-NO.rc
reactos/base/applications/games/winmine/lang/pl-PL.rc
reactos/base/applications/games/winmine/lang/pt-PT.rc
reactos/base/applications/games/winmine/lang/ro-RO.rc
reactos/base/applications/games/winmine/lang/ru-RU.rc
reactos/base/applications/games/winmine/lang/sl-SI.rc
reactos/base/applications/games/winmine/lang/sq-AL.rc
reactos/base/applications/games/winmine/lang/sv-SE.rc
reactos/base/applications/games/winmine/lang/tr-TR.rc
reactos/base/applications/games/winmine/lang/uk-UA.rc
reactos/base/applications/games/winmine/lang/zh-CN.rc
reactos/base/applications/games/winmine/lang/zh-TW.rc
reactos/base/applications/games/winmine/main.c
reactos/base/applications/games/winmine/main.h
reactos/base/applications/games/winmine/resource.h
reactos/base/applications/games/winmine/rsrc.rc
reactos/media/doc/README.WINE

index baa1856..30cdd66 100644 (file)
@@ -7,7 +7,7 @@ list(APPEND SOURCE
     main.h)
 
 add_executable(winmine ${SOURCE} rsrc.rc)
-set_module_type(winmine win32gui)
+set_module_type(winmine win32gui UNICODE)
 target_link_libraries(winmine wine)
 add_importlibs(winmine user32 gdi32 advapi32 shell32 msvcrt kernel32 ntdll)
 add_pch(winmine main.h SOURCE)
index 1ed5339..3f632ae 100644 (file)
@@ -59,16 +59,15 @@ INT_PTR CALLBACK CongratsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lP
     switch( uMsg ) {
     case WM_INITDIALOG:
         p_board = (BOARD*) lParam;
-        SetDlgItemText( hDlg, IDC_EDITNAME,
-                p_board->best_name[p_board->difficulty] );
+        SetDlgItemTextW( hDlg, IDC_EDITNAME, p_board->best_name[p_board->difficulty] );
         return TRUE;
 
     case WM_COMMAND:
         switch( LOWORD( wParam ) ) {
         case IDOK:
-            GetDlgItemText( hDlg, IDC_EDITNAME,
-                p_board->best_name[p_board->difficulty],
-                sizeof( p_board->best_name[p_board->difficulty] ) );
+            GetDlgItemTextW( hDlg, IDC_EDITNAME,
+                             p_board->best_name[p_board->difficulty],
+                             sizeof( p_board->best_name[p_board->difficulty] ) / sizeof(WCHAR) );
             EndDialog( hDlg, 0 );
             return TRUE;
 
@@ -92,7 +91,7 @@ INT_PTR CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
 
         /* set best names */
         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 */
         for( i = 0; i < 3; i++ )
index 458a7f8..174554d 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "На&стройки"
     BEGIN
index 8fc6d1b..aeb81b4 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "N&astavení"
     BEGIN
index ee8b369..4ed7225 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Ophavsret 2000 tilhører Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Indstillinger"
     BEGIN
index 15c8a50..fb4d952 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Optionen"
     BEGIN
index 942ae3f..ade14cb 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Options"
     BEGIN
index ade1e3b..e8905e5 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Opciones"
     BEGIN
index e5ef3fb..532e96d 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Valinnat"
     BEGIN
index e1487a1..8714aee 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Options"
     BEGIN
index e20c250..e4ad8ba 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&אפשרויות"
     BEGIN
index 53bf2be..83ce838 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Opzioni"
     BEGIN
index c34175a..f14a427 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "オプション(&O)"
     BEGIN
index bb054ad..f8fcec8 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "옵션(&O)"
     BEGIN
index 1c1d92a..c251c50 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Autoriaus teisės 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Parinktys"
     BEGIN
index 41c55aa..e7ad805 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Opties"
     BEGIN
index 9b39cb7..a4a827e 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Kopirett 2000 tilhører Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Innstillinger"
     BEGIN
index bd75f8b..44f55aa 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Opcje"
     BEGIN
index 50086f5..a5d3718 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Opções"
     BEGIN
@@ -38,7 +38,7 @@ BEGIN
     IDS_ABOUT "Direitos de autor 2000, Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Opções"
     BEGIN
index fd10bbc..d1995ba 100644 (file)
@@ -8,7 +8,7 @@ BEGIN
     IDS_ABOUT "Drept de autor 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "J&oc"
     BEGIN
index 2c41c7a..375e622 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Игра"
     BEGIN
index 8336993..7fefdd2 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Možnosti"
     BEGIN
index bfef7ac..e5baf57 100644 (file)
@@ -11,7 +11,7 @@ BEGIN
     IDS_ABOUT "Te Drejtat 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Opsione"
     BEGIN
index 92685a2..cfe1c21 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "A&lternativ"
     BEGIN
index cc962c5..a7e2f21 100644 (file)
@@ -9,7 +9,7 @@ BEGIN
     IDS_ABOUT "Telif Hakkı: 2000 - Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Seçenekler"
     BEGIN
index 034a53e..2f567cc 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "&Гра"
     BEGIN
index dcbd924..27e6c1f 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "选项(&O)"
     BEGIN
index dc07ab8..cb214cd 100644 (file)
@@ -7,7 +7,7 @@ BEGIN
     IDS_ABOUT "Copyright 2000 Joshua Thielen"
 END
 
-MENU_WINEMINE MENU
+IDM_WINEMINE MENU
 BEGIN
     POPUP "選項(&O)"
     BEGIN
index 477e9c0..fedd728 100644 (file)
 WINE_DEFAULT_DEBUG_CHANNEL(winemine);
 
 static const DWORD wnd_style = WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX;
-static const char* registry_key = "Software\\Microsoft\\WinMine";
-
+static const WCHAR registry_key[] = {'S','o','f','t','w','a','r','e','\\',
+                                     'M','i','c','r','o','s','o','f','t','\\',
+                                     'W','i','n','M','i','n','e',0};
+
+static const WCHAR xposW[] = {'X','p','o','s',0};
+static const WCHAR yposW[] = {'Y','p','o','s',0};
+static const WCHAR heightW[] = {'H','e','i','g','h','t',0};
+static const WCHAR widthW[] = {'W','i','d','t','h',0};
+static const WCHAR minesW[] = {'M','i','n','e','s',0};
+static const WCHAR difficultyW[] = {'D','i','f','f','i','c','u','l','t','y',0};
+static const WCHAR markW[] = {'M','a','r','k',0};
+static const WCHAR nameW[] = {'N','a','m','e','%','u',0};
+static const WCHAR timeW[] = {'T','i','m','e','%','u',0};
 
 void CheckLevel( BOARD *p_board )
 {
@@ -61,62 +72,61 @@ static void LoadBoard( BOARD *p_board )
     DWORD size;
     DWORD type;
     HKEY hkey;
-    char data[MAX_PLAYER_NAME_SIZE+1];
-    char key_name[8];
+    WCHAR data[MAX_PLAYER_NAME_SIZE+1];
+    WCHAR key_name[8];
     unsigned i;
 
-    RegOpenKeyEx( HKEY_CURRENT_USER, registry_key,
-            0, KEY_QUERY_VALUE, &hkey );
+    RegOpenKeyExW( HKEY_CURRENT_USER, registry_key, 0, KEY_QUERY_VALUE, &hkey );
 
     size = sizeof( p_board->pos.x );
-    if( !RegQueryValueEx( hkey, "Xpos", NULL, &type,
+    if( !RegQueryValueExW( hkey, xposW, NULL, &type,
             (LPBYTE) &p_board->pos.x, &size ) == ERROR_SUCCESS )
        p_board->pos.x = 0;
 
     size = sizeof( p_board->pos.y );
-    if( !RegQueryValueEx( hkey, "Ypos", NULL, &type,
+    if( !RegQueryValueExW( hkey, yposW, NULL, &type,
             (LPBYTE) &p_board->pos.y, &size ) == ERROR_SUCCESS )
         p_board->pos.y = 0;
 
     size = sizeof( p_board->rows );
-    if( !RegQueryValueEx( hkey, "Height", NULL, &type,
+    if( !RegQueryValueExW( hkey, heightW, NULL, &type,
             (LPBYTE) &p_board->rows, &size ) == ERROR_SUCCESS )
         p_board->rows = BEGINNER_ROWS;
 
     size = sizeof( p_board->cols );
-    if( !RegQueryValueEx( hkey, "Width", NULL, &type,
+    if( !RegQueryValueExW( hkey, widthW, NULL, &type,
             (LPBYTE) &p_board->cols, &size ) == ERROR_SUCCESS )
         p_board->cols = BEGINNER_COLS;
 
     size = sizeof( p_board->mines );
-    if( !RegQueryValueEx( hkey, "Mines", NULL, &type,
+    if( !RegQueryValueExW( hkey, minesW, NULL, &type,
             (LPBYTE) &p_board->mines, &size ) == ERROR_SUCCESS )
         p_board->mines = BEGINNER_MINES;
 
     size = sizeof( p_board->difficulty );
-    if( !RegQueryValueEx( hkey, "Difficulty", NULL, &type,
+    if( !RegQueryValueExW( hkey, difficultyW, NULL, &type,
             (LPBYTE) &p_board->difficulty, &size ) == ERROR_SUCCESS )
         p_board->difficulty = BEGINNER;
 
     size = sizeof( p_board->IsMarkQ );
-    if( !RegQueryValueEx( hkey, "Mark", NULL, &type,
+    if( !RegQueryValueExW( hkey, markW, NULL, &type,
             (LPBYTE) &p_board->IsMarkQ, &size ) == ERROR_SUCCESS )
         p_board->IsMarkQ = TRUE;
 
     for( i = 0; i < 3; i++ ) {
-        wsprintf( key_name, "Name%u", i+1 );
+        wsprintfW( key_name, nameW, i+1 );
         size = sizeof( data );
-        if( RegQueryValueEx( hkey, key_name, NULL, &type,
+        if( RegQueryValueExW( hkey, key_name, NULL, &type,
                 (LPBYTE) data, &size ) == ERROR_SUCCESS )
-            lstrcpynA( p_board->best_name[i], data, sizeof(p_board->best_name[i]) );
+            lstrcpynW( p_board->best_name[i], data, sizeof(p_board->best_name[i])/sizeof(WCHAR) );
         else
-            LoadString( p_board->hInst, IDS_NOBODY, p_board->best_name[i], MAX_PLAYER_NAME_SIZE+1 );
+            LoadStringW( p_board->hInst, IDS_NOBODY, p_board->best_name[i], MAX_PLAYER_NAME_SIZE+1 );
     }
 
     for( i = 0; i < 3; i++ ) {
-        wsprintf( key_name, "Time%u", i+1 );
+        wsprintfW( key_name, timeW, i+1 );
         size = sizeof( p_board->best_time[i] );
-        if( !RegQueryValueEx( hkey, key_name, NULL, &type,
+        if( !RegQueryValueExW( hkey, key_name, NULL, &type,
                 (LPBYTE) &p_board->best_time[i], &size ) == ERROR_SUCCESS )
             p_board->best_time[i] = 999;
     }
@@ -127,9 +137,9 @@ static void InitBoard( BOARD *p_board )
 {
     HMENU hMenu;
 
-    p_board->hMinesBMP = LoadBitmap( p_board->hInst, "mines");
-    p_board->hFacesBMP = LoadBitmap( p_board->hInst, "faces");
-    p_board->hLedsBMP = LoadBitmap( p_board->hInst, "leds");
+    p_board->hMinesBMP = LoadBitmapW( p_board->hInst, MAKEINTRESOURCEW(IDI_MINES));
+    p_board->hFacesBMP = LoadBitmapW( p_board->hInst, MAKEINTRESOURCEW(IDI_FACES));
+    p_board->hLedsBMP = LoadBitmapW( p_board->hInst, MAKEINTRESOURCEW(IDI_LEDS));
 
     LoadBoard( p_board );
 
@@ -147,32 +157,32 @@ static void SaveBoard( BOARD *p_board )
 {
     HKEY hkey;
     unsigned i;
-    char data[MAX_PLAYER_NAME_SIZE+1];
-    char key_name[8];
+    WCHAR data[MAX_PLAYER_NAME_SIZE+1];
+    WCHAR key_name[8];
 
-    if( RegCreateKeyEx( HKEY_CURRENT_USER, registry_key,
+    if( RegCreateKeyExW( HKEY_CURRENT_USER, registry_key,
                0, NULL,
                 REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL,
                 &hkey, NULL ) != ERROR_SUCCESS)
         return;
 
-    RegSetValueEx( hkey, "Xpos", 0, REG_DWORD, (LPBYTE) &p_board->pos.x, sizeof(p_board->pos.x) );
-    RegSetValueEx( hkey, "Ypos", 0, REG_DWORD, (LPBYTE) &p_board->pos.y, sizeof(p_board->pos.y) );
-    RegSetValueEx( hkey, "Difficulty", 0, REG_DWORD, (LPBYTE) &p_board->difficulty, sizeof(p_board->difficulty) );
-    RegSetValueEx( hkey, "Height", 0, REG_DWORD, (LPBYTE) &p_board->rows, sizeof(p_board->rows) );
-    RegSetValueEx( hkey, "Width", 0, REG_DWORD, (LPBYTE) &p_board->cols, sizeof(p_board->cols) );
-    RegSetValueEx( hkey, "Mines", 0, REG_DWORD, (LPBYTE) &p_board->mines, sizeof(p_board->mines) );
-    RegSetValueEx( hkey, "Mark", 0, REG_DWORD, (LPBYTE) &p_board->IsMarkQ, sizeof(p_board->IsMarkQ) );
+    RegSetValueExW( hkey, xposW, 0, REG_DWORD, (LPBYTE) &p_board->pos.x, sizeof(p_board->pos.x) );
+    RegSetValueExW( hkey, yposW, 0, REG_DWORD, (LPBYTE) &p_board->pos.y, sizeof(p_board->pos.y) );
+    RegSetValueExW( hkey, difficultyW, 0, REG_DWORD, (LPBYTE) &p_board->difficulty, sizeof(p_board->difficulty) );
+    RegSetValueExW( hkey, heightW, 0, REG_DWORD, (LPBYTE) &p_board->rows, sizeof(p_board->rows) );
+    RegSetValueExW( hkey, widthW, 0, REG_DWORD, (LPBYTE) &p_board->cols, sizeof(p_board->cols) );
+    RegSetValueExW( hkey, minesW, 0, REG_DWORD, (LPBYTE) &p_board->mines, sizeof(p_board->mines) );
+    RegSetValueExW( hkey, markW, 0, REG_DWORD, (LPBYTE) &p_board->IsMarkQ, sizeof(p_board->IsMarkQ) );
 
     for( i = 0; i < 3; i++ ) {
-        wsprintf( key_name, "Name%u", i+1 );
-        lstrcpyn( data, p_board->best_name[i], sizeof( data ) );
-        RegSetValueEx( hkey, key_name, 0, REG_SZ, (LPBYTE) data, strlen(data)+1 );
+        wsprintfW( key_name, nameW, i+1 );
+        lstrcpynW( data, p_board->best_name[i], sizeof(data)/sizeof(WCHAR) );
+        RegSetValueExW( hkey, key_name, 0, REG_SZ, (LPBYTE) data, (lstrlenW(data)+1) * sizeof(WCHAR) );
     }
 
     for( i = 0; i < 3; i++ ) {
-        wsprintf( key_name, "Time%u", i+1 );
-        RegSetValueEx( hkey, key_name, 0, REG_DWORD, (LPBYTE) &p_board->best_time[i], sizeof(p_board->best_time[i]) );
+        wsprintfW( key_name, timeW, i+1 );
+        RegSetValueExW( hkey, key_name, 0, REG_DWORD, (LPBYTE) &p_board->best_time[i], sizeof(p_board->best_time[i]) );
     }
     RegCloseKey( hkey );
 }
@@ -189,7 +199,7 @@ static void SetDifficulty( BOARD *p_board, DIFFICULTY difficulty )
     HMENU hMenu;
 
     if ( difficulty == CUSTOM )
-        if (DialogBoxParam( p_board->hInst, "DLG_CUSTOM", p_board->hWnd,
+        if (DialogBoxParamW( p_board->hInst, MAKEINTRESOURCEW(DLG_CUSTOM), p_board->hWnd,
                     CustomDlgProc, (LPARAM) p_board) != 0)
            return;
 
@@ -245,7 +255,7 @@ static void MoveOnScreen(RECT* rect)
 
     /* ... and move it into the work area (ie excluding task bar)*/
     mi.cbSize = sizeof(mi);
-    GetMonitorInfo(hMonitor, &mi);
+    GetMonitorInfoW(hMonitor, &mi);
 
     ShiftBetween(&rect->left, &rect->right, mi.rcWork.left, mi.rcWork.right);
     ShiftBetween(&rect->top, &rect->bottom, mi.rcWork.top, mi.rcWork.bottom);
@@ -820,11 +830,10 @@ static void TestBoard( HWND hWnd, BOARD *p_board, int x, int y, int msg )
                     p_board->time < p_board->best_time[p_board->difficulty] ) {
             p_board->best_time[p_board->difficulty] = p_board->time;
 
-            DialogBoxParam( p_board->hInst, "DLG_CONGRATS", hWnd,
-                    CongratsDlgProc, (LPARAM) p_board);
-
-            DialogBoxParam( p_board->hInst, "DLG_TIMES", hWnd,
-                    TimesDlgProc, (LPARAM) p_board);
+            DialogBoxParamW( p_board->hInst, MAKEINTRESOURCEW(DLG_CONGRATS), hWnd,
+                             CongratsDlgProc, (LPARAM) p_board);
+            DialogBoxParamW( p_board->hInst, MAKEINTRESOURCEW(DLG_TIMES), hWnd,
+                             TimesDlgProc, (LPARAM) p_board);
         }
     }
     TestFace( p_board, pt, msg );
@@ -840,7 +849,7 @@ static LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
 
     switch( msg ) {
     case WM_CREATE:
-        board.hInst = ((LPCREATESTRUCT) lParam)->hInstance;
+        board.hInst = ((LPCREATESTRUCTW) lParam)->hInstance;
         board.hWnd = hWnd;
         InitBoard( &board );
         CreateBoard( &board );
@@ -884,7 +893,7 @@ static LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
 
     case WM_LBUTTONDOWN:
         WINE_TRACE("WM_LBUTTONDOWN\n");
-        if( wParam & (MK_RBUTTON | MK_SHIFT) )
+        if( wParam & MK_RBUTTON )
             msg = WM_MBUTTONDOWN;
         TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg );
         SetCapture( hWnd );
@@ -892,7 +901,7 @@ static LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
 
     case WM_LBUTTONUP:
         WINE_TRACE("WM_LBUTTONUP\n");
-        if( wParam & (MK_RBUTTON | MK_SHIFT) )
+        if( wParam & MK_RBUTTON )
             msg = WM_MBUTTONUP;
         TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg );
         ReleaseCapture();
@@ -979,12 +988,12 @@ static LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
             return 0;
 
         case IDM_EXIT:
-            SendMessage( hWnd, WM_CLOSE, 0, 0);
+            SendMessageW( hWnd, WM_CLOSE, 0, 0);
             return 0;
 
         case IDM_TIMES:
-            DialogBoxParam( board.hInst, "DLG_TIMES", hWnd,
-                    TimesDlgProc, (LPARAM) &board);
+            DialogBoxParamW( board.hInst, MAKEINTRESOURCEW(DLG_TIMES), hWnd,
+                             TimesDlgProc, (LPARAM) &board);
             return 0;
 
         case IDM_ABOUT:
@@ -1001,18 +1010,18 @@ static LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
             break;
         }
     }
-    return( DefWindowProc( hWnd, msg, wParam, lParam ));
+    return DefWindowProcW( hWnd, msg, wParam, lParam );
 }
 
-int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow )
+int WINAPI wWinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cmdshow )
 {
     MSG msg;
-    WNDCLASSEX wc;
+    WNDCLASSEXW wc;
     HWND hWnd;
     HACCEL haccel;
-    char appname[20];
+    WCHAR appname[20];
 
-    LoadString( hInst, IDS_APPNAME, appname, sizeof(appname));
+    LoadStringW( hInst, IDS_APPNAME, appname, sizeof(appname)/sizeof(WCHAR));
 
     wc.cbSize = sizeof(wc);
     wc.style = 0;
@@ -1020,16 +1029,16 @@ int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmd
     wc.cbClsExtra = 0;
     wc.cbWndExtra = 0;
     wc.hInstance = hInst;
-    wc.hIcon = LoadIcon( hInst, "WINEMINE" );
-    wc.hCursor = LoadCursor( 0, IDI_APPLICATION );
+    wc.hIcon = LoadIconW( hInst, MAKEINTRESOURCEW(IDI_WINEMINE) );
+    wc.hCursor = LoadCursorW( 0, (LPWSTR)IDI_APPLICATION );
     wc.hbrBackground = GetSysColorBrush(COLOR_BTNFACE); //MOD for ROS
-    wc.lpszMenuName = "MENU_WINEMINE";
+    wc.lpszMenuName = MAKEINTRESOURCEW(IDM_WINEMINE);
     wc.lpszClassName = appname;
-    wc.hIconSm = LoadImage( hInst, "WINEMINE", IMAGE_ICON,
+    wc.hIconSm = LoadImageW( hInst, MAKEINTRESOURCEW(IDI_WINEMINE), IMAGE_ICON,
                             GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED );
 
-    if (!RegisterClassEx(&wc)) ExitProcess(1);
-    hWnd = CreateWindow( appname, appname,
+    if (!RegisterClassExW(&wc)) ExitProcess(1);
+    hWnd = CreateWindowW( appname, appname,
        wnd_style,
         CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
         0, 0, hInst, NULL );
@@ -1039,14 +1048,14 @@ int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmd
     ShowWindow( hWnd, cmdshow );
     UpdateWindow( hWnd );
 
-    haccel = LoadAccelerators( hInst, MAKEINTRESOURCE(IDA_WINEMINE) );
+    haccel = LoadAcceleratorsW( hInst, MAKEINTRESOURCEW(IDA_WINEMINE) );
     SetTimer( hWnd, ID_TIMER, 1000, NULL );
 
-    while( GetMessage(&msg, 0, 0, 0) ) {
-        if (!TranslateAccelerator( hWnd, haccel, &msg ))
+    while( GetMessageW(&msg, 0, 0, 0) ) {
+        if (!TranslateAcceleratorW( hWnd, haccel, &msg ))
             TranslateMessage( &msg );
 
-        DispatchMessage( &msg );
+        DispatchMessageW( &msg );
     }
     return msg.wParam;
 }
index 826940b..3ac207e 100644 (file)
@@ -95,7 +95,7 @@ typedef struct tagBOARD
     unsigned rows;
     unsigned cols;
     unsigned mines;
-    char best_name [3][MAX_PLAYER_NAME_SIZE+1];
+    WCHAR best_name [3][MAX_PLAYER_NAME_SIZE+1];
     DWORD best_time [3];
     DIFFICULTY difficulty;
 
index 5571ef9..e77084f 100644 (file)
 
 #pragma once
 
-#define ID_TIMER 1000
+#define ID_TIMER        1000
 
 /* menu defines */
-#define IDM_NEW      1001
-#define IDM_EXIT     1002
-#define IDM_TIMES    1003
-#define IDM_ABOUT    1004
-#define IDM_BEGINNER 1005
-#define IDM_ADVANCED 1006
-#define IDM_EXPERT   1007
-#define IDM_CUSTOM   1008
-#define IDM_MARKQ    1009
-
-#define IDC_TIME1 1011
-#define IDC_TIME2 1012
-#define IDC_TIME3 1013
-#define IDC_NAME1 1014
-#define IDC_NAME2 1015
-#define IDC_NAME3 1016
-
-#define IDC_EDITNAME 1021
-
-#define IDC_EDITCOLS  1031
-#define IDC_EDITROWS  1032
-#define IDC_EDITMINES 1033
-
-#define IDS_APPNAME 1101
-#define IDS_NOBODY  1102
-#define IDS_ABOUT   1103
-
-#define IDA_WINEMINE 1201
+#define IDM_NEW        1001
+#define IDM_EXIT       1002
+#define IDM_TIMES      1003
+#define IDM_ABOUT      1004
+#define IDM_BEGINNER   1005
+#define IDM_ADVANCED   1006
+#define IDM_EXPERT     1007
+#define IDM_CUSTOM     1008
+#define IDM_MARKQ      1009
+
+#define IDC_TIME1      1011
+#define IDC_TIME2      1012
+#define IDC_TIME3      1013
+#define IDC_NAME1      1014
+#define IDC_NAME2      1015
+#define IDC_NAME3      1016
+
+#define IDC_EDITNAME   1021
+
+#define IDC_EDITCOLS   1031
+#define IDC_EDITROWS   1032
+#define IDC_EDITMINES  1033
+
+#define IDS_APPNAME    1101
+#define IDS_NOBODY     1102
+#define IDS_ABOUT      1103
+
+#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
index 2c8be76..614e7da 100644 (file)
@@ -33,16 +33,16 @@ BEGIN
 END
 
 /* @makedep: winemine.ico */
-WINEMINE ICON "rc/winemine.ico"
+IDI_WINEMINE ICON "rc/winemine.ico"
 
 /* @makedep: faces.bmp */
-FACES BITMAP "rc/faces.bmp"
+IDI_FACES BITMAP "rc/faces.bmp"
 
 /* @makedep: leds.bmp */
-LEDS BITMAP "rc/leds.bmp"
+IDI_LEDS BITMAP "rc/leds.bmp"
 
 /* @makedep: mines.bmp */
-MINES BITMAP "rc/mines.bmp"
+IDI_MINES BITMAP "rc/mines.bmp"
 
 #include <reactos/manifest_exe.rc>
 
index 0af0239..be9c80c 100644 (file)
@@ -235,7 +235,7 @@ reactos/base/applications/cmdutils/taskkill # Synced to Wine-1.7.27
 reactos/base/applications/cmdutils/wmic     # Synced to Wine-1.7.27
 reactos/base/applications/cmdutils/wscript  # Synced to WineStaging-1.7.37
 reactos/base/applications/cmdutils/xcopy    # Synced to WineStaging-1.7.37
-reactos/base/applications/games/winmine     # Forked at Wine-1_3_5
+reactos/base/applications/games/winmine     # Synced to WineStaging-1.7.37 with our own resources.
 reactos/base/applications/extrac32          # Synced to Wine-1.7.27
 reactos/base/applications/iexplore          # Synced to Wine-1.7.27
 reactos/base/applications/notepad           # Forked at Wine-20041201