fixed some msvc compile issues
fixed duplicated IDs in rc files
Modified: trunk/reactos/lib/cpl/desk/Ja.rc
Modified: trunk/reactos/lib/cpl/desk/background.c
Modified: trunk/reactos/lib/cpl/desk/cz.rc
Modified: trunk/reactos/lib/cpl/desk/desk.rc
Modified: trunk/reactos/lib/cpl/desk/desk.xml
Modified: trunk/reactos/lib/cpl/desk/en.rc
Modified: trunk/reactos/lib/cpl/desk/es.rc
Modified: trunk/reactos/lib/cpl/desk/nl.rc
Modified: trunk/reactos/lib/cpl/desk/pl.rc
Modified: trunk/reactos/lib/cpl/desk/resource.h
Modified: trunk/reactos/lib/cpl/desk/sv.rc
_____
Modified: trunk/reactos/lib/cpl/desk/Ja.rc
--- trunk/reactos/lib/cpl/desk/Ja.rc 2005-10-19 02:21:19 UTC (rev
18587)
+++ trunk/reactos/lib/cpl/desk/Ja.rc 2005-10-19 02:41:18 UTC (rev
18588)
@@ -31,7 +31,7 @@
LVS_SINGLESEL | LVS_NOCOLUMNHEADER |
LVS_SHAREIMAGELISTS |
WS_BORDER | WS_TABSTOP,13, 34, 171, 109
PUSHBUTTON "ìÝÅ£(&D)",IDC_SCREENS_DELETE, 189,47,39,10
- PUSHBUTTON "ÆÃë?(&A)",IDC_SCREENS_POWER_BUTTON,
190,34,39,10
+ PUSHBUTTON "ÆÃë?(&A)",IDC_SCREENS_ADD_BUTTON, 190,34,39,10
PUSHBUTTON "ɦÆÞ(&T)...",IDC_SCREENS_SETTINGS,140, 164, 48,
12,WS_GROUP
PUSHBUTTON "âvâîârâàü[(&V)",IDC_SCREENS_TESTSC,192, 164, 43,
12
@@ -46,7 +46,7 @@
WS_BORDER | WS_GROUP,52, 149, 12, 12
LTEXT "ò¬îoë?éÁé¢éþâXâNâèü[âô
âZü[âoü[éò\\ĪéÀéÚüB",IDC_STATIC,70, 151, 147, 9
- GROUPBOX "âéâjâ^ü[é?Å?ôdù?ï@ö\\(&E)",IDC_SCREENS_DUMMY,5,
186, 238, 35
+ GROUPBOX "âéâjâ^ü[é?Å?ôdù?ï@ö\\(&E)",IDC_SCREENS_DUMMY2,5,
186, 238, 35
LTEXT "âéâjâ^é?ôdî?ɦÆÞéÆ?É«éÀéÚé?é?üA[ôdî?ɦÆÞ]
éâNâèâbâNéÁé?é¡é¥é?éóüB",
IDC_STATIC,16, 199, 155, 19
PUSHBUTTON "ôdî?ɦÆÞ(&O)",IDC_SCREENS_POWER_BUTTON,180, 202,
57, 12
_____
Modified: trunk/reactos/lib/cpl/desk/background.c
--- trunk/reactos/lib/cpl/desk/background.c 2005-10-19 02:21:19 UTC
(rev 18587)
+++ trunk/reactos/lib/cpl/desk/background.c 2005-10-19 02:41:18 UTC
(rev 18588)
@@ -71,6 +71,8 @@
LONG result;
UINT i = 0;
BackgroundItem *backgroundItem = NULL;
+ TCHAR separators[] = TEXT(";");
+ TCHAR *token;
GetClientRect(g_hBackgroundList, &clientRect);
@@ -156,8 +158,6 @@
LoadString(hApplet, IDS_SUPPORTED_EXT, szFileTypes,
sizeof(szFileTypes) / sizeof(TCHAR));
- TCHAR separators[] = TEXT(";");
- TCHAR *token;
token = _tcstok ( szFileTypes, separators );
while ( token != NULL )
@@ -229,15 +229,20 @@
void InitBackgroundDialog()
{
- g_hBackgroundList = GetDlgItem(g_hBackgroundPage,
IDC_BACKGROUND_LIST);
+ TCHAR szString[256];
+ HKEY regKey;
+ TCHAR szBuffer[2];
+ DWORD bufferSize = sizeof(szBuffer);
+ DWORD varType = REG_SZ;
+ LONG result;
+
+ g_hBackgroundList = GetDlgItem(g_hBackgroundPage,
IDC_BACKGROUND_LIST);
g_hBackgroundPreview = GetDlgItem(g_hBackgroundPage,
IDC_BACKGROUND_PREVIEW);
g_hPlacementCombo = GetDlgItem(g_hBackgroundPage,
IDC_PLACEMENT_COMBO);
g_hColorButton = GetDlgItem(g_hBackgroundPage,
IDC_COLOR_BUTTON);
AddListViewItems();
- TCHAR szString[256];
-
LoadString(hApplet, IDS_CENTER, szString, sizeof(szString) /
sizeof(TCHAR));
SendMessage(g_hPlacementCombo, CB_INSERTSTRING, PLACEMENT_CENTER,
(LPARAM)szString);
@@ -248,13 +253,6 @@
SendMessage(g_hPlacementCombo, CB_INSERTSTRING, PLACEMENT_TILE,
(LPARAM)szString);
/* Load the default settings from the registry */
- HKEY regKey;
-
- TCHAR szBuffer[2];
- DWORD bufferSize = sizeof(szBuffer);
- DWORD varType = REG_SZ;
- LONG result;
-
RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), 0,
KEY_ALL_ACCESS, ®Key);
result = RegQueryValueEx(regKey, TEXT("WallpaperStyle"), 0,
&varType, (LPBYTE)szBuffer, &bufferSize);
@@ -310,6 +308,8 @@
TCHAR fileTitle[256];
TCHAR filter[MAX_PATH];
BackgroundItem *backgroundItem = NULL;
+ SHFILEINFO sfi;
+ LV_ITEM listItem;
ZeroMemory(&ofn, sizeof(OPENFILENAME));
@@ -336,9 +336,6 @@
if(CheckListBoxFilename(g_hBackgroundList, filename) == TRUE)
return;
- SHFILEINFO sfi;
- LV_ITEM listItem;
-
if(g_listViewItemCount > (MAX_BACKGROUNDS - 1))
return;
@@ -402,6 +399,13 @@
void DrawBackgroundPreview(LPDRAWITEMSTRUCT draw)
{
+ float scaleX;
+ float scaleY;
+ int scaledWidth;
+ int scaledHeight;
+ int posX;
+ int posY;
+
if(g_backgroundItems[g_backgroundSelection].bWallpaper == FALSE)
{
FillRect(draw->hDC, &draw->rcItem,
GetSysColorBrush(COLOR_BACKGROUND));
@@ -411,14 +415,14 @@
if(g_pWallpaperBitmap == NULL)
return;
- float scaleX = ((float)GetSystemMetrics(SM_CXSCREEN) - 1) /
(float)draw->rcItem.right;
- float scaleY = ((float)GetSystemMetrics(SM_CYSCREEN) - 1) /
(float)draw->rcItem.bottom;
+ scaleX = ((float)GetSystemMetrics(SM_CXSCREEN) - 1) /
(float)draw->rcItem.right;
+ scaleY = ((float)GetSystemMetrics(SM_CYSCREEN) - 1) /
(float)draw->rcItem.bottom;
- int scaledWidth = g_pWallpaperBitmap->width / scaleX;
- int scaledHeight = g_pWallpaperBitmap->height / scaleY;
+ scaledWidth = g_pWallpaperBitmap->width / scaleX;
+ scaledHeight = g_pWallpaperBitmap->height / scaleY;
- int posX = (draw->rcItem.right / 2) - (scaledWidth / 2);
- int posY = (draw->rcItem.bottom / 2) - (scaledHeight / 2);
+ posX = (draw->rcItem.right / 2) - (scaledWidth / 2);
+ posY = (draw->rcItem.bottom / 2) - (scaledHeight / 2);
FillRect(draw->hDC, &draw->rcItem,
GetSysColorBrush(COLOR_BACKGROUND));
_____
Modified: trunk/reactos/lib/cpl/desk/cz.rc
--- trunk/reactos/lib/cpl/desk/cz.rc 2005-10-19 02:21:19 UTC (rev
18587)
+++ trunk/reactos/lib/cpl/desk/cz.rc 2005-10-19 02:41:18 UTC (rev
18588)
@@ -31,7 +31,7 @@
LVS_SINGLESEL | LVS_NOCOLUMNHEADER |
LVS_SHAREIMAGELISTS |
WS_BORDER | WS_TABSTOP,13, 34, 171, 109
PUSHBUTTON "&Odebrat",IDC_SCREENS_DELETE, 189,47,39,10
- PUSHBUTTON "&P°idat",IDC_SCREENS_POWER_BUTTON, 190,34,39,10
+ PUSHBUTTON "&P°idat",IDC_SCREENS_ADD_BUTTON, 190,34,39,10
PUSHBUTTON "&NastavenÝ...",IDC_SCREENS_SETTINGS,140, 164, 48,
12,WS_GROUP
PUSHBUTTON "&Ukßzka",IDC_SCREENS_TESTSC,192, 164, 43, 12
@@ -46,7 +46,7 @@
WS_BORDER | WS_GROUP,52, 149, 12, 12
LTEXT "Minut ne× se spustÝ spo°iÞ
obrazovky.",IDC_STATIC,70, 151, 147, 9
- GROUPBOX "èet°enÝ &energie monitoru",IDC_SCREENS_DUMMY,5,
186, 238, 35
+ GROUPBOX "èet°enÝ &energie monitoru",IDC_SCREENS_DUMMY2,5,
186, 238, 35
LTEXT "Pro mo×nosti napßjenÝ monitoru klepnýta na
tlaÞÝtko Mo×nosti napßjenÝ.",
IDC_STATIC,16, 199, 155, 19
PUSHBUTTON "M&o×nosti napßjenÝ",IDC_SCREENS_POWER_BUTTON,180,
202, 57, 12
_____
Modified: trunk/reactos/lib/cpl/desk/desk.rc
--- trunk/reactos/lib/cpl/desk/desk.rc 2005-10-19 02:21:19 UTC (rev
18587)
+++ trunk/reactos/lib/cpl/desk/desk.rc 2005-10-19 02:41:18 UTC (rev
18588)
@@ -1,4 +1,5 @@
#include <windows.h>
+#include <commctrl.h>
#include "resource.h"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
_____
Modified: trunk/reactos/lib/cpl/desk/desk.xml
--- trunk/reactos/lib/cpl/desk/desk.xml 2005-10-19 02:21:19 UTC (rev
18587)
+++ trunk/reactos/lib/cpl/desk/desk.xml 2005-10-19 02:41:18 UTC (rev
18588)
@@ -7,12 +7,14 @@
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
+ <define name="_WIN32" />
<library>kernel32</library>
<library>user32</library>
<library>advapi32</library>
<library>gdi32</library>
<library>comctl32</library>
<library>comdlg32</library>
+ <library>shell32</library>
<file>desk.c</file>
<file>background.c</file>
<file>screensaver.c</file>
_____
Modified: trunk/reactos/lib/cpl/desk/en.rc
--- trunk/reactos/lib/cpl/desk/en.rc 2005-10-19 02:21:19 UTC (rev
18587)
+++ trunk/reactos/lib/cpl/desk/en.rc 2005-10-19 02:41:18 UTC (rev
18588)
@@ -31,7 +31,7 @@
LVS_SINGLESEL | LVS_NOCOLUMNHEADER |
LVS_SHAREIMAGELISTS |
WS_BORDER | WS_TABSTOP,13, 34, 171, 109
PUSHBUTTON "&Delete",IDC_SCREENS_DELETE, 189,47,39,10
- PUSHBUTTON "&Add",IDC_SCREENS_POWER_BUTTON, 190,34,39,10
+ PUSHBUTTON "&Add",IDC_SCREENS_ADD_BUTTON, 190,34,39,10
PUSHBUTTON "Se&ttings...",IDC_SCREENS_SETTINGS,140, 164, 48,
12,WS_GROUP
PUSHBUTTON "Pre&view",IDC_SCREENS_TESTSC,192, 164, 43, 12
@@ -46,7 +46,7 @@
WS_BORDER | WS_GROUP,52, 149, 12, 12
LTEXT "Minutes before showing
Screensaver.",IDC_STATIC,70, 151, 147, 9
- GROUPBOX "&Energy Saving features of
monitor",IDC_SCREENS_DUMMY,5, 186, 238, 35
+ GROUPBOX "&Energy Saving features of
monitor",IDC_SCREENS_DUMMY2,5, 186, 238, 35
LTEXT "To adjust the power settings for your monitor,
click on Power Settings.",
IDC_STATIC,16, 199, 155, 19
PUSHBUTTON "P&ower Settings",IDC_SCREENS_POWER_BUTTON,180,
202, 57, 12
_____
Modified: trunk/reactos/lib/cpl/desk/es.rc
--- trunk/reactos/lib/cpl/desk/es.rc 2005-10-19 02:21:19 UTC (rev
18587)
+++ trunk/reactos/lib/cpl/desk/es.rc 2005-10-19 02:41:18 UTC (rev
18588)
@@ -38,7 +38,7 @@
LVS_SINGLESEL | LVS_NOCOLUMNHEADER |
LVS_SHAREIMAGELISTS |
WS_BORDER | WS_TABSTOP,13, 34, 171, 109
PUSHBUTTON "Eliminar",IDC_SCREENS_DELETE, 189,47,39,10
- PUSHBUTTON "&A±adir",IDC_SCREENS_POWER_BUTTON, 190,34,39,10
+ PUSHBUTTON "&A±adir",IDC_SCREENS_ADD_BUTTON, 190,34,39,10
PUSHBUTTON "Configuraci¾n...",IDC_SCREENS_SETTINGS,133, 164,
56, 12,WS_GROUP
PUSHBUTTON "&Vista previa",IDC_SCREENS_TESTSC,192, 164, 43, 12
@@ -53,7 +53,7 @@
WS_BORDER | WS_GROUP,62, 148, 12, 12
LTEXT "Minutos antes de mostrar el protector de
pantalla.",IDC_STATIC,79, 150, 161, 9
- GROUPBOX "Ahorro de energÝa del
monitor",IDC_SCREENS_DUMMY,5, 186, 238, 35
+ GROUPBOX "Ahorro de energÝa del
monitor",IDC_SCREENS_DUMMY2,5, 186, 238, 35
LTEXT "Para ajustar la configuraci¾n de energÝa del
monitor, haga click en EnergÝa.",
IDC_STATIC,16, 199, 155, 19
PUSHBUTTON "EnergÝa...",IDC_SCREENS_POWER_BUTTON,180, 202, 57,
12
_____
Modified: trunk/reactos/lib/cpl/desk/nl.rc
--- trunk/reactos/lib/cpl/desk/nl.rc 2005-10-19 02:21:19 UTC (rev
18587)
+++ trunk/reactos/lib/cpl/desk/nl.rc 2005-10-19 02:41:18 UTC (rev
18588)
@@ -31,7 +31,7 @@
LVS_SINGLESEL | LVS_NOCOLUMNHEADER |
LVS_SHAREIMAGELISTS |
WS_BORDER | WS_TABSTOP,13, 34, 171, 109
PUSHBUTTON "&Wissen",IDC_SCREENS_DELETE, 189,47,39,10
- PUSHBUTTON "&Toevoegen",IDC_SCREENS_POWER_BUTTON,
190,34,39,10
+ PUSHBUTTON "&Toevoegen",IDC_SCREENS_ADD_BUTTON,
190,34,39,10
PUSHBUTTON "&Instellingen...",IDC_SCREENS_SETTINGS,140, 164,
48, 12,WS_GROUP
PUSHBUTTON "V&oorbeeld",IDC_SCREENS_TESTSC,192, 164, 43, 12
@@ -46,7 +46,7 @@
WS_BORDER | WS_GROUP,52, 149, 12, 12
LTEXT "minuten.",IDC_STATIC,70, 151, 147, 9
- GROUPBOX "&Energiebesparende functies van de
monitor",IDC_SCREENS_DUMMY,5, 186, 238, 35
+ GROUPBOX "&Energiebesparende functies van de
monitor",IDC_SCREENS_DUMMY2,5, 186, 238, 35
LTEXT "Klik op Instellingen om de energiebesparende
mogelijkheden van de monitor in te stellen.",
IDC_STATIC,16, 199, 155, 19
PUSHBUTTON "Inst&ellingen",IDC_SCREENS_POWER_BUTTON,180, 202,
57, 12
_____
Modified: trunk/reactos/lib/cpl/desk/pl.rc
--- trunk/reactos/lib/cpl/desk/pl.rc 2005-10-19 02:21:19 UTC (rev
18587)
+++ trunk/reactos/lib/cpl/desk/pl.rc 2005-10-19 02:41:18 UTC (rev
18588)
@@ -32,7 +32,7 @@
LVS_SINGLESEL | LVS_NOCOLUMNHEADER |
LVS_SHAREIMAGELISTS |
WS_BORDER | WS_TABSTOP,13, 34, 171, 109
PUSHBUTTON "&Usu±",IDC_SCREENS_DELETE, 189,47,39,10
- PUSHBUTTON "&Dodaj",IDC_SCREENS_POWER_BUTTON, 190,34,39,10
+ PUSHBUTTON "&Dodaj",IDC_SCREENS_ADD_BUTTON, 190,34,39,10
PUSHBUTTON "&Ustawienia...",IDC_SCREENS_SETTINGS,140, 164, 48,
12,WS_GROUP
PUSHBUTTON "&Podgl?d",IDC_SCREENS_TESTSC,192, 164, 43, 12
@@ -47,7 +47,7 @@
WS_BORDER | WS_GROUP,52, 149, 12, 12
LTEXT "minut przed pokazaniem wygaszacza
ekranu.",IDC_STATIC,70, 151, 147, 9
- GROUPBOX "&Zasilanie monitora",IDC_SCREENS_DUMMY,5, 186,
238, 35
+ GROUPBOX "&Zasilanie monitora",IDC_SCREENS_DUMMY2,5, 186,
238, 35
LTEXT "Kliknij przycisk Zasilanie, aby dopasowaµ
ustawienia zasilania dla monitora.",
IDC_STATIC,16, 199, 155, 19
PUSHBUTTON "Z&asilanie",IDC_SCREENS_POWER_BUTTON,180, 202, 57,
12
_____
Modified: trunk/reactos/lib/cpl/desk/resource.h
--- trunk/reactos/lib/cpl/desk/resource.h 2005-10-19 02:21:19 UTC
(rev 18587)
+++ trunk/reactos/lib/cpl/desk/resource.h 2005-10-19 02:41:18 UTC
(rev 18588)
@@ -40,7 +40,9 @@
#define IDC_SCREENS_TIMEDELAY 1016
#define IDC_SCREENS_TIME 1017
#define IDC_SCREENS_DELETE 1018
+#define IDC_SCREENS_ADD_BUTTON 1019
#define IDC_SCREENS_DUMMY 5000
+#define IDC_SCREENS_DUMMY2 5001
#define IDS_CPLNAME 2000
#define IDS_CPLDESCRIPTION 2001
_____
Modified: trunk/reactos/lib/cpl/desk/sv.rc
--- trunk/reactos/lib/cpl/desk/sv.rc 2005-10-19 02:21:19 UTC (rev
18587)
+++ trunk/reactos/lib/cpl/desk/sv.rc 2005-10-19 02:41:18 UTC (rev
18588)
@@ -34,7 +34,7 @@
LVS_SINGLESEL | LVS_NOCOLUMNHEADER |
LVS_SHAREIMAGELISTS |
WS_BORDER | WS_TABSTOP,13, 34, 171, 109
PUSHBUTTON "&Ta bort",IDC_SCREENS_DELETE, 189,47,39,10
- PUSHBUTTON "&Lõgg till",IDC_SCREENS_POWER_BUTTON,
190,34,39,10
+ PUSHBUTTON "&Lõgg till",IDC_SCREENS_ADD_BUTTON,
190,34,39,10
PUSHBUTTON "&Instõllningar",IDC_SCREENS_SETTINGS,138, 164, 48,
12,WS_GROUP
PUSHBUTTON "&F÷rhandsvisa",IDC_SCREENS_TESTSC,190, 164, 48, 12
@@ -49,7 +49,7 @@
WS_BORDER | WS_GROUP,52, 149, 12, 12
LTEXT "minuter innan skõrmslõckaren
visas.",IDC_STATIC,70, 151, 147, 9
- GROUPBOX "&Energisparfunktioner f÷r din
bildskõrm",IDC_SCREENS_DUMMY,5, 186, 238, 35
+ GROUPBOX "&Energisparfunktioner f÷r din
bildskõrm",IDC_SCREENS_DUMMY2,5, 186, 238, 35
LTEXT "F÷r att õndra energisparfunktionerna f÷r din
bildskõrm,\nklicka pÕ Instõllningar.",
IDC_STATIC,16, 199, 155, 19
PUSHBUTTON "Ins&tõllningar",IDC_SCREENS_POWER_BUTTON,180, 202,
57, 12