Author: gedmurphy
Date: Wed Aug 1 02:17:07 2007
New Revision: 28059
URL:
http://svn.reactos.org/svn/reactos?rev=28059&view=rev
Log:
convert timedate.cpl to unicode
Modified:
trunk/reactos/dll/cpl/timedate/clock.c
trunk/reactos/dll/cpl/timedate/dateandtime.c
trunk/reactos/dll/cpl/timedate/monthcal.c
trunk/reactos/dll/cpl/timedate/ntpclient.c
trunk/reactos/dll/cpl/timedate/timedate.c
trunk/reactos/dll/cpl/timedate/timedate.h
trunk/reactos/dll/cpl/timedate/timedate.rbuild
trunk/reactos/dll/cpl/timedate/timezone.c
Modified: trunk/reactos/dll/cpl/timedate/clock.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/clock.c?r…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/clock.c (original)
+++ trunk/reactos/dll/cpl/timedate/clock.c Wed Aug 1 02:17:07 2007
@@ -25,7 +25,7 @@
#define TWOPI (2 * 3.14159)
-static const TCHAR szClockWndClass[] = TEXT("ClockWndClass");
+static const WCHAR szClockWndClass[] = L"ClockWndClass";
static VOID
@@ -144,13 +144,13 @@
HDC hdc;
PAINTSTRUCT ps;
- pClockData = (PCLOCKDATA)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ pClockData = (PCLOCKDATA)GetWindowLongPtrW(hwnd, GWLP_USERDATA);
switch (uMsg)
{
case WM_CREATE:
pClockData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(CLOCKDATA));
- SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)pClockData);
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)pClockData);
pClockData->hGreyPen = CreatePen(PS_SOLID, 1, RGB(128, 128, 128));
pClockData->hGreyBrush = CreateSolidBrush(RGB(128, 128, 128));
@@ -206,10 +206,10 @@
break;
default:
- DefWindowProc(hwnd,
- uMsg,
- wParam,
- lParam);
+ DefWindowProcW(hwnd,
+ uMsg,
+ wParam,
+ lParam);
}
return TRUE;
@@ -219,22 +219,22 @@
BOOL
RegisterClockControl(VOID)
{
- WNDCLASSEX wc = {0};
-
- wc.cbSize = sizeof(WNDCLASSEX);
+ WNDCLASSEXW wc = {0};
+
+ wc.cbSize = sizeof(WNDCLASSEXW);
wc.lpfnWndProc = ClockWndProc;
wc.hInstance = hApplet;
- wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wc.hCursor = LoadCursorW(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
wc.lpszClassName = szClockWndClass;
- return RegisterClassEx(&wc) != (ATOM)0;
+ return RegisterClassExW(&wc) != (ATOM)0;
}
VOID
UnregisterClockControl(VOID)
{
- UnregisterClass(szClockWndClass,
- hApplet);
-}
+ UnregisterClassW(szClockWndClass,
+ hApplet);
+}
Modified: trunk/reactos/dll/cpl/timedate/dateandtime.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/dateandti…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/dateandtime.c (original)
+++ trunk/reactos/dll/cpl/timedate/dateandtime.c Wed Aug 1 02:17:07 2007
@@ -32,9 +32,9 @@
priv.PrivilegeCount = 1;
priv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
- if (LookupPrivilegeValue(NULL,
- SE_SYSTEMTIME_NAME,
- &priv.Privileges[0].Luid))
+ if (LookupPrivilegeValueW(NULL,
+ SE_SYSTEMTIME_NAME,
+ &priv.Privileges[0].Luid))
{
if (AdjustTokenPrivileges(hToken,
FALSE,
@@ -80,29 +80,29 @@
if (DateTime_GetSystemtime(GetDlgItem(hwnd,
IDC_TIMEPICKER),
&Time) == GDT_VALID &&
- SendMessage(GetDlgItem(hwnd,
- IDC_MONTHCALENDAR),
- MCCM_GETDATE,
- (WPARAM)&Time,
- 0))
+ SendMessageW(GetDlgItem(hwnd,
+ IDC_MONTHCALENDAR),
+ MCCM_GETDATE,
+ (WPARAM)&Time,
+ 0))
{
SystemSetLocalTime(&Time);
- SetWindowLong(hwnd,
- DWL_MSGRESULT,
- PSNRET_NOERROR);
-
- SendMessage(GetDlgItem(hwnd,
- IDC_MONTHCALENDAR),
- MCCM_RESET,
- (WPARAM)&Time,
- 0);
+ SetWindowLongPtrW(hwnd,
+ DWL_MSGRESULT,
+ PSNRET_NOERROR);
+
+ SendMessageW(GetDlgItem(hwnd,
+ IDC_MONTHCALENDAR),
+ MCCM_RESET,
+ (WPARAM)&Time,
+ 0);
/* Broadcast the time change message */
- SendMessage(HWND_BROADCAST,
- WM_TIMECHANGE,
- 0,
- 0);
+ SendMessageW(HWND_BROADCAST,
+ WM_TIMECHANGE,
+ 0,
+ 0);
}
}
@@ -155,10 +155,10 @@
GetLocalTime(&LocalDate);
- SendMessage(hCombo,
- CB_RESETCONTENT,
- 0,
- 0);
+ SendMessageW(hCombo,
+ CB_RESETCONTENT,
+ 0,
+ 0);
for (Month = 1;
Month <= 13;
@@ -170,23 +170,23 @@
sizeof(szBuf) / sizeof(szBuf[0]));
if (i > 1)
{
- i = (INT)SendMessage(hCombo,
- CB_ADDSTRING,
- 0,
- (LPARAM)szBuf);
+ i = (INT)SendMessageW(hCombo,
+ CB_ADDSTRING,
+ 0,
+ (LPARAM)szBuf);
if (i != CB_ERR)
{
- SendMessage(hCombo,
- CB_SETITEMDATA,
- (WPARAM)i,
- Month);
+ SendMessageW(hCombo,
+ CB_SETITEMDATA,
+ (WPARAM)i,
+ Month);
if (Month == (UINT)LocalDate.wMonth)
{
- SendMessage(hCombo,
- CB_SETCURSEL,
- (WPARAM)i,
- 0);
+ SendMessageW(hCombo,
+ CB_SETCURSEL,
+ (WPARAM)i,
+ 0);
}
}
}
@@ -200,16 +200,16 @@
INT i;
WORD Ret = (WORD)-1;
- i = (INT)SendMessage(hCombo,
- CB_GETCURSEL,
- 0,
- 0);
+ i = (INT)SendMessageW(hCombo,
+ CB_GETCURSEL,
+ 0,
+ 0);
if (i != CB_ERR)
{
- i = (INT)SendMessage(hCombo,
- CB_GETITEMDATA,
- (WPARAM)i,
- 0);
+ i = (INT)SendMessageW(hCombo,
+ CB_GETITEMDATA,
+ (WPARAM)i,
+ 0);
if (i >= 1 && i <= 13)
Ret = (WORD)i;
@@ -225,12 +225,12 @@
WORD Month,
WORD Year)
{
- SendMessage(hMonthCal,
- MCCM_SETDATE,
- MAKEWPARAM(Day,
- Month),
- MAKELPARAM(Year,
- 0));
+ SendMessageW(hMonthCal,
+ MCCM_SETDATE,
+ MAKEWPARAM(Day,
+ Month),
+ MAKELPARAM(Year,
+ 0));
}
static VOID
@@ -260,7 +260,7 @@
break;
}
- return CallWindowProc(pOldWndProc, hwnd, uMsg, wParam, lParam);
+ return CallWindowProcW(pOldWndProc, hwnd, uMsg, wParam, lParam);
}
/* Property page dialog callback */
@@ -282,14 +282,14 @@
SetTimer(hwndDlg, ID_TIMER, 1000, NULL);
/* set range and current year */
- SendMessage(GetDlgItem(hwndDlg, IDC_YEAR), UDM_SETRANGE, 0, MAKELONG ((short)
9999, (short) 1900));
- SendMessage(GetDlgItem(hwndDlg, IDC_YEAR), UDM_SETPOS, 0, MAKELONG( (short)
st.wYear, 0));
-
- pOldWndProc = (WNDPROC) SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TIMEPICKER),
GWL_WNDPROC, (INT_PTR) DTPProc);
+ SendMessageW(GetDlgItem(hwndDlg, IDC_YEAR), UDM_SETRANGE, 0, MAKELONG
((short) 9999, (short) 1900));
+ SendMessageW(GetDlgItem(hwndDlg, IDC_YEAR), UDM_SETPOS, 0, MAKELONG( (short)
st.wYear, 0));
+
+ pOldWndProc = (WNDPROC) SetWindowLongPtrW(GetDlgItem(hwndDlg,
IDC_TIMEPICKER), GWL_WNDPROC, (INT_PTR) DTPProc);
break;
case WM_TIMER:
- SendMessage(GetDlgItem(hwndDlg, IDC_TIMEPICKER), DTM_SETSYSTEMTIME,
GDT_VALID, (LPARAM) &st);
+ SendMessageW(GetDlgItem(hwndDlg, IDC_TIMEPICKER), DTM_SETSYSTEMTIME,
GDT_VALID, (LPARAM) &st);
break;
case WM_COMMAND:
@@ -326,7 +326,7 @@
{
SHORT wYear;
LPNMUPDOWN updown = (LPNMUPDOWN)lpnm;
- wYear = (SHORT)SendMessage(GetDlgItem(hwndDlg, IDC_YEAR),
UDM_GETPOS, 0, 0);
+ wYear = (SHORT)SendMessageW(GetDlgItem(hwndDlg, IDC_YEAR),
UDM_GETPOS, 0, 0);
/* Enable the 'Apply' button */
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
ChangeMonthCalDate(GetDlgItem(hwndDlg,
@@ -347,7 +347,7 @@
KillTimer(hwndDlg, ID_TIMER);
/* Tell the clock to stop ticking */
- SendDlgItemMessage(hwndDlg, IDC_CLOCKWND, CLM_SETTIME,
+ SendDlgItemMessageW(hwndDlg, IDC_CLOCKWND, CLM_SETTIME,
0,
(LPARAM)&((LPNMDATETIMECHANGE)lpnm)->st);
/* Enable the 'Apply' button */
@@ -390,11 +390,11 @@
case WM_TIMECHANGE:
/* FIXME - we don't get this message as we're not a top-level
window... */
- SendMessage(GetDlgItem(hwndDlg,
- IDC_MONTHCALENDAR),
- MCCM_RESET,
- 0,
- 0);
+ SendMessageW(GetDlgItem(hwndDlg,
+ IDC_MONTHCALENDAR),
+ MCCM_RESET,
+ 0,
+ 0);
break;
case WM_DESTROY:
Modified: trunk/reactos/dll/cpl/timedate/monthcal.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/monthcal.…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/monthcal.c (original)
+++ trunk/reactos/dll/cpl/timedate/monthcal.c Wed Aug 1 02:17:07 2007
@@ -9,7 +9,7 @@
#include <timedate.h>
-static const TCHAR szMonthCalWndClass[] = TEXT("MonthCalWnd");
+static const WCHAR szMonthCalWndClass[] = L"MonthCalWnd";
#define MONTHCAL_HEADERBG COLOR_INACTIVECAPTION
#define MONTHCAL_HEADERFG COLOR_INACTIVECAPTIONTEXT
@@ -35,7 +35,7 @@
WORD Year;
WORD FirstDayOfWeek;
BYTE Days[6][7];
- TCHAR Week[7];
+ WCHAR Week[7];
SIZE CellSize;
SIZE ClientSize;
@@ -62,14 +62,14 @@
LPNMHDR pnmh = (LPNMHDR)data;
pnmh->hwndFrom = infoPtr->hSelf;
- pnmh->idFrom = GetWindowLongPtr(infoPtr->hSelf,
- GWLP_ID);
+ pnmh->idFrom = GetWindowLongPtrW(infoPtr->hSelf,
+ GWLP_ID);
pnmh->code = code;
- Ret = SendMessage(infoPtr->hNotify,
- WM_NOTIFY,
- (WPARAM)pnmh->idFrom,
- (LPARAM)pnmh);
+ Ret = SendMessageW(infoPtr->hNotify,
+ WM_NOTIFY,
+ (WPARAM)pnmh->idFrom,
+ (LPARAM)pnmh);
}
return Ret;
@@ -112,13 +112,13 @@
static WORD
MonthCalFirstDayOfWeek(VOID)
{
- TCHAR szBuf[2] = {0};
+ WCHAR szBuf[2] = {0};
WORD Ret = 0;
- if (GetLocaleInfo(LOCALE_USER_DEFAULT,
- LOCALE_IFIRSTDAYOFWEEK,
- szBuf,
- sizeof(szBuf) / sizeof(szBuf[0])) != 0)
+ if (GetLocaleInfoW(LOCALE_USER_DEFAULT,
+ LOCALE_IFIRSTDAYOFWEEK,
+ szBuf,
+ sizeof(szBuf) / sizeof(szBuf[0])) != 0)
{
Ret = (WORD)(szBuf[0] - TEXT('0'));
}
@@ -234,14 +234,14 @@
static VOID
MonthCalReload(IN PMONTHCALWND infoPtr)
{
- TCHAR szBuf[64];
+ WCHAR szBuf[64];
UINT i;
- infoPtr->UIState = (DWORD)SendMessage(GetAncestor(infoPtr->hSelf,
- GA_PARENT),
- WM_QUERYUISTATE,
- 0,
- 0);
+ infoPtr->UIState = (DWORD)SendMessageW(GetAncestor(infoPtr->hSelf,
+ GA_PARENT),
+ WM_QUERYUISTATE,
+ 0,
+ 0);
/* cache the configuration */
infoPtr->FirstDayOfWeek = MonthCalFirstDayOfWeek();
@@ -251,11 +251,11 @@
for (i = 0; i < 7; i++)
{
- if (GetLocaleInfo(LOCALE_USER_DEFAULT,
- LOCALE_SABBREVDAYNAME1 +
- ((i + infoPtr->FirstDayOfWeek) % 7),
- szBuf,
- sizeof(szBuf) / sizeof(szBuf[0])) != 0)
+ if (GetLocaleInfoW(LOCALE_USER_DEFAULT,
+ LOCALE_SABBREVDAYNAME1 +
+ ((i + infoPtr->FirstDayOfWeek) % 7),
+ szBuf,
+ sizeof(szBuf) / sizeof(szBuf[0])) != 0)
{
infoPtr->Week[i] = szBuf[0];
}
@@ -489,11 +489,11 @@
rcCell.right = rcCell.left + infoPtr->CellSize.cx;
/* write the first letter of each weekday */
- DrawText(hDC,
- &infoPtr->Week[x],
- 1,
- &rcCell,
- DT_SINGLELINE | DT_NOPREFIX | DT_CENTER | DT_VCENTER);
+ DrawTextW(hDC,
+ &infoPtr->Week[x],
+ 1,
+ &rcCell,
+ DT_SINGLELINE | DT_NOPREFIX | DT_CENTER | DT_VCENTER);
}
SetTextColor(hDC,
@@ -519,19 +519,19 @@
/* write the day number */
if (Day != 0 && Day < 100)
{
- TCHAR szDay[3];
+ WCHAR szDay[3];
INT szDayLen;
RECT rcText;
SIZE TextSize;
- szDayLen = _stprintf(szDay,
- TEXT("%lu"),
+ szDayLen = swprintf(szDay,
+ L"%lu",
Day);
- if (GetTextExtentPoint32(hDC,
- szDay,
- szDayLen,
- &TextSize))
+ if (GetTextExtentPoint32W(hDC,
+ szDay,
+ szDayLen,
+ &TextSize))
{
RECT rcHighlight = {0};
@@ -566,11 +566,11 @@
crOldText = CLR_INVALID;
}
- TextOut(hDC,
- rcText.left,
- rcText.top,
- szDay,
- szDayLen);
+ TextOutW(hDC,
+ rcText.left,
+ rcText.top,
+ szDay,
+ szDayLen);
if (Day == infoPtr->Day && crOldText != CLR_INVALID)
{
@@ -658,8 +658,8 @@
PMONTHCALWND infoPtr;
LRESULT Ret = 0;
- infoPtr = (PMONTHCALWND)GetWindowLongPtr(hwnd,
- 0);
+ infoPtr = (PMONTHCALWND)GetWindowLongPtrW(hwnd,
+ 0);
if (infoPtr == NULL && uMsg != WM_CREATE)
{
@@ -811,12 +811,12 @@
case VK_TAB:
{
/* change the UI status */
- SendMessage(GetAncestor(hwnd,
- GA_PARENT),
- WM_CHANGEUISTATE,
- MAKEWPARAM(UIS_INITIALIZE,
- 0),
- 0);
+ SendMessageW(GetAncestor(hwnd,
+ GA_PARENT),
+ WM_CHANGEUISTATE,
+ MAKEWPARAM(UIS_INITIALIZE,
+ 0),
+ 0);
break;
}
}
@@ -1013,9 +1013,9 @@
break;
}
- SetWindowLongPtr(hwnd,
- 0,
- (LONG_PTR)infoPtr);
+ SetWindowLongPtrW(hwnd,
+ 0,
+ (LONG_PTR)infoPtr);
ZeroMemory(infoPtr,
sizeof(MONTHCALWND));
@@ -1036,19 +1036,19 @@
HeapFree(GetProcessHeap(),
0,
infoPtr);
- SetWindowLongPtr(hwnd,
- 0,
- (DWORD_PTR)NULL);
+ SetWindowLongPtrW(hwnd,
+ 0,
+ (DWORD_PTR)NULL);
break;
}
default:
{
HandleDefaultMessage:
- Ret = DefWindowProc(hwnd,
- uMsg,
- wParam,
- lParam);
+ Ret = DefWindowProcW(hwnd,
+ uMsg,
+ wParam,
+ lParam);
break;
}
}
@@ -1059,23 +1059,23 @@
BOOL
RegisterMonthCalControl(IN HINSTANCE hInstance)
{
- WNDCLASS wc = {0};
+ WNDCLASSW wc = {0};
wc.style = CS_DBLCLKS;
wc.lpfnWndProc = MonthCalWndProc;
wc.cbWndExtra = sizeof(PMONTHCALWND);
wc.hInstance = hInstance;
- wc.hCursor = LoadCursor(NULL,
- (LPWSTR)IDC_ARROW);
+ wc.hCursor = LoadCursorW(NULL,
+ (LPWSTR)IDC_ARROW);
wc.hbrBackground = (HBRUSH)(MONTHCAL_CTRLBG + 1);
wc.lpszClassName = szMonthCalWndClass;
- return RegisterClass(&wc) != 0;
+ return RegisterClassW(&wc) != 0;
}
VOID
UnregisterMonthCalControl(IN HINSTANCE hInstance)
{
- UnregisterClass(szMonthCalWndClass,
- hInstance);
-}
+ UnregisterClassW(szMonthCalWndClass,
+ hInstance);
+}
Modified: trunk/reactos/dll/cpl/timedate/ntpclient.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/ntpclient…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/ntpclient.c (original)
+++ trunk/reactos/dll/cpl/timedate/ntpclient.c Wed Aug 1 02:17:07 2007
@@ -23,7 +23,7 @@
static BOOL
InitConnection(PINFO pInfo,
- LPSTR lpAddress)
+ LPSTR lpAddress)
{
WSADATA wsaData;
HOSTENT *he;
Modified: trunk/reactos/dll/cpl/timedate/timedate.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/timedate.…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/timedate.c (original)
+++ trunk/reactos/dll/cpl/timedate/timedate.c Wed Aug 1 02:17:07 2007
@@ -30,23 +30,23 @@
{
LPVOID lpMsgBuf;
#if DBG
- TCHAR szMsg[255];
+ WCHAR szMsg[255];
#endif
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- dwErrorCode,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) &lpMsgBuf,
- 0,
- NULL );
+ FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ dwErrorCode,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPWSTR) &lpMsgBuf,
+ 0,
+ NULL );
#if DBG
- if (_stprintf(szMsg, _T("%hs:%d: %s"), file, line, lpMsgBuf))
+ if (swprintf(szMsg, L"%hs:%d: %s", file, line, lpMsgBuf))
{
- MessageBox(NULL, szMsg, NULL, MB_OK | MB_ICONERROR);
+ MessageBoxW(NULL, szMsg, NULL, MB_OK | MB_ICONERROR);
}
#else
MessageBox(NULL, lpMsgBuf, NULL, MB_OK | MB_ICONERROR);
@@ -57,13 +57,13 @@
static VOID
-InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc)
+InitPropSheetPage(PROPSHEETPAGEW *psp, WORD idDlg, DLGPROC DlgProc)
{
- ZeroMemory(psp, sizeof(PROPSHEETPAGE));
- psp->dwSize = sizeof(PROPSHEETPAGE);
+ ZeroMemory(psp, sizeof(PROPSHEETPAGEW));
+ psp->dwSize = sizeof(PROPSHEETPAGEW);
psp->dwFlags = PSP_DEFAULT;
psp->hInstance = hApplet;
- psp->pszTemplate = MAKEINTRESOURCE(idDlg);
+ psp->pszTemplate = MAKEINTRESOURCEW(idDlg);
psp->pfnDlgProc = DlgProc;
}
@@ -72,8 +72,8 @@
Applet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
{
PROPSHEETHEADER psh;
- PROPSHEETPAGE psp[3];
- TCHAR Caption[256];
+ PROPSHEETPAGEW psp[3];
+ WCHAR Caption[256];
LONG Ret = 0;
UNREFERENCED_PARAMETER(hwnd);
@@ -84,16 +84,16 @@
if (RegisterMonthCalControl(hApplet) &&
RegisterClockControl())
{
- LoadString(hApplet, IDS_CPLNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
+ LoadStringW(hApplet, IDS_CPLNAME, Caption, sizeof(Caption) / sizeof(WCHAR));
- ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
- psh.dwSize = sizeof(PROPSHEETHEADER);
+ ZeroMemory(&psh, sizeof(PROPSHEETHEADERW));
+ psh.dwSize = sizeof(PROPSHEETHEADERW);
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE;
psh.hwndParent = NULL;
psh.hInstance = hApplet;
- psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDC_CPLICON));
+ psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCEW(IDC_CPLICON));
psh.pszCaption = Caption;
- psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
+ psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGEW);
psh.nStartPage = 0;
psh.ppsp = psp;
@@ -101,7 +101,7 @@
InitPropSheetPage(&psp[1], IDD_TIMEZONEPAGE, (DLGPROC) TimeZonePageProc);
InitPropSheetPage(&psp[2], IDD_INETTIMEPAGE, (DLGPROC) InetTimePageProc);
- Ret = (LONG)(PropertySheet(&psh) != -1);
+ Ret = (LONG)(PropertySheetW(&psh) != -1);
UnregisterMonthCalControl(hApplet);
UnregisterClockControl();
Modified: trunk/reactos/dll/cpl/timedate/timedate.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/timedate.…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/timedate.h (original)
+++ trunk/reactos/dll/cpl/timedate/timedate.h Wed Aug 1 02:17:07 2007
@@ -3,7 +3,6 @@
#include <windows.h>
#include <windowsx.h>
-#include <tchar.h>
#include <stdio.h>
#include <math.h>
#include <commctrl.h>
Modified: trunk/reactos/dll/cpl/timedate/timedate.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/timedate.…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/timedate.rbuild (original)
+++ trunk/reactos/dll/cpl/timedate/timedate.rbuild Wed Aug 1 02:17:07 2007
@@ -1,8 +1,6 @@
-<module name="timedate" type="win32dll" extension=".cpl"
baseaddress="${BASEADDRESS_TIMEDATE}" installbase="system32"
installname="timedate.cpl">
+<module name="timedate" type="win32dll" extension=".cpl"
baseaddress="${BASEADDRESS_TIMEDATE}" installbase="system32"
installname="timedate.cpl" unicode="yes">
<importlibrary definition="timedate.def" />
<include base="timedate">.</include>
- <define name="UNICODE" />
- <define name="_UNICODE" />
<define name="__REACTOS__" />
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x600</define>
Modified: trunk/reactos/dll/cpl/timedate/timezone.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/timezone.…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/timezone.c (original)
+++ trunk/reactos/dll/cpl/timedate/timezone.c Wed Aug 1 02:17:07 2007
@@ -59,7 +59,7 @@
static VOID
CreateTimeZoneList(VOID)
{
- TCHAR szKeyName[256];
+ WCHAR szKeyName[256];
DWORD dwIndex;
DWORD dwNameSize;
DWORD dwValueSize;
@@ -70,33 +70,33 @@
PTIMEZONE_ENTRY Entry;
PTIMEZONE_ENTRY Current;
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
- _T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time
Zones"),
- 0,
- KEY_ENUMERATE_SUB_KEYS,
- &hZonesKey))
+ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+ L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time
Zones",
+ 0,
+ KEY_ENUMERATE_SUB_KEYS,
+ &hZonesKey))
return;
dwIndex = 0;
while (TRUE)
{
- dwNameSize = 256 * sizeof(TCHAR);
- lError = RegEnumKeyEx(hZonesKey,
- dwIndex,
- szKeyName,
- &dwNameSize,
- NULL,
- NULL,
- NULL,
- NULL);
+ dwNameSize = 256 * sizeof(WCHAR);
+ lError = RegEnumKeyExW(hZonesKey,
+ dwIndex,
+ szKeyName,
+ &dwNameSize,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
if (lError != ERROR_SUCCESS && lError != ERROR_MORE_DATA)
break;
- if (RegOpenKeyEx(hZonesKey,
- szKeyName,
- 0,
- KEY_QUERY_VALUE,
- &hZoneKey))
+ if (RegOpenKeyEx (hZonesKey,
+ szKeyName,
+ 0,
+ KEY_QUERY_VALUE,
+ &hZoneKey))
break;
Entry = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(TIMEZONE_ENTRY));
@@ -106,61 +106,61 @@
break;
}
- dwValueSize = 64 * sizeof(TCHAR);
- if (RegQueryValueEx(hZoneKey,
- _T("Display"),
- NULL,
- NULL,
- (LPBYTE)&Entry->Description,
- &dwValueSize))
- {
- RegCloseKey(hZoneKey);
- break;
- }
-
- dwValueSize = 33 * sizeof(TCHAR);
- if (RegQueryValueEx(hZoneKey,
- _T("Std"),
- NULL,
- NULL,
- (LPBYTE)&Entry->StandardName,
- &dwValueSize))
- {
- RegCloseKey(hZoneKey);
- break;
- }
-
- dwValueSize = 33 * sizeof(TCHAR);
- if (RegQueryValueEx(hZoneKey,
- _T("Dlt"),
- NULL,
- NULL,
- (LPBYTE)&Entry->DaylightName,
- &dwValueSize))
+ dwValueSize = 64 * sizeof(WCHAR);
+ if (RegQueryValueExW(hZoneKey,
+ L"Display",
+ NULL,
+ NULL,
+ (LPBYTE)&Entry->Description,
+ &dwValueSize))
+ {
+ RegCloseKey(hZoneKey);
+ break;
+ }
+
+ dwValueSize = 33 * sizeof(WCHAR);
+ if (RegQueryValueExW(hZoneKey,
+ L"Std",
+ NULL,
+ NULL,
+ (LPBYTE)&Entry->StandardName,
+ &dwValueSize))
+ {
+ RegCloseKey(hZoneKey);
+ break;
+ }
+
+ dwValueSize = 33 * sizeof(WCHAR);
+ if (RegQueryValueExW(hZoneKey,
+ L"Dlt",
+ NULL,
+ NULL,
+ (LPBYTE)&Entry->DaylightName,
+ &dwValueSize))
{
RegCloseKey(hZoneKey);
break;
}
dwValueSize = sizeof(DWORD);
- if (RegQueryValueEx(hZoneKey,
- _T("Index"),
- NULL,
- NULL,
- (LPBYTE)&Entry->Index,
- &dwValueSize))
+ if (RegQueryValueExW(hZoneKey,
+ L"Index",
+ NULL,
+ NULL,
+ (LPBYTE)&Entry->Index,
+ &dwValueSize))
{
RegCloseKey(hZoneKey);
break;
}
dwValueSize = sizeof(TZ_INFO);
- if (RegQueryValueEx(hZoneKey,
- _T("TZI"),
- NULL,
- NULL,
- (LPBYTE)&Entry->TimezoneInfo,
- &dwValueSize))
+ if (RegQueryValueExW(hZoneKey,
+ L"TZI",
+ NULL,
+ NULL,
+ (LPBYTE)&Entry->TimezoneInfo,
+ &dwValueSize))
{
RegCloseKey(hZoneKey);
break;
@@ -252,22 +252,22 @@
Entry = TimeZoneListHead;
while (Entry != NULL)
{
- SendMessage(hwnd,
- CB_ADDSTRING,
- 0,
- (LPARAM)Entry->Description);
-
- if (!_tcscmp(Entry->StandardName, TimeZoneInfo.StandardName))
+ SendMessageW(hwnd,
+ CB_ADDSTRING,
+ 0,
+ (LPARAM)Entry->Description);
+
+ if (!wcscmp(Entry->StandardName, TimeZoneInfo.StandardName))
dwIndex = i;
i++;
Entry = Entry->Next;
}
- SendMessage(hwnd,
- CB_SETCURSEL,
- (WPARAM)dwIndex,
- 0);
+ SendMessageW(hwnd,
+ CB_SETCURSEL,
+ (WPARAM)dwIndex,
+ 0);
}
@@ -279,10 +279,10 @@
DWORD dwIndex;
DWORD i;
- dwIndex = (DWORD)SendMessage(hwnd,
- CB_GETCURSEL,
- 0,
- 0);
+ dwIndex = (DWORD)SendMessageW(hwnd,
+ CB_GETCURSEL,
+ 0,
+ 0);
i = 0;
Entry = TimeZoneListHead;
@@ -295,9 +295,9 @@
Entry = Entry->Next;
}
- _tcscpy(TimeZoneInformation.StandardName,
+ wcscpy(TimeZoneInformation.StandardName,
Entry->StandardName);
- _tcscpy(TimeZoneInformation.DaylightName,
+ wcscpy(TimeZoneInformation.DaylightName,
Entry->DaylightName);
TimeZoneInformation.Bias = Entry->TimezoneInfo.Bias;
@@ -321,28 +321,28 @@
{
HKEY hKey;
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
-
_T("SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation"),
- 0,
- KEY_QUERY_VALUE,
- &hKey))
+ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+
L"SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation",
+ 0,
+ KEY_QUERY_VALUE,
+ &hKey))
return;
/* if the call fails (non zero), the reg value isn't available,
* which means it shouldn't be disabled, so we should check the button.
*/
- if (RegQueryValueEx(hKey,
- _T("DisableAutoDaylightTimeSet"),
- NULL,
- NULL,
- NULL,
- NULL))
- {
- SendMessage(hwnd, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
+ if (RegQueryValueExW(hKey,
+ L"DisableAutoDaylightTimeSet",
+ NULL,
+ NULL,
+ NULL,
+ NULL))
+ {
+ SendMessageW(hwnd, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
}
else
{
- SendMessage(hwnd, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
+ SendMessageW(hwnd, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
}
RegCloseKey(hKey);
@@ -355,26 +355,26 @@
HKEY hKey;
DWORD dwValue = 1;
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
-
_T("SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation"),
- 0,
- KEY_SET_VALUE,
- &hKey))
+ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+
L"SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation",
+ 0,
+ KEY_SET_VALUE,
+ &hKey))
return;
- if (SendMessage(hwnd, BM_GETCHECK, 0, 0) == BST_UNCHECKED)
- {
- RegSetValueEx(hKey,
- _T("DisableAutoDaylightTimeSet"),
- 0,
- REG_DWORD,
- (LPBYTE)&dwValue,
- sizeof(DWORD));
+ if (SendMessageW(hwnd, BM_GETCHECK, 0, 0) == BST_UNCHECKED)
+ {
+ RegSetValueExW(hKey,
+ L"DisableAutoDaylightTimeSet",
+ 0,
+ REG_DWORD,
+ (LPBYTE)&dwValue,
+ sizeof(DWORD));
}
else
{
- RegDeleteValue(hKey,
- _T("DisableAutoDaylightTimeSet"));
+ RegDeleteValueW(hKey,
+ L"DisableAutoDaylightTimeSet");
}
RegCloseKey(hKey);
@@ -396,10 +396,10 @@
CreateTimeZoneList();
ShowTimeZoneList(GetDlgItem(hwndDlg, IDC_TIMEZONELIST));
GetAutoDaylightInfo(GetDlgItem(hwndDlg, IDC_AUTODAYLIGHT));
- hBitmap = LoadImage(hApplet, MAKEINTRESOURCE(IDC_WORLD), IMAGE_BITMAP, 0, 0,
LR_DEFAULTCOLOR);
+ hBitmap = LoadImageW(hApplet, MAKEINTRESOURCEW(IDC_WORLD), IMAGE_BITMAP, 0,
0, LR_DEFAULTCOLOR);
if (hBitmap != NULL)
{
- GetObject(hBitmap, sizeof(BITMAP), &bitmap);
+ GetObjectW(hBitmap, sizeof(BITMAP), &bitmap);
cxSource = bitmap.bmWidth;
cySource = bitmap.bmHeight;