Author: dchapyshev
Date: Sun Dec 16 23:02:17 2007
New Revision: 31284
URL:
http://svn.reactos.org/svn/reactos?rev=31284&view=rev
Log:
- Add some functionality
- Small fixes and updates
Modified:
trunk/reactos/dll/cpl/input/add.c
trunk/reactos/dll/cpl/input/lang/bg-BG.rc
trunk/reactos/dll/cpl/input/lang/de-DE.rc
trunk/reactos/dll/cpl/input/lang/en-US.rc
trunk/reactos/dll/cpl/input/lang/fr-FR.rc
trunk/reactos/dll/cpl/input/lang/ru-RU.rc
trunk/reactos/dll/cpl/input/lang/uk-UA.rc
trunk/reactos/dll/cpl/input/resource.h
trunk/reactos/dll/cpl/input/resources/information.ico
trunk/reactos/dll/cpl/input/resources/keyboard.ico
trunk/reactos/dll/cpl/input/resources/marker.ico
trunk/reactos/dll/cpl/input/resources/microphone.ico
trunk/reactos/dll/cpl/input/settings.c
Modified: trunk/reactos/dll/cpl/input/add.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/add.c?rev=31…
==============================================================================
--- trunk/reactos/dll/cpl/input/add.c (original)
+++ trunk/reactos/dll/cpl/input/add.c Sun Dec 16 23:02:17 2007
@@ -95,36 +95,27 @@
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
Modified: trunk/reactos/dll/cpl/input/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/bg-BG.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/bg-BG.rc (original)
+++ trunk/reactos/dll/cpl/input/lang/bg-BG.rc Sun Dec 16 23:02:17 2007
@@ -233,14 +233,19 @@
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, "Áåëãèéñêà çà ôðåíñêè"
Modified: trunk/reactos/dll/cpl/input/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/de-DE.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/de-DE.rc (original)
+++ trunk/reactos/dll/cpl/input/lang/de-DE.rc Sun Dec 16 23:02:17 2007
@@ -233,14 +233,19 @@
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)"
Modified: trunk/reactos/dll/cpl/input/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/en-US.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/en-US.rc (original)
+++ trunk/reactos/dll/cpl/input/lang/en-US.rc Sun Dec 16 23:02:17 2007
@@ -233,14 +233,19 @@
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"
Modified: trunk/reactos/dll/cpl/input/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/fr-FR.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/fr-FR.rc (original)
+++ trunk/reactos/dll/cpl/input/lang/fr-FR.rc Sun Dec 16 23:02:17 2007
@@ -233,16 +233,21 @@
BEGIN
IDS_CPLSYSTEMNAME "Services texte et langue de saisie"
IDS_CPLSYSTEMDESCRIPTION "Personnalise les paramètres pour la langue de saisie
de texte."
+ 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
/* FIXME : To improve/complete */
/* FIXME : À améliorer/compléter */
STRINGTABLE
BEGIN
- //Selected language on "Add Input language"
- IDS_SELECTED_LANGUAGE "Anglais (États-Unis)"
- //Selected keyboard layout on "Add Input language"
- IDS_SELECTED_LAYOUT, "États-Unis-Dvorak"
IDS_US_LAYOUT, "US"
IDS_BELGIAN_LAYOUT, "Belge (Period)"
IDS_BELGIAN_FRENCH_LAYOUT, "Belge Français"
Modified: trunk/reactos/dll/cpl/input/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/ru-RU.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/ru-RU.rc (original)
+++ trunk/reactos/dll/cpl/input/lang/ru-RU.rc Sun Dec 16 23:02:17 2007
@@ -220,7 +220,7 @@
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 @@
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"
Modified: trunk/reactos/dll/cpl/input/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/uk-UA.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/uk-UA.rc (original)
+++ trunk/reactos/dll/cpl/input/lang/uk-UA.rc Sun Dec 16 23:02:17 2007
@@ -242,14 +242,19 @@
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, "Ôðàíöóçüêà (Áåëüã³ÿ)"
Modified: trunk/reactos/dll/cpl/input/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/resource.h?r…
==============================================================================
--- trunk/reactos/dll/cpl/input/resource.h (original)
+++ trunk/reactos/dll/cpl/input/resource.h Sun Dec 16 23:02:17 2007
@@ -79,7 +79,16 @@
/* 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
@@ -213,9 +222,6 @@
#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 */
Modified: trunk/reactos/dll/cpl/input/resources/information.ico
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/resources/in…
==============================================================================
Binary files - no diff available.
Modified: trunk/reactos/dll/cpl/input/resources/keyboard.ico
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/resources/ke…
==============================================================================
Binary files - no diff available.
Modified: trunk/reactos/dll/cpl/input/resources/marker.ico
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/resources/ma…
==============================================================================
Binary files - no diff available.
Modified: trunk/reactos/dll/cpl/input/resources/microphone.ico
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/resources/mi…
==============================================================================
Binary files - no diff available.
Modified: trunk/reactos/dll/cpl/input/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/settings.c?r…
==============================================================================
--- trunk/reactos/dll/cpl/input/settings.c (original)
+++ trunk/reactos/dll/cpl/input/settings.c Sun Dec 16 23:02:17 2007
@@ -39,27 +39,120 @@
#include "resource.h"
#include "input.h"
-#define BUFSIZE 80
-
-static
-BOOL
-CreateDefaultLangList(HWND hWnd)
+#define BUFSIZE 256
+
+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;
-
- if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Keyboard Layout\\Preload"), 0,
KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS)
- {
+ TV_INSERTSTRUCT inc;
+ HWND TWwnd;
+ int Index[3];
+ HIMAGELIST hImgList;
+ HICON hIcon;
+
+ 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 @@
{
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);
-
- _stprintf(szCount,TEXT("%d"),Count + 1);
+ RegEnumValue(hKey,Count,(LPTSTR)szCount,&dwBufCLen,NULL,NULL,NULL,NULL);
+
+ _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 @@
switch (uMsg)
{
case WM_INITDIALOG:
- CreateDefaultLangList(GetDlgItem(hwndDlg, IDC_DEFAULT_INPUT_LANG));
+ InitDefaultLangList(hwndDlg);
break;
case WM_COMMAND: