Improve swedish translations and add new translations to swedish.
[reactos.git] / base / applications / mscutils / servman / servman.c
index 47afa1e..d1a2ddd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * PROJECT:     ReactOS Services
  * LICENSE:     GPL - See COPYING in the top level directory
- * FILE:        base/system/servman/servman.c
+ * FILE:        base/applications/mscutils/servman/servman.c
  * PURPOSE:     Program HQ
  * COPYRIGHT:   Copyright 2005 - 2006 Ged Murphy <gedmurphy@gmail.com>
  *
@@ -9,26 +9,39 @@
 
 #include "precomp.h"
 
+#include <winnls.h>
+
 HINSTANCE hInstance;
 HANDLE ProcessHeap;
+HWND g_hProgDlg;
 
 int WINAPI
-_tWinMain(HINSTANCE hThisInstance,
+wWinMain(HINSTANCE hThisInstance,
           HINSTANCE hPrevInstance,
-          LPTSTR lpCmdLine,
+          LPWSTR lpCmdLine,
           int nCmdShow)
 {
-    LPTSTR lpAppName;
+    LPWSTR lpAppName;
     HWND hMainWnd;
     MSG Msg;
     int Ret = 1;
     INITCOMMONCONTROLSEX icex;
+    
+    switch (GetUserDefaultUILanguage())
+    {
+        case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
+            SetProcessDefaultLayout(LAYOUT_RTL);
+            break;
+
+        default:
+            break;
+    }
 
     hInstance = hThisInstance;
     ProcessHeap = GetProcessHeap();
 
     icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
-    icex.dwICC = ICC_BAR_CLASSES | ICC_COOL_CLASSES;
+    icex.dwICC = ICC_WIN95_CLASSES | ICC_COOL_CLASSES;
     InitCommonControlsEx(&icex);
 
     if (!AllocAndLoadString(&lpAppName,
@@ -45,13 +58,14 @@ _tWinMain(HINSTANCE hThisInstance,
         if (hMainWnd != NULL)
         {
             /* pump the message queue */
-            while( GetMessage( &Msg, NULL, 0, 0 ) )
+            while (GetMessageW( &Msg, NULL, 0, 0 ) )
             {
-                //if(! IsDialogMessage(hProgDlg, &Msg) )
-                //{
+                //if ( !hProgDlg || !IsWindow(hProgDlg) || !IsDialogMessage(hProgDlg, &Msg) )
+                //if (!IsDialogMessage(g_hProgDlg, &Msg))
+                {
                     TranslateMessage(&Msg);
-                    DispatchMessage(&Msg);
-                //}
+                    DispatchMessageW(&Msg);
+                }
             }
 
             Ret = 0;