- Add some functionality
authorDmitry Chapyshev <dmitry@reactos.org>
Sun, 16 Dec 2007 20:02:17 +0000 (20:02 +0000)
committerDmitry Chapyshev <dmitry@reactos.org>
Sun, 16 Dec 2007 20:02:17 +0000 (20:02 +0000)
- Small fixes and updates

svn path=/trunk/; revision=31284

13 files changed:
reactos/dll/cpl/input/add.c
reactos/dll/cpl/input/lang/bg-BG.rc
reactos/dll/cpl/input/lang/de-DE.rc
reactos/dll/cpl/input/lang/en-US.rc
reactos/dll/cpl/input/lang/fr-FR.rc
reactos/dll/cpl/input/lang/ru-RU.rc
reactos/dll/cpl/input/lang/uk-UA.rc
reactos/dll/cpl/input/resource.h
reactos/dll/cpl/input/resources/information.ico
reactos/dll/cpl/input/resources/keyboard.ico
reactos/dll/cpl/input/resources/marker.ico
reactos/dll/cpl/input/resources/microphone.ico
reactos/dll/cpl/input/settings.c

index bf6517d..e6ceb23 100644 (file)
@@ -95,36 +95,27 @@ static
 VOID
 CreateLanguagesList(HWND hWnd)
 {
-    TCHAR LangSel[256];
+    //TCHAR LangSel[256];
 
     hLanguageList = hWnd;
     EnumSystemLocales(LanguagesEnumProc, LCID_INSTALLED);
 
-    LoadString(hApplet,
-               IDS_SELECTED_LANGUAGE,
-               LangSel,
-               256);
-
-    SendMessage(hLanguageList,
+    /*SendMessage(hLanguageList,
                 CB_SELECTSTRING,
                 (WPARAM) -1,
-                (LPARAM)LangSel);
+                (LPARAM)LangSel);*/
 }
 
 static
 VOID
 SelectCurrentLayout(HWND hWnd)
 {
-    TCHAR Layout[256];
+    //TCHAR Layout[256];
 
-    LoadString(hApplet,
-               IDS_SELECTED_LAYOUT,
-               Layout,
-               256);
-    SendMessage(hWnd,
+    /*SendMessage(hWnd,
                 CB_SELECTSTRING,
                 (WPARAM) -1,
-                (LPARAM)Layout);
+                (LPARAM)Layout);*/
 }
 
 INT_PTR CALLBACK
index 8803d59..158da44 100644 (file)
@@ -233,14 +233,19 @@ STRINGTABLE
 BEGIN
     IDS_CPLSYSTEMNAME "Ñëîâåñíè óñëóãè è åçèöè íà âúâåæäàíå"
     IDS_CPLSYSTEMDESCRIPTION "Íàãëàñÿâàíå íà íàñòðîéêèòå çà åçèöèòå íà âúâåæäàíå."
+       IDS_KEYBOARD "Keyboard"
+       IDS_ADV_TEXT_SRV "Advanced Text Services"
+       IDS_NONE "(None)"
+       IDS_UNKNOWN "(Unknown)"
+       IDS_RESTART "Do you want to restart your computer now?"
+       IDS_SPEECH "Speech"
+       IDS_HRD_REC "Handwriting Recognition"
+       IDS_OFF_ADV_TXT_SRV "Do you want to turn off advanced text services?"
+       IDS_WHATS_THIS "What's This?"
 END
 
 STRINGTABLE
 BEGIN
-       //Selected language on "&Äîáàâÿíå åçèê íà âúâåæäàíå"
-       IDS_SELECTED_LANGUAGE               "English (United States)"
-       //Selected keyboard layout on "&Äîáàâÿíå åçèê íà âúâåæäàíå"
-       IDS_SELECTED_LAYOUT,                            "ÑÀÙ- Äâîðàê"
        IDS_US_LAYOUT,                                                                  "ÑÀÙ"
        IDS_BELGIAN_LAYOUT,                                                     "Áåëãèéñêà (òî÷êà)"
        IDS_BELGIAN_FRENCH_LAYOUT,                                              "Áåëãèéñêà çà ôðåíñêè"
index 6a6a447..f83cc02 100644 (file)
@@ -233,14 +233,19 @@ STRINGTABLE
 BEGIN
     IDS_CPLSYSTEMNAME "Textdienste und Eingabesprachen"
     IDS_CPLSYSTEMDESCRIPTION "Ändert die Einstellungen der Texteingabe einer Sprache."
+       IDS_KEYBOARD "Keyboard"
+       IDS_ADV_TEXT_SRV "Advanced Text Services"
+       IDS_NONE "(None)"
+       IDS_UNKNOWN "(Unknown)"
+       IDS_RESTART "Do you want to restart your computer now?"
+       IDS_SPEECH "Speech"
+       IDS_HRD_REC "Handwriting Recognition"
+       IDS_OFF_ADV_TXT_SRV "Do you want to turn off advanced text services?"
+       IDS_WHATS_THIS "What's This?"
 END
 
 STRINGTABLE
 BEGIN
-       //Selected language on "Add Input language"
-       IDS_SELECTED_LANGUAGE               "English (United States)"
-       //Selected keyboard layout on "Add Input language"
-       IDS_SELECTED_LAYOUT,                            "United States-Dvorak"
        IDS_US_LAYOUT,                                  "US"
        IDS_BELGIAN_LAYOUT,                             "Belgisch (Punkt)"
        IDS_BELGIAN_FRENCH_LAYOUT,                      "Belgisch (Wallonisch)"
index 5cdb999..f2b881c 100644 (file)
@@ -233,14 +233,19 @@ STRINGTABLE
 BEGIN
     IDS_CPLSYSTEMNAME "Text Services and Input Languages"
     IDS_CPLSYSTEMDESCRIPTION "Customizes settings for text input of languages."
+       IDS_KEYBOARD "Keyboard"
+       IDS_ADV_TEXT_SRV "Advanced Text Services"
+       IDS_NONE "(None)"
+       IDS_UNKNOWN "(Unknown)"
+       IDS_RESTART "Do you want to restart your computer now?"
+       IDS_SPEECH "Speech"
+       IDS_HRD_REC "Handwriting Recognition"
+       IDS_OFF_ADV_TXT_SRV "Do you want to turn off advanced text services?"
+       IDS_WHATS_THIS "What's This?"
 END
 
 STRINGTABLE
 BEGIN
-       //Selected language on "Add Input language"
-       IDS_SELECTED_LANGUAGE               "English (United States)"
-       //Selected keyboard layout on "Add Input language"
-       IDS_SELECTED_LAYOUT,                            "United States-Dvorak"
        IDS_US_LAYOUT,                                                                  "US"
        IDS_BELGIAN_LAYOUT,                                                     "Belgian (Period)"
        IDS_BELGIAN_FRENCH_LAYOUT,                                              "Belgian French"
index f3272d9..699cbc7 100644 (file)
@@ -233,16 +233,21 @@ STRINGTABLE
 BEGIN\r
     IDS_CPLSYSTEMNAME "Services texte et langue de saisie"\r
     IDS_CPLSYSTEMDESCRIPTION "Personnalise les paramètres pour la langue de saisie de texte."\r
+       IDS_KEYBOARD "Keyboard"\r
+       IDS_ADV_TEXT_SRV "Advanced Text Services"\r
+       IDS_NONE "(None)"\r
+       IDS_UNKNOWN "(Unknown)"\r
+       IDS_RESTART "Do you want to restart your computer now?"\r
+       IDS_SPEECH "Speech"\r
+       IDS_HRD_REC "Handwriting Recognition"\r
+       IDS_OFF_ADV_TXT_SRV "Do you want to turn off advanced text services?"\r
+       IDS_WHATS_THIS "What's This?"\r
 END\r
 \r
 /* FIXME : To improve/complete */\r
 /* FIXME : À améliorer/compléter */\r
 STRINGTABLE\r
 BEGIN\r
-       //Selected language on "Add Input language"\r
-       IDS_SELECTED_LANGUAGE               "Anglais (États-Unis)"\r
-       //Selected keyboard layout on "Add Input language"\r
-       IDS_SELECTED_LAYOUT,                            "États-Unis-Dvorak"\r
        IDS_US_LAYOUT,                                                                  "US"\r
        IDS_BELGIAN_LAYOUT,                                                     "Belge (Period)"\r
        IDS_BELGIAN_FRENCH_LAYOUT,                                              "Belge Français"\r
index 2487da5..6a6a798 100644 (file)
@@ -220,7 +220,7 @@ END
 
 IDD_INPUT_LANG_PROP DIALOG 20, 20, 227, 75
 STYLE DS_SETFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_3DLOOK | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION
-CAPTION "Ñâîéñòâà ââîäà"
+CAPTION "Ïàðàìåòðû ââîäà"
 FONT 8, "MS Shell Dlg"
 BEGIN
     LTEXT "ßçûê ââîäà:", -1, 7, 7, 61, 8
@@ -234,15 +234,20 @@ END
 STRINGTABLE
 BEGIN
     IDS_CPLSYSTEMNAME "Òåêñòîâûå ñåðâèñû è ââîä ÿçûêîâ"
-    IDS_CPLSYSTEMDESCRIPTION "Äîïîëíèòåëüíûå óñòàíîâêè òåêñòîâîãî ââîäà ÿçûêîâ."
+    IDS_CPLSYSTEMDESCRIPTION "Äîïîëíèòåëüíûå ïàðàìåòðû òåêñòîâîãî ââîäà ÿçûêîâ."
+       IDS_KEYBOARD "Êëàâèàòóðà"
+       IDS_ADV_TEXT_SRV "Advanced Text Services"
+       IDS_NONE "(None)"
+       IDS_UNKNOWN "(Unknown)"
+       IDS_RESTART "Do you want to restart your computer now?"
+       IDS_SPEECH "Speech"
+       IDS_HRD_REC "Handwriting Recognition"
+       IDS_OFF_ADV_TXT_SRV "Do you want to turn off advanced text services?"
+       IDS_WHATS_THIS "What's This?"
 END
 
 STRINGTABLE
 BEGIN
-    //Selected language on "Add Input language"
-    IDS_SELECTED_LANGUAGE               "English (United States)"
-    //Selected keyboard layout on "Add Input language"
-    IDS_SELECTED_LAYOUT,                     "United States-Dvorak"
     IDS_US_LAYOUT,                           "US"
     IDS_BELGIAN_LAYOUT,                      "Belgian (Period)"
     IDS_BELGIAN_FRENCH_LAYOUT,               "Belgian French"
index 5e2c067..cac8388 100644 (file)
@@ -242,14 +242,19 @@ STRINGTABLE
 BEGIN
     IDS_CPLSYSTEMNAME "Ìîâè òà ñëóæáè òåêñòîâîãî ââîäó"
     IDS_CPLSYSTEMDESCRIPTION "Íàëàøòîâóº ïàðàìåòðè äëÿ òåêñòîâîãî ââîäó."
+       IDS_KEYBOARD "Keyboard"
+       IDS_ADV_TEXT_SRV "Advanced Text Services"
+       IDS_NONE "(None)"
+       IDS_UNKNOWN "(Unknown)"
+       IDS_RESTART "Do you want to restart your computer now?"
+       IDS_SPEECH "Speech"
+       IDS_HRD_REC "Handwriting Recognition"
+       IDS_OFF_ADV_TXT_SRV "Do you want to turn off advanced text services?"
+       IDS_WHATS_THIS "What's This?"
 END
 
 STRINGTABLE
 BEGIN
-       //Selected language on "Add Input language" ("Äîäàâàííÿ ìîâè ââîäó")
-       IDS_SELECTED_LANGUAGE               "English (United States)"
-       //Selected keyboard layout on "Add Input language" ("Äîäàâàííÿ ìîâè ââîäó")
-       IDS_SELECTED_LAYOUT,                            "United States-Dvorak"
        IDS_US_LAYOUT,                                                                  "ÑØÀ"
        IDS_BELGIAN_LAYOUT,                                                     "Áåëüã³éñüêà (³ç êðàïêîþ)"
        IDS_BELGIAN_FRENCH_LAYOUT,                                              "Ôðàíöóçüêà (Áåëüã³ÿ)"
index d244910..77d0d00 100644 (file)
 /* IDS */
 #define IDS_CPLSYSTEMNAME              1
 #define IDS_CPLSYSTEMDESCRIPTION       2
-
+#define IDS_KEYBOARD                3
+#define IDS_ADV_TEXT_SRV            4
+#define IDS_NONE                    5
+#define IDS_UNKNOWN                 6
+#define IDS_RESTART                 7
+#define IDS_SPEECH                  8
+#define IDS_HRD_REC                 9
+#define IDS_OFF_ADV_TXT_SRV         10
+#define IDS_WHATS_THIS              11
+/* Layouts */
 #define IDS_US_LAYOUT                                                  5000
 #define IDS_BELGIAN_LAYOUT                                             5001
 #define IDS_BELGIAN_FRENCH_LAYOUT                              5002
 #define IDS_BULGARIAN_PHONETIC_CLASSIC_LAYOUT  5134
 #define IDS_BULGARIAN_PHONETIC_BDS_LAYOUT              5135
 
-#define IDS_SELECTED_LAYOUT   6000
-#define IDS_SELECTED_LANGUAGE 6001
-
 #endif /* __CPL_RESOURCE_H */
 
 /* EOF */
index b88b35c..e25c125 100644 (file)
Binary files a/reactos/dll/cpl/input/resources/information.ico and b/reactos/dll/cpl/input/resources/information.ico differ
index 082c004..b472d66 100644 (file)
Binary files a/reactos/dll/cpl/input/resources/keyboard.ico and b/reactos/dll/cpl/input/resources/keyboard.ico differ
index 699d159..41259d4 100644 (file)
Binary files a/reactos/dll/cpl/input/resources/marker.ico and b/reactos/dll/cpl/input/resources/marker.ico differ
index 1a562ca..42662cf 100644 (file)
Binary files a/reactos/dll/cpl/input/resources/microphone.ico and b/reactos/dll/cpl/input/resources/microphone.ico differ
index fd25925..cefbd44 100644 (file)
 #include "resource.h"
 #include "input.h"
 
-#define BUFSIZE 80
+#define BUFSIZE 256
 
-static
-BOOL
-CreateDefaultLangList(HWND hWnd)
+static BOOL
+GetLayoutName(LPCTSTR lcid, LPCTSTR name)
 {
     HKEY hKey;
-    TCHAR szPreload[BUFSIZE];
-    TCHAR szCount[BUFSIZE];
-    TCHAR Lang[BUFSIZE];
     DWORD dwBufLen;
-    DWORD dwBufCLen;
-    DWORD cValues;
-    LONG lRet;
+    TCHAR szBuf[BUFSIZE];
+
+    _stprintf(szBuf, L"SYSTEM\\ControlSet001\\Control\\Keyboard Layouts\\%s",lcid);
+
+    if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, (LPCTSTR)szBuf, 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS)
+    {
+        dwBufLen = BUFSIZE;
+        if (RegQueryValueEx(hKey,L"Layout Text",NULL,NULL,(LPBYTE)name,&dwBufLen) == ERROR_SUCCESS)
+        {
+            RegCloseKey(hKey);
+            return TRUE;
+        }
+    }
+
+    return FALSE;
+}
+
+static BOOL
+TreeView_GetItemText(HWND hTree, HTREEITEM hItem, LPTSTR name, DWORD buf)
+{
+    TVITEM tv = {0};
+
+    tv.mask = TVIF_TEXT | TVIF_HANDLE;
+    tv.hItem = hItem;
+    tv.pszText = name;
+    tv.cchTextMax = (int)buf;
+
+    return TreeView_GetItem(hTree, &tv);
+}
+
+static HTREEITEM
+GetRootHandle(HWND hWnd, TCHAR * Name)
+{
+    HTREEITEM hNext = 0, hRoot;
+    TCHAR Tmp[256];
+    HWND hTree;
+    DWORD i, count;
+    HKEY hKey;
+
+    hTree = GetDlgItem(hWnd, IDC_KEYLAYOUT_TREE);
+    hRoot = TreeView_GetRoot(hTree);
+
+    RegOpenKeyEx(HKEY_CURRENT_USER, L"Keyboard Layout\\Preload", 0, KEY_QUERY_VALUE, &hKey);
+    RegQueryInfoKey(hKey,NULL,NULL,NULL,NULL,NULL,NULL,&count,NULL,NULL,NULL,NULL);
+    RegCloseKey(hKey);
+
+    for (i = 0; i < count; i++)
+    {
+        if (i == 0)
+        {
+            (VOID) TreeView_GetItemText(hTree, hRoot, (LPTSTR)Tmp, 256);
+        }
+        else
+        {
+            if (i == 1)
+            {
+                hNext = TreeView_GetNextItem(hTree, hRoot, TVGN_NEXT);
+            }
+            else
+            {
+                hNext = TreeView_GetNextItem(hTree, hNext, TVGN_NEXT);
+            }
+            (VOID) TreeView_GetItemText(hTree, hNext, (LPTSTR)Tmp, 256);
+        }
+
+        if (_tcscmp(Name,Tmp) == 0)
+        {
+            if (i == 0) return hRoot;
+            return hNext;
+        }
+    }
+    return 0;
+}
+
+static BOOL
+InitDefaultLangList(HWND hWnd)
+{
+    HKEY hKey, hSubKey;
+    TCHAR szPreload[BUFSIZE], szCount[BUFSIZE], szSub[BUFSIZE];
+    TCHAR szName[BUFSIZE], Lang[BUFSIZE];
+    DWORD dwBufLen, dwBufCLen, cValues;
     INT Count;
     LCID Lcid;
+    TV_INSERTSTRUCT inc;
+    HWND TWwnd;
+    int Index[3];
+    HIMAGELIST hImgList;
+    HICON hIcon;
 
-    if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Keyboard Layout\\Preload"), 0, KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS)
-    {
+    ZeroMemory(&inc, sizeof(TV_INSERTSTRUCT));
+    inc.hInsertAfter = TVI_LAST;
+    inc.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE;
+    inc.hParent = TVI_ROOT;
+
+    hImgList = ImageList_Create(16,16,ILC_COLOR8 | ILC_MASK,5,5);
+    hIcon = LoadImage(hApplet,MAKEINTRESOURCE(IDI_KEYBOARD_ICO),IMAGE_ICON,16,16,LR_DEFAULTCOLOR);
+    Index[0] = ImageList_AddIcon(hImgList,hIcon);
+    hIcon = LoadImage(hApplet,MAKEINTRESOURCE(IDI_MARKER_ICO),IMAGE_ICON,16,16,LR_DEFAULTCOLOR);
+    Index[1] = ImageList_AddIcon(hImgList,hIcon);
+    hIcon = LoadImage(hApplet,MAKEINTRESOURCE(IDI_INFO_ICO),IMAGE_ICON,16,16,LR_DEFAULTCOLOR);
+    Index[2] = ImageList_AddIcon(hImgList,hIcon);
+    DestroyIcon(hIcon);
+
+    TWwnd = GetDlgItem(hWnd, IDC_KEYLAYOUT_TREE);
+
+    if (RegOpenKeyEx(HKEY_CURRENT_USER, L"Keyboard Layout\\Preload", 0, KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS)
         return FALSE;
-    }
 
     RegQueryInfoKey(hKey,NULL,NULL,NULL,NULL,NULL,NULL,&cValues,NULL,NULL,NULL,NULL);
 
@@ -67,32 +160,98 @@ CreateDefaultLangList(HWND hWnd)
     {
         for (Count = 0; Count < cValues; Count++)
         {
-            szCount[0] = TEXT('\0');
+            szCount[0] = L'\0';
 
             dwBufCLen = BUFSIZE;
-            lRet = RegEnumValue(hKey,Count,(LPTSTR)szCount,&dwBufCLen,NULL,NULL,NULL,NULL);
+            RegEnumValue(hKey,Count,(LPTSTR)szCount,&dwBufCLen,NULL,NULL,NULL,NULL);
 
-            _stprintf(szCount,TEXT("%d"),Count + 1);
+            _stprintf(szCount,L"%d",Count + 1);
 
             dwBufLen = BUFSIZE;
             RegQueryValueEx(hKey,(LPTSTR)szCount,NULL,NULL,(LPBYTE)szPreload,&dwBufLen);
 
             Lcid = _tcstoul(szPreload, NULL, 16);
+            /* FIXME: If it is established more than one English layouts of the keyboard it is incorrectly determined Lang */
             GetLocaleInfo(Lcid, LOCALE_SLANGUAGE, (LPTSTR)Lang, sizeof(Lang));
 
-            SendMessage(hWnd,
-                        CB_ADDSTRING,
-                        0,
-                        (LPARAM)Lang);
+            if (RegOpenKeyEx(HKEY_CURRENT_USER, L"Keyboard Layout\\Substitutes", 0, KEY_QUERY_VALUE, &hSubKey) != ERROR_SUCCESS)
+                return FALSE;
+
+            dwBufLen = BUFSIZE;
+            TCHAR szLOName[BUFSIZE], szBuf[BUFSIZE];
+            LONG Ret;
+            HTREEITEM hRoot = 0, hKeyBrd = 0, hParent;
+
+            Ret = RegQueryValueEx(hSubKey,(LPCTSTR)szPreload,NULL,NULL,(LPBYTE)szSub,&dwBufLen);
+            if (Ret == ERROR_SUCCESS) _tcscpy(szPreload, szSub);
+
+            GetLayoutName(szPreload,szLOName); 
+
+            hParent = GetRootHandle(hWnd, Lang);
+            if (hParent == 0)
+            {
+                inc.hParent = NULL;
+                inc.item.pszText = Lang;
+                inc.item.iImage = Index[2];
+                inc.item.iSelectedImage = Index[2];
+                if (Count == 0)
+                {
+                    inc.item.state = TVIS_BOLD;
+                    inc.item.stateMask = TVIS_BOLD;
+                }
+                else
+                {
+                    inc.item.state = !TVIS_BOLD;
+                    inc.item.stateMask = !TVIS_BOLD;
+                }
+                hRoot = TreeView_InsertItem(TWwnd, &inc);
+                if (Count == 0) (VOID) TreeView_SelectItem(TWwnd, hRoot);
+
+                LoadString(hApplet, IDS_KEYBOARD, (LPTSTR)szBuf, BUFSIZE);
+                inc.hParent = hRoot;
+                inc.item.pszText = szBuf;
+                inc.item.iImage = Index[0];
+                inc.item.iSelectedImage = Index[0];
+                inc.item.state = !TVIS_BOLD;
+                inc.item.stateMask = !TVIS_BOLD;
+                hKeyBrd = TreeView_InsertItem(TWwnd, &inc);
+                inc.hParent = hKeyBrd;
+            }
+            else
+            {
+                inc.hParent = TreeView_GetChild(TWwnd, hParent);
+            }
+
+            inc.item.pszText = szLOName;
+            inc.item.iImage = Index[1];
+            inc.item.iSelectedImage = Index[1];
             if (Count == 0)
             {
-                SendMessage(hWnd,
-                            CB_SELECTSTRING,
-                            (WPARAM)-1,
-                            (LPARAM)Lang);
+                inc.item.state = TVIS_BOLD;
+                inc.item.stateMask = TVIS_BOLD;
             }
-        }
+            else
+            {
+                inc.item.state = !TVIS_BOLD;
+                inc.item.stateMask = !TVIS_BOLD;
+            }
+            (VOID) TreeView_InsertItem(TWwnd, &inc);
+
+            (VOID) TreeView_SetImageList(TWwnd, hImgList, TVSIL_NORMAL);
+            (VOID) TreeView_Expand(TWwnd, hRoot, TVM_EXPAND);
+            (VOID) TreeView_Expand(TWwnd, hKeyBrd, TVM_EXPAND);
+
+            _stprintf(szName,L"%s - %s",Lang,szLOName);
 
+            RegCloseKey(hSubKey);
+
+            HWND CBwnd;
+            CBwnd = GetDlgItem(hWnd, IDC_DEFAULT_INPUT_LANG);
+            SendMessage(CBwnd,CB_ADDSTRING,0,(LPARAM)szName);
+            SendMessage(CBwnd,CB_SETITEMDATA,0,(LPARAM)Lcid);
+            if (Count == 0)
+                SendMessage(CBwnd,CB_SELECTSTRING,(WPARAM)-1,(LPARAM)szName);
+        }
     }
 
     RegCloseKey(hKey);
@@ -109,7 +268,7 @@ SettingPageProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
     switch (uMsg)
     {
         case WM_INITDIALOG:
-            CreateDefaultLangList(GetDlgItem(hwndDlg, IDC_DEFAULT_INPUT_LANG));
+            InitDefaultLangList(hwndDlg);
             break;
 
         case WM_COMMAND: