mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 07:52:56 +00:00
- Build UNICODE dll.
- Fix the crash when the customize input locale button is pressed. svn path=/trunk/; revision=11630
This commit is contained in:
parent
83541672c0
commit
69b5fdb8f1
2 changed files with 76 additions and 69 deletions
|
@ -1,4 +1,4 @@
|
||||||
# $Id: Makefile,v 1.11 2004/08/28 11:08:50 ekohl Exp $
|
# $Id: Makefile,v 1.12 2004/11/12 15:42:36 ekohl Exp $
|
||||||
|
|
||||||
PATH_TO_TOP = ../..
|
PATH_TO_TOP = ../..
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a gdi32.a user32.a samlib.a userenv
|
||||||
|
|
||||||
TARGET_CFLAGS = -Wall -Werror -fno-builtin
|
TARGET_CFLAGS = -Wall -Werror -fno-builtin
|
||||||
|
|
||||||
TARGET_CFLAGS += -D__USE_W32API -D_WIN32_IE=0x0500
|
TARGET_CFLAGS += -D__USE_W32API -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DUNICODE -D_UNICODE
|
||||||
TARGET_RCFLAGS += -D__USE_W32API -D_WIN32_IE=0x0500
|
TARGET_RCFLAGS += -D__USE_W32API -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DUNICODE -D_UNICODE
|
||||||
|
|
||||||
TARGET_LFLAGS = -nostartfiles
|
TARGET_LFLAGS = -nostartfiles
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: wizard.c,v 1.12 2004/11/11 12:23:43 ekohl Exp $
|
/* $Id: wizard.c,v 1.13 2004/11/12 15:42:36 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -31,7 +31,6 @@
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <tchar.h>
|
|
||||||
#include <setupapi.h>
|
#include <setupapi.h>
|
||||||
|
|
||||||
#include <syssetup.h>
|
#include <syssetup.h>
|
||||||
|
@ -86,7 +85,7 @@ CreateTitleFont(VOID)
|
||||||
|
|
||||||
LogFont = ncm.lfMessageFont;
|
LogFont = ncm.lfMessageFont;
|
||||||
LogFont.lfWeight = FW_BOLD;
|
LogFont.lfWeight = FW_BOLD;
|
||||||
_tcscpy(LogFont.lfFaceName, TEXT("MS Shell Dlg"));
|
wcscpy(LogFont.lfFaceName, L"MS Shell Dlg");
|
||||||
|
|
||||||
hdc = GetDC(NULL);
|
hdc = GetDC(NULL);
|
||||||
FontSize = 12;
|
FontSize = 12;
|
||||||
|
@ -170,8 +169,8 @@ OwnerPageDlgProc(HWND hwndDlg,
|
||||||
WPARAM wParam,
|
WPARAM wParam,
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
TCHAR OwnerName[51];
|
WCHAR OwnerName[51];
|
||||||
TCHAR OwnerOrganization[51];
|
WCHAR OwnerOrganization[51];
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
LPNMHDR lpnm;
|
LPNMHDR lpnm;
|
||||||
|
|
||||||
|
@ -179,8 +178,8 @@ OwnerPageDlgProc(HWND hwndDlg,
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
SendDlgItemMessage(hwndDlg, IDC_OWNERNAME, EM_LIMITTEXT, 50, 0);
|
SendDlgItemMessageW(hwndDlg, IDC_OWNERNAME, EM_LIMITTEXT, 50, 0);
|
||||||
SendDlgItemMessage(hwndDlg, IDC_OWNERORGANIZATION, EM_LIMITTEXT, 50, 0);
|
SendDlgItemMessageW(hwndDlg, IDC_OWNERORGANIZATION, EM_LIMITTEXT, 50, 0);
|
||||||
|
|
||||||
/* Set focus to owner name */
|
/* Set focus to owner name */
|
||||||
SetFocus(GetDlgItem(hwndDlg, IDC_OWNERNAME));
|
SetFocus(GetDlgItem(hwndDlg, IDC_OWNERNAME));
|
||||||
|
@ -203,38 +202,38 @@ OwnerPageDlgProc(HWND hwndDlg,
|
||||||
OwnerName[0] = 0;
|
OwnerName[0] = 0;
|
||||||
if (GetDlgItemText(hwndDlg, IDC_OWNERNAME, OwnerName, 50) == 0)
|
if (GetDlgItemText(hwndDlg, IDC_OWNERNAME, OwnerName, 50) == 0)
|
||||||
{
|
{
|
||||||
MessageBox(hwndDlg,
|
MessageBoxW(hwndDlg,
|
||||||
_T("Setup cannot continue until you enter your name."),
|
L"Setup cannot continue until you enter your name.",
|
||||||
_T("ReactOS Setup"),
|
L"ReactOS Setup",
|
||||||
MB_ICONERROR | MB_OK);
|
MB_ICONERROR | MB_OK);
|
||||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
OwnerOrganization[0] = 0;
|
OwnerOrganization[0] = 0;
|
||||||
GetDlgItemText(hwndDlg, IDC_OWNERORGANIZATION, OwnerOrganization, 50);
|
GetDlgItemTextW(hwndDlg, IDC_OWNERORGANIZATION, OwnerOrganization, 50);
|
||||||
|
|
||||||
RegOpenKeyEx(HKEY_LOCAL_MACHINE,
|
RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
||||||
_T("Software\\Microsoft\\Windows NT\\CurrentVersion"),
|
L"Software\\Microsoft\\Windows NT\\CurrentVersion",
|
||||||
0,
|
0,
|
||||||
KEY_ALL_ACCESS,
|
KEY_ALL_ACCESS,
|
||||||
&hKey);
|
&hKey);
|
||||||
/* FIXME: check error code */
|
/* FIXME: check error code */
|
||||||
|
|
||||||
RegSetValueEx(hKey,
|
RegSetValueExW(hKey,
|
||||||
_T("RegisteredOwner"),
|
L"RegisteredOwner",
|
||||||
0,
|
0,
|
||||||
REG_SZ,
|
REG_SZ,
|
||||||
OwnerName,
|
(LPBYTE)OwnerName,
|
||||||
(_tcslen(OwnerName) + 1) * sizeof(TCHAR));
|
(wcslen(OwnerName) + 1) * sizeof(WCHAR));
|
||||||
/* FIXME: check error code */
|
/* FIXME: check error code */
|
||||||
|
|
||||||
RegSetValueEx(hKey,
|
RegSetValueExW(hKey,
|
||||||
_T("RegisteredOrganization"),
|
L"RegisteredOrganization",
|
||||||
0,
|
0,
|
||||||
REG_SZ,
|
REG_SZ,
|
||||||
OwnerOrganization,
|
(LPBYTE)OwnerOrganization,
|
||||||
(_tcslen(OwnerOrganization) + 1) * sizeof(TCHAR));
|
(wcslen(OwnerOrganization) + 1) * sizeof(WCHAR));
|
||||||
/* FIXME: check error code */
|
/* FIXME: check error code */
|
||||||
|
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
|
@ -260,9 +259,9 @@ ComputerPageDlgProc(HWND hwndDlg,
|
||||||
WPARAM wParam,
|
WPARAM wParam,
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
TCHAR ComputerName[MAX_COMPUTERNAME_LENGTH + 1];
|
WCHAR ComputerName[MAX_COMPUTERNAME_LENGTH + 1];
|
||||||
TCHAR Password1[15];
|
WCHAR Password1[15];
|
||||||
TCHAR Password2[15];
|
WCHAR Password2[15];
|
||||||
DWORD Length;
|
DWORD Length;
|
||||||
LPNMHDR lpnm;
|
LPNMHDR lpnm;
|
||||||
|
|
||||||
|
@ -275,12 +274,12 @@ ComputerPageDlgProc(HWND hwndDlg,
|
||||||
GetComputerName(ComputerName, &Length);
|
GetComputerName(ComputerName, &Length);
|
||||||
|
|
||||||
/* Display current computer name */
|
/* Display current computer name */
|
||||||
SetDlgItemText(hwndDlg, IDC_COMPUTERNAME, ComputerName);
|
SetDlgItemTextW(hwndDlg, IDC_COMPUTERNAME, ComputerName);
|
||||||
|
|
||||||
/* Set text limits */
|
/* Set text limits */
|
||||||
SendDlgItemMessage(hwndDlg, IDC_COMPUTERNAME, EM_LIMITTEXT, 64, 0);
|
SendDlgItemMessageW(hwndDlg, IDC_COMPUTERNAME, EM_LIMITTEXT, 64, 0);
|
||||||
SendDlgItemMessage(hwndDlg, IDC_ADMINPASSWORD1, EM_LIMITTEXT, 14, 0);
|
SendDlgItemMessageW(hwndDlg, IDC_ADMINPASSWORD1, EM_LIMITTEXT, 14, 0);
|
||||||
SendDlgItemMessage(hwndDlg, IDC_ADMINPASSWORD2, EM_LIMITTEXT, 14, 0);
|
SendDlgItemMessageW(hwndDlg, IDC_ADMINPASSWORD2, EM_LIMITTEXT, 14, 0);
|
||||||
|
|
||||||
/* Set focus to computer name */
|
/* Set focus to computer name */
|
||||||
SetFocus(GetDlgItem(hwndDlg, IDC_COMPUTERNAME));
|
SetFocus(GetDlgItem(hwndDlg, IDC_COMPUTERNAME));
|
||||||
|
@ -302,10 +301,10 @@ ComputerPageDlgProc(HWND hwndDlg,
|
||||||
case PSN_WIZNEXT:
|
case PSN_WIZNEXT:
|
||||||
if (GetDlgItemText(hwndDlg, IDC_COMPUTERNAME, ComputerName, 64) == 0)
|
if (GetDlgItemText(hwndDlg, IDC_COMPUTERNAME, ComputerName, 64) == 0)
|
||||||
{
|
{
|
||||||
MessageBox(hwndDlg,
|
MessageBoxW(hwndDlg,
|
||||||
_T("Setup cannot continue until you enter the name of your computer."),
|
L"Setup cannot continue until you enter the name of your computer.",
|
||||||
_T("ReactOS Setup"),
|
L"ReactOS Setup",
|
||||||
MB_ICONERROR | MB_OK);
|
MB_ICONERROR | MB_OK);
|
||||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -314,23 +313,23 @@ ComputerPageDlgProc(HWND hwndDlg,
|
||||||
|
|
||||||
if (!SetComputerName(ComputerName))
|
if (!SetComputerName(ComputerName))
|
||||||
{
|
{
|
||||||
MessageBox(hwndDlg,
|
MessageBoxW(hwndDlg,
|
||||||
_T("Setup failed to set the computer name."),
|
L"Setup failed to set the computer name.",
|
||||||
_T("ReactOS Setup"),
|
L"ReactOS Setup",
|
||||||
MB_ICONERROR | MB_OK);
|
MB_ICONERROR | MB_OK);
|
||||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check admin passwords */
|
/* Check admin passwords */
|
||||||
GetDlgItemText(hwndDlg, IDC_ADMINPASSWORD1, Password1, 15);
|
GetDlgItemTextW(hwndDlg, IDC_ADMINPASSWORD1, Password1, 15);
|
||||||
GetDlgItemText(hwndDlg, IDC_ADMINPASSWORD2, Password2, 15);
|
GetDlgItemTextW(hwndDlg, IDC_ADMINPASSWORD2, Password2, 15);
|
||||||
if (_tcscmp(Password1, Password2))
|
if (wcscmp(Password1, Password2))
|
||||||
{
|
{
|
||||||
MessageBox(hwndDlg,
|
MessageBoxW(hwndDlg,
|
||||||
_T("The passwords you entered do not match. Please enter "\
|
L"The passwords you entered do not match. Please enter "\
|
||||||
"the desired password again."),
|
"the desired password again.",
|
||||||
_T("ReactOS Setup"),
|
L"ReactOS Setup",
|
||||||
MB_ICONERROR | MB_OK);
|
MB_ICONERROR | MB_OK);
|
||||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -412,37 +411,38 @@ SetKeyboardLayoutName(HWND hwnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
static VOID
|
static VOID
|
||||||
RunLocalePage(VOID)
|
RunInputLocalePage(HWND hwnd)
|
||||||
{
|
{
|
||||||
PROPSHEETPAGE psp;
|
PROPSHEETPAGEW psp;
|
||||||
PROPSHEETHEADER psh;
|
PROPSHEETHEADERW psh;
|
||||||
HMODULE hDll;
|
HMODULE hDll;
|
||||||
// TCHAR Caption[256];
|
// WCHAR Caption[256];
|
||||||
|
|
||||||
hDll = LoadLibraryW(L"intl.cpl");
|
hDll = LoadLibraryW(L"intl.cpl");
|
||||||
|
if (hDll == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
ZeroMemory(&psp, sizeof(PROPSHEETPAGE));
|
ZeroMemory(&psp, sizeof(PROPSHEETPAGEW));
|
||||||
psp.dwSize = sizeof(PROPSHEETPAGE);
|
psp.dwSize = sizeof(PROPSHEETPAGEW);
|
||||||
psp.dwFlags = PSP_DEFAULT;
|
psp.dwFlags = PSP_DEFAULT;
|
||||||
psp.hInstance = hDll;
|
psp.hInstance = hDll;
|
||||||
psp.pszTemplate = MAKEINTRESOURCE(IDD_LOCALEPAGE);
|
psp.pszTemplate = MAKEINTRESOURCEW(105); /* IDD_LOCALEPAGE from intl.cpl */
|
||||||
psp.pfnDlgProc = GetProcAddress(hDll, "LocalePageProc");
|
psp.pfnDlgProc = GetProcAddress(hDll, "LocalePageProc");
|
||||||
|
|
||||||
|
|
||||||
// LoadString(hDll, IDS_CPLNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
|
// LoadString(hDll, IDS_CPLNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
|
||||||
|
|
||||||
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
|
ZeroMemory(&psh, sizeof(PROPSHEETHEADERW));
|
||||||
psh.dwSize = sizeof(PROPSHEETHEADER);
|
psh.dwSize = sizeof(PROPSHEETHEADERW);
|
||||||
psh.dwFlags = PSH_PROPSHEETPAGE; // | PSH_PROPTITLE;
|
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE;
|
||||||
psh.hwndParent = NULL;
|
// psh.hwndParent = hwnd;
|
||||||
psh.hInstance = hDll;
|
// psh.hInstance = hDll;
|
||||||
// psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDC_CPLICON));
|
// psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDC_CPLICON));
|
||||||
// psh.pszCaption = Caption;
|
psh.pszCaption = L"Title"; //Caption;
|
||||||
psh.nPages = 1;
|
psh.nPages = 1;
|
||||||
psh.nStartPage = 0;
|
psh.nStartPage = 0;
|
||||||
psh.ppsp = &psp;
|
psh.ppsp = &psp;
|
||||||
|
|
||||||
PropertySheet(&psh);
|
PropertySheetW(&psh);
|
||||||
|
|
||||||
FreeLibrary(hDll);
|
FreeLibrary(hDll);
|
||||||
}
|
}
|
||||||
|
@ -480,7 +480,14 @@ LocalePageDlgProc(HWND hwndDlg,
|
||||||
{
|
{
|
||||||
case IDC_CUSTOMLOCALE:
|
case IDC_CUSTOMLOCALE:
|
||||||
{
|
{
|
||||||
RunLocalePage();
|
RunInputLocalePage(hwndDlg);
|
||||||
|
/* FIXME: Update input locale name */
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case IDC_CUSTOMLAYOUT:
|
||||||
|
{
|
||||||
|
// RunKeyboardLayoutControlPanel(hwndDlg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue