mirror of
https://github.com/reactos/reactos.git
synced 2025-01-07 06:45:24 +00:00
some small warning fixes
svn path=/trunk/; revision=25189
This commit is contained in:
parent
564debb90d
commit
3b3aadac55
4 changed files with 37 additions and 37 deletions
|
@ -4,7 +4,7 @@
|
|||
* PROJECT: ReactOS Display Control Panel
|
||||
* FILE: lib/cpl/desk/background.c
|
||||
* PURPOSE: Background property page
|
||||
*
|
||||
*
|
||||
* PROGRAMMERS: Trevor McCort (lycan359@gmail.com)
|
||||
* Alexey Minnekhanov (minlexx@rambler.ru)
|
||||
*/
|
||||
|
@ -267,7 +267,7 @@ InitBackgroundDialog(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
|
|||
SendDlgItemMessage(hwndDlg, IDC_PLACEMENT_COMBO, CB_SETCURSEL, PLACEMENT_CENTER, 0);
|
||||
pGlobalData->placementSelection = PLACEMENT_CENTER;
|
||||
}
|
||||
|
||||
|
||||
if (_ttoi(szBuffer) == 2)
|
||||
{
|
||||
SendDlgItemMessage(hwndDlg, IDC_PLACEMENT_COMBO, CB_SETCURSEL, PLACEMENT_STRETCH, 0);
|
||||
|
@ -292,7 +292,7 @@ InitBackgroundDialog(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
|
|||
|
||||
RegCloseKey(regKey);
|
||||
|
||||
pGlobalData->hBitmap = LoadImage(hApplet, MAKEINTRESOURCE(IDC_MONITOR), IMAGE_BITMAP, 0, 0, LR_LOADTRANSPARENT);
|
||||
pGlobalData->hBitmap = (HBITMAP) LoadImage(hApplet, MAKEINTRESOURCE(IDC_MONITOR), IMAGE_BITMAP, 0, 0, LR_LOADTRANSPARENT);
|
||||
if (pGlobalData->hBitmap != NULL)
|
||||
{
|
||||
GetObject(pGlobalData->hBitmap, sizeof(BITMAP), &bitmap);
|
||||
|
@ -408,7 +408,7 @@ OnBrowseButton(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
|
|||
|
||||
LoadString(hApplet, IDS_BACKGROUND_COMDLG_FILTER, filter, sizeof(filter) / sizeof(TCHAR));
|
||||
|
||||
/* Set lpstrFile[0] to '\0' so that GetOpenFileName does not
|
||||
/* Set lpstrFile[0] to '\0' so that GetOpenFileName does not
|
||||
* use the contents of szFile to initialize itself */
|
||||
ofn.lpstrFile[0] = TEXT('\0');
|
||||
ofn.nMaxFile = MAX_PATH;
|
||||
|
@ -623,7 +623,7 @@ SetWallpaper(PGLOBAL_DATA pGlobalData)
|
|||
}
|
||||
else
|
||||
{
|
||||
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, TEXT(""), SPIF_UPDATEINIFILE);
|
||||
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, (void*) TEXT(""), SPIF_UPDATEINIFILE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -648,7 +648,7 @@ SetDesktopBackColor(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
|
|||
if( result != ERROR_SUCCESS )
|
||||
{
|
||||
/* Key open failed; maybe it does not exist? create it! */
|
||||
result = RegCreateKeyEx( HKEY_CURRENT_USER, TEXT("Control Panel\\Colors"), 0, NULL, 0,
|
||||
result = RegCreateKeyEx( HKEY_CURRENT_USER, TEXT("Control Panel\\Colors"), 0, NULL, 0,
|
||||
KEY_ALL_ACCESS, NULL, &hKey, NULL );
|
||||
/* Now key must be created and opened and hKey must point at newly created key */
|
||||
/* On error result will not contain ERROR_SUCCESS. I don't know how to handle */
|
||||
|
@ -676,7 +676,7 @@ BackgroundPageProc(HWND hwndDlg,
|
|||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
pGlobalData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GLOBAL_DATA));
|
||||
pGlobalData = (GLOBAL_DATA*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GLOBAL_DATA));
|
||||
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
|
||||
InitBackgroundDialog(hwndDlg, pGlobalData);
|
||||
break;
|
||||
|
|
|
@ -133,15 +133,15 @@ POWER_ACTION GetPowerActionFromPolicy(POWER_ACTION_POLICY * Policy)
|
|||
/*
|
||||
|
||||
TCHAR szBuffer[MAX_PATH];
|
||||
|
||||
|
||||
// Note: Windows XP SP2+ does not return the PowerAction code
|
||||
// for PowerActionWarmEject + PowerActionShutdown but sets it
|
||||
// to PowerActionNone and sets the Flags & EventCode
|
||||
|
||||
|
||||
// to PowerActionNone and sets the Flags & EventCode
|
||||
|
||||
|
||||
_stprintf(szBuffer, L"Action: %x EventCode %x Flags %x",Policy->Action, Policy->EventCode, Policy->Flags);
|
||||
MessageBoxW(NULL, szBuffer, NULL, MB_OK);
|
||||
|
||||
|
||||
*/
|
||||
|
||||
if (Policy->Action == PowerActionNone)
|
||||
|
@ -166,13 +166,13 @@ POWER_ACTION GetPowerActionFromPolicy(POWER_ACTION_POLICY * Policy)
|
|||
{
|
||||
poAction = Policy->Action;
|
||||
}
|
||||
|
||||
|
||||
return poAction;
|
||||
}
|
||||
|
||||
void ShowCurrentPowerActionPolicy(HWND hDlgCtrl,
|
||||
POWER_ACTION * lpAction,
|
||||
DWORD dwActionSize,
|
||||
void ShowCurrentPowerActionPolicy(HWND hDlgCtrl,
|
||||
POWER_ACTION * lpAction,
|
||||
DWORD dwActionSize,
|
||||
POWER_ACTION_POLICY * Policy)
|
||||
{
|
||||
int poActionIndex;
|
||||
|
@ -243,9 +243,9 @@ void ShowCurrentPowerActionPolicies(HWND hwndDlg)
|
|||
{
|
||||
#if 0
|
||||
/* expiremental code */
|
||||
// ShowCurrentPowerButtonAcAction(hList2,
|
||||
ShowCurrentPowerActionPolicy(GetDlgItem(hwndDlg, IDC_POWERBUTTON),
|
||||
g_SystemBatteries,
|
||||
// ShowCurrentPowerButtonAcAction(hList2,
|
||||
ShowCurrentPowerActionPolicy(GetDlgItem(hwndDlg, IDC_POWERBUTTON),
|
||||
g_SystemBatteries,
|
||||
sizeof(g_SystemBatteries) / sizeof(POWER_ACTION),
|
||||
&gGPP.user.LidCloseAc);
|
||||
#else
|
||||
|
@ -257,15 +257,15 @@ void ShowCurrentPowerActionPolicies(HWND hwndDlg)
|
|||
(LPARAM)szAction);
|
||||
}
|
||||
#endif
|
||||
ShowCurrentPowerActionPolicy(GetDlgItem(hwndDlg, IDC_POWERBUTTON),
|
||||
g_PowerButton,
|
||||
ShowCurrentPowerActionPolicy(GetDlgItem(hwndDlg, IDC_POWERBUTTON),
|
||||
g_PowerButton,
|
||||
sizeof(g_PowerButton) / sizeof(POWER_ACTION),
|
||||
&gGPP.user.PowerButtonAc);
|
||||
|
||||
#if 0
|
||||
/* expiremental code */
|
||||
ShowCurrentPowerActionPolicy(GetDlgItem(hwndDlg, IDC_SLEEPBUTTON),
|
||||
g_SleepButton,
|
||||
ShowCurrentPowerActionPolicy(GetDlgItem(hwndDlg, IDC_SLEEPBUTTON),
|
||||
g_SleepButton,
|
||||
sizeof(g_SleepButton) / sizeof(POWER_ACTION),
|
||||
&gGPP.user.SleepButtonAc);
|
||||
#else
|
||||
|
@ -282,18 +282,18 @@ void ShowCurrentPowerActionPolicies(HWND hwndDlg)
|
|||
{
|
||||
#if 0
|
||||
|
||||
ShowCurrentPowerActionPolicy(GetDlgItem(hwndDlg, IDC_LIDCLOSE),
|
||||
g_SleepButton,
|
||||
ShowCurrentPowerActionPolicy(GetDlgItem(hwndDlg, IDC_LIDCLOSE),
|
||||
g_SleepButton,
|
||||
sizeof(g_SleepButton) / sizeof(POWER_ACTION),
|
||||
&gGPP.user.LidCloseDc);
|
||||
|
||||
ShowCurrentPowerActionPolicy(GetDlgItem(hwndDlg, IDC_POWERBUTTON),
|
||||
g_SleepButton,
|
||||
ShowCurrentPowerActionPolicy(GetDlgItem(hwndDlg, IDC_POWERBUTTON),
|
||||
g_SleepButton,
|
||||
sizeof(g_SleepButton) / sizeof(POWER_ACTION),
|
||||
&gGPP.user.PowerButtonDc);
|
||||
|
||||
ShowCurrentPowerActionPolicy(GetDlgItem(hwndDlg, IDC_SLEEPBUTTON),
|
||||
g_SleepButton,
|
||||
ShowCurrentPowerActionPolicy(GetDlgItem(hwndDlg, IDC_SLEEPBUTTON),
|
||||
g_SleepButton,
|
||||
sizeof(g_SleepButton) / sizeof(POWER_ACTION),
|
||||
&gGPP.user.SleepButtonDc);
|
||||
#else
|
||||
|
@ -318,7 +318,7 @@ void ShowCurrentPowerActionPolicies(HWND hwndDlg)
|
|||
TRUE,
|
||||
(LPARAM)szAction);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -358,7 +358,7 @@ void Adv_InitDialog()
|
|||
hList1 = GetDlgItem(hAdv, IDC_LIDCLOSE);
|
||||
SendMessage(hList1, CB_RESETCONTENT, 0, 0);
|
||||
|
||||
memset(g_SystemBatteries, 0x0, sizeof(g_SystemBatteries));
|
||||
memset(g_SystemBatteries, 0x0, sizeof(g_SystemBatteries));
|
||||
if (spc.SystemBatteriesPresent)
|
||||
{
|
||||
AddItem(hList1, IDS_PowerActionNone1, (LPARAM)PowerActionNone, g_SystemBatteries);
|
||||
|
@ -417,7 +417,7 @@ void Adv_InitDialog()
|
|||
{
|
||||
AddItem(hList3, IDS_PowerActionNone1, (LPARAM)PowerActionNone, g_SleepButton);
|
||||
AddItem(hList3, IDS_PowerActionWarmEject, (LPARAM)PowerActionWarmEject, g_SleepButton);
|
||||
|
||||
|
||||
if (bSuspend)
|
||||
{
|
||||
AddItem(hList3, IDS_PowerActionSleep, (LPARAM)PowerActionSleep, g_SleepButton);
|
||||
|
@ -464,7 +464,7 @@ void Adv_SaveData(HWND hwndDlg)
|
|||
BM_GETCHECK,
|
||||
(WPARAM)0,
|
||||
(LPARAM)0);
|
||||
|
||||
|
||||
if (bSystrayBatteryMeter)
|
||||
{
|
||||
if (!(gGPP.user.GlobalFlags & EnableSysTrayBatteryMeter))
|
||||
|
@ -529,5 +529,5 @@ void Adv_SaveData(HWND hwndDlg)
|
|||
MessageBox(hwndDlg, L"WriteGlobalPwrPolicy failed", NULL, MB_OK);
|
||||
}
|
||||
|
||||
Adv_InitDialog(hwndDlg);
|
||||
Adv_InitDialog();
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ GetNTPServerAddress(LPSTR* lpAddress)
|
|||
&dwSize);
|
||||
if (Ret == ERROR_MORE_DATA)
|
||||
{
|
||||
buf = HeapAlloc(GetProcessHeap(),
|
||||
buf = (LPWSTR) HeapAlloc(GetProcessHeap(),
|
||||
0,
|
||||
dwSize);
|
||||
if (buf == NULL)
|
||||
|
@ -200,7 +200,7 @@ GetNTPServerAddress(LPSTR* lpAddress)
|
|||
|
||||
/* We still allocate same amount of space for ASCII storage,
|
||||
* as some chars may use several bytes */
|
||||
*lpAddress = HeapAlloc(GetProcessHeap(),
|
||||
*lpAddress = (LPSTR) HeapAlloc(GetProcessHeap(),
|
||||
0,
|
||||
sizeof(dwSize));
|
||||
if (*lpAddress == NULL)
|
||||
|
|
|
@ -1006,7 +1006,7 @@ MonthCalWndProc(IN HWND hwnd,
|
|||
|
||||
case WM_CREATE:
|
||||
{
|
||||
infoPtr = HeapAlloc(GetProcessHeap(),
|
||||
infoPtr = (MONTHCALWND*) HeapAlloc(GetProcessHeap(),
|
||||
0,
|
||||
sizeof(MONTHCALWND));
|
||||
if (infoPtr == NULL)
|
||||
|
|
Loading…
Reference in a new issue