Author: janderwald
Date: Fri Jun 23 21:14:29 2006
New Revision: 22527
URL:
http://svn.reactos.org/svn/reactos?rev=22527&view=rev
Log:
fix TCHAR/WCHAR mixtures
spotted by Christoph_vW
Modified:
trunk/reactos/dll/cpl/powercfg/advanced.c
trunk/reactos/dll/cpl/powercfg/alarms.c
trunk/reactos/dll/cpl/powercfg/hibernate.c
trunk/reactos/dll/cpl/powercfg/powercfg.c
trunk/reactos/dll/cpl/powercfg/powershemes.c
Modified: trunk/reactos/dll/cpl/powercfg/advanced.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/powercfg/advanced.…
==============================================================================
--- trunk/reactos/dll/cpl/powercfg/advanced.c (original)
+++ trunk/reactos/dll/cpl/powercfg/advanced.c Fri Jun 23 21:14:29 2006
@@ -137,7 +137,7 @@
// to PowerActionNone and sets the Flags & EventCode
- swprintf(szBuffer, L"Action: %x EventCode %x Flags %x",Policy->Action,
Policy->EventCode, Policy->Flags);
+ _stprintf(szBuffer, L"Action: %x EventCode %x Flags %x",Policy->Action,
Policy->EventCode, Policy->Flags);
MessageBoxW(NULL, szBuffer, NULL, MB_OK);
*/
Modified: trunk/reactos/dll/cpl/powercfg/alarms.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/powercfg/alarms.c?…
==============================================================================
--- trunk/reactos/dll/cpl/powercfg/alarms.c (original)
+++ trunk/reactos/dll/cpl/powercfg/alarms.c Fri Jun 23 21:14:29 2006
@@ -14,6 +14,7 @@
#include <commctrl.h>
#include <cpl.h>
#include <stdio.h>
+#include <tchar.h>
#include "resource.h"
#include "powercfg.h"
@@ -69,19 +70,19 @@
if (LoadString(hApplet, IDS_PROCENT, szTemp, MAX_PATH))
{
- swprintf(szBatteryLevel,szTemp,gGPP.user.DischargePolicy[DISCHARGE_POLICY_LOW].BatteryLevel);
+ _stprintf(szBatteryLevel,szTemp,gGPP.user.DischargePolicy[DISCHARGE_POLICY_LOW].BatteryLevel);
SetWindowText(GetDlgItem(hwndDlg, IDC_ALARMVALUE1),szBatteryLevel);
}
- SendMessageW(GetDlgItem(hwndDlg, IDC_ALARMBAR1),
+ SendMessage(GetDlgItem(hwndDlg, IDC_ALARMBAR1),
TBM_SETRANGE,
(WPARAM)TRUE,
(LPARAM)MAKELONG(0, 100));
- SendMessageW(GetDlgItem(hwndDlg, IDC_ALARMBAR1),
+ SendMessage(GetDlgItem(hwndDlg, IDC_ALARMBAR1),
TBM_SETTICFREQ,
(WPARAM)TRUE,
(LPARAM)20);
- SendMessageW(GetDlgItem(hwndDlg, IDC_ALARMBAR1),
+ SendMessage(GetDlgItem(hwndDlg, IDC_ALARMBAR1),
TBM_SETPOS,
(WPARAM)TRUE,
(LPARAM)gGPP.user.DischargePolicy[DISCHARGE_POLICY_LOW].BatteryLevel);
@@ -100,14 +101,14 @@
{
if (LoadString(hApplet, IDS_SOUND, szSound, MAX_PATH) && LoadString(hApplet,
IDS_TEXT, szText, MAX_PATH))
{
- swprintf(szMessage,L"%s, %s",szSound,szText);
+ _stprintf(szMessage,_T("%s, %s"),szSound,szText);
}
}
else
{
if (LoadString(hApplet, IDS_TEXT, szText, MAX_PATH))
{
- swprintf(szMessage,L"%s",szText);
+ _stprintf(szMessage,_T("%s"),szText);
}
}
}
@@ -117,7 +118,7 @@
{
if (LoadString(hApplet, IDS_SOUND, szSound, MAX_PATH))
{
- swprintf(szMessage,L"%s",szSound);
+ _stprintf(szMessage,_T("%s"),szSound);
}
}
}
@@ -131,28 +132,28 @@
}
if (gGPP.user.DischargePolicy[DISCHARGE_POLICY_CRITICAL].Enable)
{
- SendMessageW(GetDlgItem(hwndDlg, IDC_ALARM2),
+ SendMessage(GetDlgItem(hwndDlg, IDC_ALARM2),
BM_SETCHECK,
(gGPP.user.DischargePolicy[DISCHARGE_POLICY_CRITICAL].Enable ? BST_CHECKED :
BST_UNCHECKED),
(LPARAM)0);
if (LoadString(hApplet, IDS_PROCENT, szTemp, MAX_PATH))
{
- swprintf(szBatteryLevel,szTemp,gGPP.user.DischargePolicy[DISCHARGE_POLICY_CRITICAL].BatteryLevel);
+ _stprintf(szBatteryLevel,szTemp,gGPP.user.DischargePolicy[DISCHARGE_POLICY_CRITICAL].BatteryLevel);
SetWindowText(GetDlgItem(hwndDlg, IDC_ALARMVALUE2),szBatteryLevel);
}
- SendMessageW(GetDlgItem(hwndDlg, IDC_ALARMBAR2),
+ SendMessage(GetDlgItem(hwndDlg, IDC_ALARMBAR2),
TBM_SETRANGE,
(WPARAM)TRUE,
(LPARAM)MAKELONG(0, 100));
- SendMessageW(GetDlgItem(hwndDlg, IDC_ALARMBAR2),
+ SendMessage(GetDlgItem(hwndDlg, IDC_ALARMBAR2),
TBM_SETPOS,
(WPARAM)TRUE,
(LPARAM)gGPP.user.DischargePolicy[DISCHARGE_POLICY_CRITICAL].BatteryLevel);
if (LoadString(hApplet,
gGPP.user.DischargePolicy[DISCHARGE_POLICY_CRITICAL].PowerPolicy.Action+IDS_PowerActionNone1,
szAction, MAX_PATH))
{
- SendMessageW(GetDlgItem(hwndDlg, IDC_ALARMAKTION2),
+ SendMessage(GetDlgItem(hwndDlg, IDC_ALARMAKTION2),
WM_SETTEXT,
(WPARAM)0,
(LPARAM)szAction);
@@ -167,14 +168,14 @@
{
if (LoadString(hApplet, IDS_TEXT, szText, MAX_PATH) && LoadString(hApplet,
IDS_SOUND, szSound, MAX_PATH))
{
- swprintf(szMessage,L"%s, %s",szSound,szText);
+ _stprintf(szMessage,_T("%s, %s"),szSound,szText);
}
}
else
{
if (LoadString(hApplet, IDS_TEXT, szText, MAX_PATH))
{
- swprintf(szMessage,L"%s",szText);
+ _stprintf(szMessage,_T("%s"),szText);
}
}
}
@@ -184,7 +185,7 @@
{
if (LoadString(hApplet, IDS_SOUND, szSound, MAX_PATH))
{
- swprintf(szMessage,L"%s",szSound);
+ _stprintf(szMessage,_T("%s"),szSound);
}
}
}
Modified: trunk/reactos/dll/cpl/powercfg/hibernate.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/powercfg/hibernate…
==============================================================================
--- trunk/reactos/dll/cpl/powercfg/hibernate.c (original)
+++ trunk/reactos/dll/cpl/powercfg/hibernate.c Fri Jun 23 21:14:29 2006
@@ -15,6 +15,7 @@
#include <commctrl.h>
#include <cpl.h>
#include <stdio.h>
+#include <tchar.h>
#include "resource.h"
#include "powercfg.h"
@@ -65,22 +66,22 @@
{
SYSTEM_POWER_CAPABILITIES PowerCaps;
MEMORYSTATUSEX msex;
- WCHAR szSize[MAX_PATH];
- WCHAR szTemp[MAX_PATH];
+ TCHAR szSize[MAX_PATH];
+ TCHAR szTemp[MAX_PATH];
ULARGE_INTEGER FreeBytesAvailable, TotalNumberOfBytes, TotalNumberOfFreeBytes;
if (GetPwrCapabilities(&PowerCaps))
{
if (PowerCaps.HiberFilePresent)
{
- SendMessageW(GetDlgItem(hwndDlg, IDC_HIBERNATEFILE),
+ SendMessage(GetDlgItem(hwndDlg, IDC_HIBERNATEFILE),
BM_SETCHECK,
(WPARAM)BST_CHECKED,
(LPARAM)0);
}
else
{
- SendMessageW(GetDlgItem(hwndDlg, IDC_HIBERNATEFILE),
+ SendMessage(GetDlgItem(hwndDlg, IDC_HIBERNATEFILE),
BM_SETCHECK,
(WPARAM)BST_UNCHECKED,
(LPARAM)0);
@@ -106,7 +107,7 @@
{
if (LoadString(hApplet, IDS_SIZEMB, szTemp, MAX_PATH))
{
- swprintf(szSize,szTemp,TotalNumberOfFreeBytes.QuadPart / 0x100000);
+ _stprintf(szSize,szTemp,TotalNumberOfFreeBytes.QuadPart / 0x100000);
SetWindowText(GetDlgItem(hwndDlg, IDC_FREESPACE),szSize);
}
}
@@ -114,7 +115,7 @@
{
if (LoadString(hApplet, IDS_SIZEBYTS, szTemp, MAX_PATH))
{
- swprintf(szSize,szTemp,TotalNumberOfFreeBytes.QuadPart);
+ _stprintf(szSize,szTemp,TotalNumberOfFreeBytes.QuadPart);
SetWindowText(GetDlgItem(hwndDlg, IDC_FREESPACE),szSize);
}
}
@@ -123,7 +124,7 @@
{
if (LoadString(hApplet, IDS_SIZEMB, szTemp, MAX_PATH))
{
- swprintf(szSize,szTemp,msex.ullTotalPhys/0x100000);
+ _stprintf(szSize,szTemp,msex.ullTotalPhys/0x100000);
SetWindowText(GetDlgItem(hwndDlg, IDC_SPACEFORHIBERNATEFILE),szSize);
}
}
@@ -131,7 +132,7 @@
{
if (LoadString(hApplet, IDS_SIZEBYTS, szTemp, MAX_PATH))
{
- swprintf(szSize,szTemp,msex.ullTotalPhys);
+ _stprintf(szSize,szTemp,msex.ullTotalPhys);
SetWindowText(GetDlgItem(hwndDlg, IDC_SPACEFORHIBERNATEFILE),szSize);
}
}
@@ -152,7 +153,7 @@
{
BOOLEAN bHibernate;
- bHibernate = (BOOLEAN)SendMessageW(GetDlgItem(hwndDlg, IDC_HIBERNATEFILE),
+ bHibernate = (BOOLEAN)SendMessage(GetDlgItem(hwndDlg, IDC_HIBERNATEFILE),
BM_GETCHECK,
(WPARAM)0,
(LPARAM)0);
Modified: trunk/reactos/dll/cpl/powercfg/powercfg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/powercfg/powercfg.…
==============================================================================
--- trunk/reactos/dll/cpl/powercfg/powercfg.c (original)
+++ trunk/reactos/dll/cpl/powercfg/powercfg.c Fri Jun 23 21:14:29 2006
@@ -27,7 +27,7 @@
HINSTANCE hApplet = 0;
GLOBAL_POWER_POLICY gGPP;
-WCHAR langSel[255];
+TCHAR langSel[255];
/* Applets */
APPLET Applets[NUM_APPLETS] =
Modified: trunk/reactos/dll/cpl/powercfg/powershemes.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/powercfg/powershem…
==============================================================================
--- trunk/reactos/dll/cpl/powercfg/powershemes.c (original)
+++ trunk/reactos/dll/cpl/powercfg/powershemes.c Fri Jun 23 21:14:29 2006
@@ -220,7 +220,7 @@
return TRUE;
}
-BOOLEAN CALLBACK callback_EnumPwrScheme(UINT uiIndex, DWORD dwName, LPWSTR sName, DWORD
dwDesc,
+BOOLEAN CALLBACK callback_EnumPwrScheme(UINT uiIndex, DWORD dwName, LPTSTR sName, DWORD
dwDesc,
LPWSTR sDesc, PPOWER_POLICY pp,LPARAM lParam
)
{
int index;
@@ -237,21 +237,21 @@
memcpy(&gPP[guiIndex], pp, sizeof(POWER_POLICY));
guiIndex++;
- index = SendMessageW(hList,
+ index = SendMessage(hList,
CB_ADDSTRING,
0,
(LPARAM)sName);
if (index == CB_ERR)
return FALSE;
- SendMessageW(hList,
+ SendMessage(hList,
CB_SETITEMDATA,
index,
(LPARAM)uiIndex);
if (aps == uiIndex)
{
- SendMessageW(hList,
+ SendMessage(hList,
CB_SELECTSTRING,
TRUE,
(LPARAM)sName);
@@ -307,7 +307,7 @@
{
int ifrom=0,i=0,imin=0;
HWND hwnd = NULL;
- WCHAR szName[MAX_PATH];
+ TCHAR szName[MAX_PATH];
LRESULT index;
for(i=1;i<9;i++)
@@ -353,7 +353,7 @@
{
if (LoadString(hApplet, ifrom, szName, MAX_PATH))
{
- index = SendMessageW(hwnd,
+ index = SendMessage(hwnd,
CB_ADDSTRING,
0,
(LPARAM)szName);
@@ -361,7 +361,7 @@
if (index == CB_ERR)
return;
- SendMessageW(hwnd,
+ SendMessage(hwnd,
CB_SETITEMDATA,
index,
(LPARAM)Sec[ifrom-IDS_TIMEOUT16]);
@@ -369,14 +369,14 @@
}
if (LoadString(hApplet, IDS_TIMEOUT16, szName, MAX_PATH))
{
- index = SendMessageW(hwnd,
+ index = SendMessage(hwnd,
CB_ADDSTRING,
0,
(LPARAM)szName);
if (index == CB_ERR)
return;
- SendMessageW(hwnd,
+ SendMessage(hwnd,
CB_SETITEMDATA,
index,
(LPARAM)Sec[0]);
@@ -388,12 +388,12 @@
{
INT i=0, iCurSel=0;
UINT uiIndex;
- WCHAR szProfile[MAX_PATH];
- WCHAR szTemp[MAX_PATH];
- WCHAR szConfig[MAX_PATH];
+ TCHAR szProfile[MAX_PATH];
+ TCHAR szTemp[MAX_PATH];
+ TCHAR szConfig[MAX_PATH];
POWER_POLICY pp;
- iCurSel = SendMessageW(GetDlgItem(hwndDlg, IDC_ENERGYLIST),
+ iCurSel = SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST),
CB_GETCURSEL,
0,
0);
@@ -408,7 +408,7 @@
SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST), CB_GETLBTEXT, uiIndex,
(LPARAM)szProfile);
if(LoadString(hApplet, IDS_CONFIG1, szTemp, MAX_PATH))
{
- swprintf(szConfig,szTemp,szProfile);
+ _stprintf(szConfig,szTemp,szProfile);
SetWindowText(GetDlgItem(hwndDlg, IDC_GRPDETAIL),szConfig);
}
}
@@ -479,7 +479,7 @@
{
INT iCurSel=0,tmp=0;
- iCurSel = SendMessageW(GetDlgItem(hwndDlg, IDC_ENERGYLIST),
+ iCurSel = SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST),
CB_GETCURSEL,
0,
0);