start to overhaul sysdm.cpl and make it more like XP's, which is much more user friendly

- completely rewrite the resource file to make it readable and logical
- do the same with the resource.h file (I'll cry if anyone messes these 2 up, it's mega neat now ... ;p)
- add the ReactOS logo to the first page (general tab)
- move the licence to it's own dialog accessable from the general tab
- rearrange the computer name and hardware pages
- delete the user profile page and add it as a separate dialog accessable from the advanced page
- add an error reporting button (as per XP) which opens a web browser directly to bugzilla.
- loads of other little alterations.
*note, I've dissabled language files until I've finished messing with the resources*

svn path=/trunk/; revision=24121
This commit is contained in:
Ged Murphy 2006-09-14 19:09:56 +00:00
parent a413ba4de2
commit 4732ef2b6a
14 changed files with 592 additions and 510 deletions

View file

@ -1,66 +1,77 @@
/* /*
* ReactOS * PROJECT: ReactOS System Control Panel Applet
* Copyright (C) 2004 ReactOS Team * LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/sysdm/advanced.c
* PURPOSE: Memory, start-up and profiles settings
* COPYRIGHT: Copyright Thomas Weidenmueller <w3seek@reactos.org>
Copyright 2006 Ged Murphy <gedmurphy@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* PROJECT: ReactOS System Control Panel
* FILE: lib/cpl/system/advanced.c
* PURPOSE: Memory, start-up and profiles settings
* PROGRAMMER: Thomas Weidenmueller (w3seek@users.sourceforge.net)
* UPDATE HISTORY:
* 03-04-2004 Created
*/ */
#include "precomp.h" #include "precomp.h"
static TCHAR BugLink[] = _T("http://www.reactos.org/bugzilla");
/* Property page dialog callback */ /* Property page dialog callback */
INT_PTR CALLBACK INT_PTR CALLBACK
AdvancedPageProc( AdvancedPageProc(HWND hwndDlg,
HWND hwndDlg, UINT uMsg,
UINT uMsg, WPARAM wParam,
WPARAM wParam, LPARAM lParam)
LPARAM lParam)
{ {
UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(lParam);
switch (uMsg)
{ switch (uMsg)
case WM_INITDIALOG: {
case WM_INITDIALOG:
break;
case WM_COMMAND:
{
switch(LOWORD(wParam))
{
case IDC_PERFOR:
{
DialogBox(hApplet,
MAKEINTRESOURCE(IDD_VIRTMEM),
hwndDlg,
(DLGPROC)VirtMemDlgProc);
}
break;
case IDC_USERPROFILE:
{
DialogBox(hApplet,
MAKEINTRESOURCE(IDD_USERPROFILE),
hwndDlg,
(DLGPROC)UserProfileDialogProc);
}
break;
case IDC_ENVVAR:
{
DialogBox(hApplet,
MAKEINTRESOURCE(IDD_ENVIRONMENT_VARIABLES),
hwndDlg,
(DLGPROC)EnvironmentDlgProc);
}
break;
case IDC_ERRORREPORT:
{
ShellExecute(NULL,
_T("open"),
BugLink,
NULL,
NULL,
SW_SHOWNORMAL);
}
break;
}
}
break; break;
case WM_COMMAND: }
switch(LOWORD(wParam)) return FALSE;
{
case IDC_PERFOR:
DialogBox(hApplet,
MAKEINTRESOURCE(IDD_VIRTMEM),
hwndDlg,
(DLGPROC) VirtMemDlgProc);
break;
case IDC_ENVVAR:
DialogBox(hApplet,
MAKEINTRESOURCE(IDD_ENVIRONMENT_VARIABLES),
hwndDlg,
(DLGPROC) EnvironmentDlgProc);
break;
}
break;
}
return FALSE;
} }

View file

@ -1,29 +1,10 @@
/* /*
* ReactOS * PROJECT: ReactOS System Control Panel Applet
* Copyright (C) 2004 ReactOS Team * LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/sysdm/computer.c
* PURPOSE: Computer settings for networking
* COPYRIGHT: Copyright Thomas Weidenmueller <w3seek@reactos.org>
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* PROJECT: ReactOS System Control Panel
* FILE: lib/cpl/system/computer.c
* PURPOSE: Computer settings for networking
* PROGRAMMER: Thomas Weidenmueller (w3seek@users.sourceforge.net)
* UPDATE HISTORY:
* 03-04-2004 Created
*/ */
#include "precomp.h" #include "precomp.h"

View file

@ -1,147 +1,165 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
RC_LICENSE RTDATA "resources/gpl.txt" IDD_PROPPAGEGENERAL DIALOGEX 0, 0, 256, 218
IDD_PROPPAGEGENERAL DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "General" CAPTION "General"
FONT 8, "MS Shell Dlg", 0, 0, 0x0 FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN BEGIN
LTEXT "Operating System",-1,SYSTEM_COLUMN,LABELLINE(2),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 CONTROL "", IDC_ROSIMG, "Static", SS_OWNERDRAW, 4, 5, 248, 111
LTEXT REACTOS_STR_PRODUCT_NAME,-1,SYSTEM_COLUMN+PROPSHEETPADDING(1),LABELLINE(3),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 LTEXT "System:", IDC_STATIC, 4, 132, 32, 9
LTEXT "Version "REACTOS_STR_PRODUCT_VERSION,-1,SYSTEM_COLUMN+PROPSHEETPADDING(1),LABELLINE(4),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 // LTEXT REACTOS_STR_PRODUCT_NAME, IDC_STATIC, 114, 29, 142, 8
// LTEXT "Version " REACTOS_STR_PRODUCT_VERSION, IDC_STATIC, 114, 38, 142, 8
LTEXT "Computer",-1,SYSTEM_COLUMN,LABELLINE(6),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 LTEXT "Machine:", IDC_STATIC, 124, 132, 34, 9
LTEXT "",IDC_PROCESSORMANUFACTURER,SYSTEM_COLUMN+PROPSHEETPADDING(1),LABELLINE(7),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 LTEXT "", IDC_PROCESSORMANUFACTURER, 130, 144, 118, 9
LTEXT "",IDC_PROCESSOR,SYSTEM_COLUMN+PROPSHEETPADDING(1),LABELLINE(8),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 LTEXT "", IDC_PROCESSOR, 130, 153, 118, 9
LTEXT "",IDC_PROCESSORSPEED,SYSTEM_COLUMN+PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 LTEXT "", IDC_PROCESSORSPEED, 130, 162, 118, 9
LTEXT "",IDC_SYSTEMMEMORY,SYSTEM_COLUMN+PROPSHEETPADDING(1),LABELLINE(10),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 LTEXT "", IDC_SYSTEMMEMORY, 130, 171, 118, 9
PUSHBUTTON "View licence...", IDC_LICENCE, 78, 199, 78, 13
EDITTEXT IDC_LICENSEMEMO,PROPSHEETPADDING(1),LABELLINE(13),PROPSHEETWIDTH-PROPSHEETPADDING(2),PROPSHEETHEIGHT-LABELLINE(13)-PROPSHEETPADDING(1),ES_LEFT|WS_TABSTOP|WS_BORDER|WS_VSCROLL|WS_HSCROLL|WS_GROUP|ES_MULTILINE|ES_READONLY
END END
IDD_PROPPAGECOMPUTER DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT IDD_PROPPAGECOMPUTER DIALOGEX 0, 0, 256, 218
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Network Identification" CAPTION "Computer Name"
FONT 8, "MS Shell Dlg", 0, 0, 0x0 FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN BEGIN
ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(1),LABELLINE(1)-5, ICONSIZE, ICONSIZE, SS_ICON ICON IDI_DEVMGR, IDC_ICON1, 4, 3, 26, 24, SS_ICON
LTEXT "ReactOS uses the following information to identify your computer on the network.",-1,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(1)-5,PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3) LTEXT "ReactOS uses the following information to identify your computer on the network.", IDC_STATIC, 40, 5, 204, 20
LTEXT "Full computer name:",-1,PROPSHEETPADDING(1),LABELLINE(4)-4,PROPSHEETPADDING(17),LABELLINE(4)-4 LTEXT "Computer Description:", IDC_STATIC, 6, 40, 70, 9
LTEXT "(Default)",IDC_COMPUTERNAME,PROPSHEETPADDING(17),LABELLINE(4)-5,60,LABELLINE(4)-5 EDITTEXT IDC_COMPDESC, 98, 38, 146, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
LTEXT "Workgroup:",IDC_WORKGROUPDOMAIN,PROPSHEETPADDING(1),LABELLINE(6)-6,PROPSHEETPADDING(17),LABELLINE(6)-6 LTEXT "Full computer name:", IDC_STATIC, 6, 68, 64, 9
LTEXT "(empty)",IDC_WORKGROUPDOMAIN_NAME,PROPSHEETPADDING(17),LABELLINE(6)-6,60,LABELLINE(6)-6 LTEXT "(Default)", IDC_COMPUTERNAME, 98, 68, 144, 11
LTEXT "To use the Network Identfication Wizard to join a domain and create a local user, click Network ID.",-1,PROPSHEETPADDING(1),LABELLINE(7)+5,PROPSHEETWIDTH-PROPSHEETPADDING(12)-ICONSIZE,LABELLINE(8)+5 LTEXT "Workgroup:", IDC_WORKGROUPDOMAIN, 6, 84, 64, 9
PUSHBUTTON "&Network ID...",IDC_NETWORK_ID,175,LABELLINE(7)+5,70,LABELLINE(1)+4 LTEXT "(empty)", IDC_WORKGROUPDOMAIN_NAME, 98, 84, 144, 9
LTEXT "To rename this computer or join a domain, click Properties.",-1,PROPSHEETPADDING(1),LABELLINE(11)+2,PROPSHEETWIDTH-PROPSHEETPADDING(12)-ICONSIZE,LABELLINE(12)+2 LTEXT "To use the Network Identfication Wizard to join a domain and create a local user, click Network ID.", IDC_STATIC, 6, 108, 172, 24
PUSHBUTTON "&Properties...",IDC_NETWORK_PROPERTY,175,LABELLINE(11)+2,70,LABELLINE(1)+4 PUSHBUTTON "&Network ID...", IDC_NETWORK_ID, 190, 114, 58, 15
LTEXT "To rename this computer or join a domain, click Properties.", IDC_STATIC, 6, 149, 170, 17
PUSHBUTTON "&Change...",IDC_NETWORK_PROPERTY, 190, 149, 58, 15
LTEXT "Note: Only Administrators can change the identification of this computer", IDC_STATIC, 6, 179, 230, 9
END END
IDD_PROPPAGEHARDWARE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
IDD_PROPPAGEHARDWARE DIALOGEX 0, 0, 256, 218
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Hardware" CAPTION "Hardware"
FONT 8, "MS Shell Dlg", 0, 0, 0x0 FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
GROUPBOX "Hardware Wizard",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1)
LTEXT "The Hardware wizard helps you install, uninstall, repair, unplug, eject, and configure your hardware.",-1,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3)
ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(2),LABELLINE(2), ICONSIZE, ICONSIZE, SS_ICON
PUSHBUTTON "&Hardware Wizard...",IDC_HARDWARE_WIZARD,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(5)+2,PROPSHEETPADDING(15),14
GROUPBOX "Device Manager",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(7)+2
ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(2),LABELLINE(10)-3,ICONSIZE, ICONSIZE, SS_ICON
LTEXT "The Device Manager lists all the hardware devices installed on your computer. Use the Device Manager to change the properties of any device.",-1,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(10)-3,PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3)
PUSHBUTTON "&Device Manager...",IDC_HARDWARE_DEVICE_MANAGER,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(13)+2,PROPSHEETPADDING(15),14
GROUPBOX "Hardware Profiles",-1,PROPSHEETPADDING(1),LABELLINE(16)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1)
ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(2),LABELLINE(18)-5, ICONSIZE, ICONSIZE, SS_ICON
LTEXT "Hardware profiles provide a way for you to set up and store different hardware configurations.",0,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(18)-5,PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3)
PUSHBUTTON "Hard&ware Profiles...",IDC_HARDWARE_PROFILE,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(20)+2,PROPSHEETPADDING(15),14
END
IDD_PROPPAGEUSERPROFILE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "User Profiles"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN BEGIN
ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(1),LABELLINE(1), ICONSIZE, ICONSIZE, SS_ICON GROUPBOX "Device Manager", IDC_STATIC, 6, 7, 244, 61
LTEXT "User profiles contain desktop settings and other information related to your login. A different profile can be created on each computer you use, or you can select a roaming profile that is the same on every computer you use.",-1,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(4) ICON IDI_DEVMGR, IDC_ICON1, 12, 18, 23, 21, SS_ICON
LTEXT "Profiles stored on this computer:",-1,PROPSHEETPADDING(1),LABELLINE(6),PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(1) LTEXT "The Device Manager lists all the hardware devices installed on your computer. Use the Device Manager to change the properties of any device.", IDC_STATIC, 42, 18, 204, 24
CONTROL "",IDC_USERPROFILE_LIST,"SysListView32",LVS_REPORT|LVS_SINGLESEL|LVS_SHOWSELALWAYS|LVS_SORTASCENDING|WS_BORDER|WS_TABSTOP,PROPSHEETPADDING(1),LABELLINE(8),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(11),WS_EX_CLIENTEDGE PUSHBUTTON "&Device Manager...", IDC_HARDWARE_DEVICE_MANAGER, 154, 48, 90, 15
PUSHBUTTON "Delete",IDC_USERPROFILE_DELETE,PROPSHEETPADDING(1),LABELLINE(20),60,LABELLINE(1)+2 GROUPBOX "Hardware Wizard", IDC_STATIC, 6, 79, 244, 61
PUSHBUTTON "Change Type...",IDC_USERPROFILE_CHANGE,(PROPSHEETWIDTH/2)-30,LABELLINE(20),60,LABELLINE(1)+2 ICON IDI_DEVMGR, IDC_ICON1, 12, 90, 23, 21, SS_ICON
PUSHBUTTON "Copy To...",IDC_USERPROFILE_COPY,PROPSHEETWIDTH-PROPSHEETPADDING(1)-60,LABELLINE(20),60,LABELLINE(1)+2 LTEXT "The Hardware wizard helps you install, uninstall, repair, unplug, eject, and configure your hardware.", IDC_STATIC, 42, 90, 204, 24
PUSHBUTTON "&Hardware Wizard...", IDC_HARDWARE_WIZARD, 154, 120, 90, 15
GROUPBOX "Hardware Profiles", IDC_STATIC, 6, 149, 244, 61
ICON IDI_DEVMGR, IDC_ICON1, 12, 160, 23, 21, SS_ICON
LTEXT "Hardware profiles provide a way for you to set up and store different hardware configurations.", IDC_STATIC, 42, 160, 204, 24
PUSHBUTTON "Hard&ware Profiles...", IDC_HARDWARE_PROFILE, 154, 190, 90, 15
END END
IDD_PROPPAGEADVANCED DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 256, 218
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Advanced" CAPTION "Advanced"
FONT 8, "MS Shell Dlg", 0, 0, 0x0 FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN BEGIN
GROUPBOX "Performance",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) LTEXT "You must be logged on as an administrator to make most of these changes.", IDC_STATIC, 12, 5, 236, 8
ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(2),LABELLINE(2), ICONSIZE, ICONSIZE, SS_ICON GROUPBOX "Performance", IDC_STATIC, 6, 18, 244, 50
LTEXT "Performance options control how applications use memory, which affects the speed of your computer.",-1,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3) LTEXT "Performance options control how applications use memory, which affects the speed of your computer.", IDC_STATIC, 16, 29, 210, 17
PUSHBUTTON "&Performance Options...",IDC_PERFOR,PROPSHEETWIDTH-PROPSHEETPADDING(20),LABELLINE(5)+2,PROPSHEETPADDING(18),14 PUSHBUTTON "Settings", IDC_PERFOR, 194, 48, 50, 15
GROUPBOX "Environment Variables",-1,PROPSHEETPADDING(1),LABELLINE(8)+2,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1)
ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(2),LABELLINE(10)-5, ICONSIZE, ICONSIZE, SS_ICON GROUPBOX "User Profiles", IDC_STATIC, 6,75,244,48
LTEXT "Environment variables tell your computer where to find certain types of information.",-1,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(10)-5,PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3) LTEXT "Desktop settings related to your logon", IDC_STATIC, 16, 88, 210, 20
PUSHBUTTON "&Environment Variables...",IDC_ENVVAR,PROPSHEETWIDTH-PROPSHEETPADDING(20),LABELLINE(12)+2,PROPSHEETPADDING(18),14 PUSHBUTTON "Settings", IDC_USERPROFILE, 194, 103, 50, 15
GROUPBOX "&Startup and Recovery",-1,PROPSHEETPADDING(1),LABELLINE(15)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1)
ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(2),LABELLINE(17)-5, ICONSIZE, ICONSIZE, SS_ICON GROUPBOX "Startup and Recovery", IDC_STATIC, 6, 131, 244, 52
LTEXT "Startup and recovery options tell your computer how to start and what to do if an error causes your computer to stop.",0,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(17)-5,PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3) LTEXT "Startup and recovery options tell your computer how to start and what to do if an error causes your computer to stop.", IDC_STATIC, 16, 144, 210, 19
PUSHBUTTON "&Startup and Recovery...",IDC_STAREC,PROPSHEETWIDTH-PROPSHEETPADDING(20),LABELLINE(19)+2,PROPSHEETPADDING(18),14 PUSHBUTTON "Settings", IDC_STAREC, 194, 162, 50, 15
PUSHBUTTON "Environment Variables", IDC_ENVVAR, 84, 192, 80, 15
PUSHBUTTON "Error Reporting", IDC_ERRORREPORT, 170, 192, 80, 15
END
IDD_USERPROFILE DIALOGEX 0, 0, 256, 218
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "User Profiles"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
ICON IDI_DEVMGR, IDC_ICON1, 6, 11, 16, 16, SS_ICON
LTEXT "User profiles contain desktop settings and other information related to your login. A different profile can be created on each computer you use, or you can select a roaming profile that is the same on every computer you use.",
IDC_STATIC, 40, 11, 204, 35
LTEXT "Profiles stored on this computer:", IDC_STATIC, 16, 51, 204, 9
CONTROL "", IDC_USERPROFILE_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,
6, 66, 244, 85, WS_EX_CLIENTEDGE
PUSHBUTTON "Change Type...", IDC_USERPROFILE_CHANGE, 134, 156, 62, 13
LTEXT "To create new user accounts, open ", IDC_STATIC, 10, 175, 116, 9
// FIXME: needs custom control writing
// CONTROL "", IDC_CUST_LINK, "LinkCtlProc", WS_CHILD | VS_VISIBLE | WS_TABSTOP, 127, 175, 60, 9
LTEXT "in Control Panel.", IDC_STATIC, 184, 175, 64, 9
PUSHBUTTON "OK", IDOK, 134, 197, 54, 13
PUSHBUTTON "Cancel", IDCANCEL, 196, 197, 54, 13
END END
IDD_VIRTMEM DIALOGEX 6, 6, 223, 248 IDD_VIRTMEM DIALOGEX 6, 6, 223, 248
STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Virtual Memory" CAPTION "Virtual Memory"
FONT 8, "MS Sans Serif", 0, 0, 0x0 FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
CONTROL "",IDC_PAGEFILELIST,"ListBox",0x50010141,10,16,204,52,0x00000200 LTEXT "Drive [Volume Label] Paging File Size (MB)", -1, 12, 5, 96, 9
LTEXT "Drive [Volume Label]", -1, 12, 5, 96, 9 CONTROL "", IDC_PAGEFILELIST, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | WS_TABSTOP,
LTEXT "Paging File Size (MB)", -1, 114, 5, 100, 9 10, 16, 204, 52, WS_EX_CLIENTEDGE
CONTROL "Paging file size for selected drive",IDC_DRIVEGROUP,"Button",0x50000007,10,70,204,104
LTEXT "", IDC_DRIVE, 20, 84, 100, 9 GROUPBOX "Paging file size for selected drive", IDC_DRIVEGROUP, 10, 70, 204, 104
LTEXT "", IDC_SPACEAVAIL, 20, 94, 112, 8 LTEXT "", IDC_DRIVE, 20, 244, 100, 9
CONTROL "Custom size",IDC_CUSTOM,"Button",0x50010009,20,105,54,9 LTEXT "", IDC_SPACEAVAIL, 20, 94, 112, 8
CONTROL "",IDC_INITIALSIZE,"Edit",0x50010000,100,114,44,13,0x00000200 LTEXT "Initial size (MB):", -1, 22, 118, 54, 9
CONTROL "",IDC_MAXSIZE,"Edit",0x50010000,100,129,44,13,0x00000200 LTEXT "Maximum size (MB):", -1, 22, 131, 64, 9
LTEXT "Initial size (MB):", -1 ,22,118,54,9 CONTROL "Custom size", IDC_CUSTOM, "Button", BS_AUTORADIOBUTTON, 20, 105, 54, 9
LTEXT "Maximum size (MB):", -1 ,22,131,64,9 CONTROL "System managed size", IDC_SYSMANSIZE, "Button", BS_AUTORADIOBUTTON, 20, 145, 88, 9
CONTROL "System managed size",IDC_SYSMANSIZE,"Button",0x50010009,20,145,88,9 CONTROL "No paging file", IDC_NOPAGEFILE, "Button", BS_AUTORADIOBUTTON, 20, 158, 78,9
CONTROL "No paging file",IDC_NOPAGEFILE,"Button",0x50010009,20,158,78,9 EDITTEXT IDC_INITIALSIZE, 100, 114, 44, 13, NOT WS_BORDER, WS_EX_CLIENTEDGE
PUSHBUTTON "Set",IDC_SET, 158, 155, 50, 13 EDITTEXT IDC_MAXSIZE, 100, 129, 44, 13, NOT WS_BORDER, WS_EX_CLIENTEDGE
CONTROL "Total paging file size for all drives", IDC_TOTALGROUP, "Button", 0x50000007, 10, 179, 204, 46 PUSHBUTTON "Set", IDC_SET, 158, 155, 50, 13
PUSHBUTTON "OK", IDOK, 114, 232, 48, 13
PUSHBUTTON "Cancel", IDCANCEL, 168, 232, 48, 13 GROUPBOX "Total paging file size for all drives", IDC_TOTALGROUP, 10, 179, 204, 46
LTEXT "", IDC_MINIMUM, 18, 200, 100, 9 LTEXT "", IDC_MINIMUM, 18, 200, 100, 9
LTEXT "", IDC_RECOMMENDED, 18, 200, 100, 9 LTEXT "", IDC_RECOMMENDED, 18, 200, 100, 9
LTEXT "", IDC_CURRENT, 18, 200, 100, 9 LTEXT "", IDC_CURRENT, 18, 200, 100, 9
PUSHBUTTON "OK", IDOK, 114, 232, 48, 13
PUSHBUTTON "Cancel", IDCANCEL, 168, 232, 48, 13
END END
IDD_ENVIRONMENT_VARIABLES DIALOGEX 6, 18, 252, 245 IDD_ENVIRONMENT_VARIABLES DIALOGEX 6, 18, 252, 245
STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Environment Variables" CAPTION "Environment Variables"
FONT 8, "MS Shell Dlg", 0, 0, 0x0 FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN BEGIN
GROUPBOX "User variables",-1,7,12,238,100 GROUPBOX "User variables", IDC_STATIC, 7, 12, 238, 100
LTEXT "&Variables:",-1,14,24,224,8 LTEXT "&Variables:", IDC_STATIC, 14, 24, 224, 8
CONTROL "",IDC_USER_VARIABLE_LIST,"SysListView32",LVS_REPORT|LVS_SINGLESEL|LVS_SHOWSELALWAYS|LVS_SORTASCENDING|LVS_NOSORTHEADER|WS_VSCROLL|WS_HSCROLL|WS_TABSTOP,14,35,224,48,WS_EX_CLIENTEDGE CONTROL "", IDC_USER_VARIABLE_LIST, "SysListView32",
PUSHBUTTON "&New...",IDC_USER_VARIABLE_NEW,80,90,50,14 LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOSORTHEADER |
PUSHBUTTON "&Edit...",IDC_USER_VARIABLE_EDIT,134,90,50,14 WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 14, 35, 224, 48, WS_EX_CLIENTEDGE
PUSHBUTTON "&Delete",IDC_USER_VARIABLE_DELETE,188,90,50,14 PUSHBUTTON "&New...", IDC_USER_VARIABLE_NEW, 80, 90, 50, 14
PUSHBUTTON "&Edit...", IDC_USER_VARIABLE_EDIT, 134, 90, 50, 14
GROUPBOX "System variables",-1,7,116,238,100 PUSHBUTTON "&Delete", IDC_USER_VARIABLE_DELETE, 188, 90, 50, 14
LTEXT "V&ariables:",-1,14,128,224,8 GROUPBOX "System variables", IDC_STATIC, 7, 116, 238, 100
CONTROL "",IDC_SYSTEM_VARIABLE_LIST,"SysListView32",LVS_REPORT|LVS_SINGLESEL|LVS_SHOWSELALWAYS|LVS_SORTASCENDING|LVS_NOSORTHEADER|WS_VSCROLL|WS_HSCROLL|WS_TABSTOP,14,139,224,48,WS_EX_CLIENTEDGE LTEXT "V&ariables:", IDC_STATIC, 14, 128, 224, 8
PUSHBUTTON "Ne&w...",IDC_SYSTEM_VARIABLE_NEW,80,194,50,14 CONTROL "", IDC_SYSTEM_VARIABLE_LIST, "SysListView32",
PUSHBUTTON "Ed&it...",IDC_SYSTEM_VARIABLE_EDIT,134,194,50,14 LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOSORTHEADER |
PUSHBUTTON "De&lete",IDC_SYSTEM_VARIABLE_DELETE,188,194,50,14 WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 14, 139, 224, 48, WS_EX_CLIENTEDGE
PUSHBUTTON "Ne&w...", IDC_SYSTEM_VARIABLE_NEW, 80, 194, 50, 14
DEFPUSHBUTTON "OK",IDOK,141,224,50,14,WS_GROUP PUSHBUTTON "Ed&it...", IDC_SYSTEM_VARIABLE_EDIT, 134, 194, 50, 14
PUSHBUTTON "Cancel",IDCANCEL,195,224,50,14 PUSHBUTTON "De&lete", IDC_SYSTEM_VARIABLE_DELETE, 188, 194, 50, 14
PUSHBUTTON "OK", IDOK, 141, 224, 50, 14, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, 195, 224, 50, 14
END END
@ -150,23 +168,31 @@ STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_S
CAPTION "Edit Variable" CAPTION "Edit Variable"
FONT 8, "MS Shell Dlg", 0, 0, 0x0 FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN BEGIN
LTEXT "Variable &Name:",-1,7,14,50,8 LTEXT "Variable &Name:", IDC_STATIC, 7, 14, 50, 8
EDITTEXT IDC_VARIABLE_NAME,75,12,145,12,ES_AUTOHSCROLL EDITTEXT IDC_VARIABLE_NAME, 75, 12, 145, 12, ES_AUTOHSCROLL
LTEXT "Variable &Value:",-1,7,32,50,8 LTEXT "Variable &Value:", IDC_STATIC, 7, 32, 50, 8
EDITTEXT IDC_VARIABLE_VALUE,75,30,145,12,ES_AUTOHSCROLL EDITTEXT IDC_VARIABLE_VALUE, 75, 30, 145, 12, ES_AUTOHSCROLL
PUSHBUTTON "OK",IDOK,116,50,50,14,WS_GROUP
DEFPUSHBUTTON "OK",IDOK,116,50,50,14,WS_GROUP PUSHBUTTON "Cancel",IDCANCEL,170,50,50,14
PUSHBUTTON "Cancel",IDCANCEL,170,50,50,14 END
IDD_LICENCE DIALOGEX 6, 6, 267, 142
CAPTION "Licence"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
STYLE WS_BORDER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
BEGIN
EDITTEXT IDC_LICENCEEDIT, 0, 0, 268, 142, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_CPLSYSTEMNAME "System" IDS_CPLSYSTEMNAME "System"
IDS_CPLSYSTEMDESCRIPTION "See information about your computer and change various system and hardware settings." IDS_CPLSYSTEMDESCRIPTION "See information about your computer and change various system and hardware settings."
IDS_DRIVE "Drive: %s" IDS_DRIVE "Drive: %s"
IDS_SPACE "Space available: %s" IDS_SPACE "Space available: %s"
IDS_MIN "Minimum allowed: %s" IDS_MIN "Minimum allowed: %s"
IDS_REC "Recommended: %s" IDS_REC "Recommended: %s"
IDS_CUR "Currently allocated: %s" IDS_CUR "Currently allocated: %s"
END END

View file

@ -1,27 +1,10 @@
/* /*
* ReactOS * PROJECT: ReactOS System Control Panel Applet
* Copyright (C) 2004 ReactOS Team * LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/sysdm/environment.c
* PURPOSE: Environment variable settings
* COPYRIGHT: Copyright Eric Kohl
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* PROJECT: ReactOS System Control Panel
* FILE: lib/cpl/sysdm/environment.c
* PURPOSE: Environment variable settings
* PROGRAMMER: Eric Kohl
*/ */
#include "precomp.h" #include "precomp.h"
@ -38,9 +21,9 @@ typedef struct _VARIABLE_DATA
INT_PTR CALLBACK INT_PTR CALLBACK
EditVariableDlgProc(HWND hwndDlg, EditVariableDlgProc(HWND hwndDlg,
UINT uMsg, UINT uMsg,
WPARAM wParam, WPARAM wParam,
LPARAM lParam) LPARAM lParam)
{ {
PVARIABLE_DATA VarData; PVARIABLE_DATA VarData;
DWORD dwNameLength; DWORD dwNameLength;
@ -51,7 +34,7 @@ EditVariableDlgProc(HWND hwndDlg,
switch (uMsg) switch (uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)lParam); SetWindowLongPtr(hwndDlg, GWL_USERDATA, (LONG_PTR)lParam);
VarData = (PVARIABLE_DATA)lParam; VarData = (PVARIABLE_DATA)lParam;
if (VarData->lpName != NULL) if (VarData->lpName != NULL)
@ -489,15 +472,15 @@ SetAllVars(HWND hwndDlg,
lvi.iItem = iItem; lvi.iItem = iItem;
/* Open or create the key */ /* Open or create the key */
if (RegCreateKeyEx((iDlgItem == IDC_SYSTEM_VARIABLE_LIST ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER), if (RegCreateKeyEx((iDlgItem == IDC_SYSTEM_VARIABLE_LIST ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER),
(iDlgItem == IDC_SYSTEM_VARIABLE_LIST ? _T("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment") : _T("Environment")), (iDlgItem == IDC_SYSTEM_VARIABLE_LIST ? _T("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment") : _T("Environment")),
0, 0,
NULL, NULL,
REG_OPTION_NON_VOLATILE, REG_OPTION_NON_VOLATILE,
KEY_WRITE | KEY_READ, KEY_WRITE | KEY_READ,
NULL, NULL,
&hk, &hk,
NULL)) NULL))
{ {
return; return;
} }
@ -518,9 +501,9 @@ SetAllVars(HWND hwndDlg,
0, 0,
Type, Type,
(LPBYTE) VarData->lpRawValue, (LPBYTE) VarData->lpRawValue,
(DWORD) (_tcsclen(VarData->lpRawValue)* sizeof(TCHAR))+1)) (DWORD) (_tcslen(VarData->lpRawValue)* sizeof(TCHAR))+1)) // was _tcsclen. lstrlen?
{ {
RegCloseKey(hk); RegCloseKey(hk);
return; return;
} }
} }
@ -596,7 +579,7 @@ EnvironmentDlgProc(HWND hwndDlg,
if (phdr->idFrom == IDC_USER_VARIABLE_LIST || if (phdr->idFrom == IDC_USER_VARIABLE_LIST ||
phdr->idFrom == IDC_SYSTEM_VARIABLE_LIST) phdr->idFrom == IDC_SYSTEM_VARIABLE_LIST)
{ {
OnEditVariable(hwndDlg, phdr->idFrom); OnEditVariable(hwndDlg, (INT)phdr->idFrom);
return TRUE; return TRUE;
} }
} }

View file

@ -1,132 +1,152 @@
/* /*
* ReactOS * PROJECT: ReactOS System Control Panel Applet
* Copyright (C) 2004 ReactOS Team * LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/sysdm/general.c
* PURPOSE: General System Information
* COPYRIGHT: Copyright Thomas Weidenmueller <w3seek@reactos.org>
* Copyright 2006 Ged Murphy <gedmurphy@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* PROJECT: ReactOS System Control Panel
* FILE: lib/cpl/system/general.c
* PURPOSE: General System Information
* PROGRAMMER: Thomas Weidenmueller (w3seek@users.sourceforge.net)
* UPDATE HISTORY:
* 03-04-2004 Created
*/ */
#include "precomp.h" #include "precomp.h"
typedef struct _IMGINFO
{
HBITMAP hBitmap;
INT cxSource;
INT cySource;
} IMGINFO, *PIMGINFO;
void void
ShowLastWin32Error(HWND hWndOwner) ShowLastWin32Error(HWND hWndOwner)
{ {
LPTSTR lpMsg; LPTSTR lpMsg;
DWORD LastError; DWORD LastError;
LastError = GetLastError(); LastError = GetLastError();
if((LastError == 0) || !FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | if((LastError == 0) ||
FORMAT_MESSAGE_FROM_SYSTEM, NULL, LastError, !FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),(LPTSTR)&lpMsg, 0, FORMAT_MESSAGE_FROM_SYSTEM,
NULL)) NULL,
LastError,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&lpMsg,
0,
NULL))
{ {
return; return;
} }
MessageBox(hWndOwner, lpMsg, NULL, MB_OK | MB_ICONERROR); MessageBox(hWndOwner, lpMsg, NULL, MB_OK | MB_ICONERROR);
LocalFree((LPVOID)lpMsg); LocalFree((LPVOID)lpMsg);
} }
typedef struct
static VOID
InitImageInfo(PIMGINFO ImgInfo)
{ {
HWND hDlg; BITMAP bitmap;
} OSITINFO, *POSITINFO;
ZeroMemory(ImgInfo, sizeof(*ImgInfo));
ImgInfo->hBitmap = LoadImage(hApplet,
MAKEINTRESOURCE(IDB_ROSBMP),
IMAGE_BITMAP,
0,
0,
LR_DEFAULTCOLOR);
if (ImgInfo->hBitmap != NULL)
{
GetObject(ImgInfo->hBitmap, sizeof(BITMAP), &bitmap);
ImgInfo->cxSource = bitmap.bmWidth;
ImgInfo->cySource = bitmap.bmHeight;
}
}
DWORD WINAPI DWORD WINAPI
ObtainSystemInformationThread(POSITINFO posit) GetSystemInformation(HWND hwnd)
{ {
HRSRC hResInfo; UNREFERENCED_PARAMETER(hwnd);
HGLOBAL hResMem;
WCHAR *LicenseText;
/* wait a bit */
Sleep(100);
/* load license from resource */
if(!(hResInfo = FindResource(hApplet, MAKEINTRESOURCE(RC_LICENSE),
MAKEINTRESOURCE(RTDATA))) ||
!(hResMem = LoadResource(hApplet, hResInfo)) ||
!(LicenseText = LockResource(hResMem)))
{
ShowLastWin32Error(posit->hDlg);
goto LoadSystemInfo;
}
/* insert the license into the edit control (unicode!) */
SetDlgItemText(posit->hDlg, IDC_LICENSEMEMO, LicenseText);
SendDlgItemMessage(posit->hDlg, IDC_LICENSEMEMO, EM_SETSEL, 0, 0);
LoadSystemInfo:
/* FIXME */
/*free:*/
HeapFree(GetProcessHeap(), 0, posit);
return 0; return 0;
} }
/* Property page dialog callback */ /* Property page dialog callback */
INT_PTR CALLBACK INT_PTR CALLBACK
GeneralPageProc( GeneralPageProc(HWND hwndDlg,
HWND hwndDlg, UINT uMsg,
UINT uMsg, WPARAM wParam,
WPARAM wParam, LPARAM lParam)
LPARAM lParam
)
{ {
UNREFERENCED_PARAMETER(lParam); static IMGINFO ImgInfo;
UNREFERENCED_PARAMETER(wParam);
switch(uMsg) UNREFERENCED_PARAMETER(lParam);
{ UNREFERENCED_PARAMETER(wParam);
case WM_INITDIALOG:
switch(uMsg)
{ {
HANDLE Thread; case WM_INITDIALOG:
DWORD ThreadId; {
POSITINFO posit; InitImageInfo(&ImgInfo);
GetSystemInformation(hwndDlg);
posit = (POSITINFO)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(OSITINFO)); }
if(!posit) break;
{
ShowLastWin32Error(hwndDlg); case WM_COMMAND:
return FALSE; {
} if (LOWORD(wParam) == IDC_LICENCE)
posit->hDlg = hwndDlg; {
Thread = CreateThread(NULL, DialogBox(hApplet,
0, MAKEINTRESOURCE(IDD_LICENCE),
(LPTHREAD_START_ROUTINE)ObtainSystemInformationThread, hwndDlg,
(PVOID)posit, LicenceDialogProc);
0,
&ThreadId); return TRUE;
if(Thread) }
{ }
CloseHandle(Thread); break;
return FALSE;
} case WM_DRAWITEM:
{
break; LPDRAWITEMSTRUCT lpDrawItem;
lpDrawItem = (LPDRAWITEMSTRUCT) lParam;
if(lpDrawItem->CtlID == IDC_ROSIMG)
{
HDC hdcMem;
LONG left;
/* position image in centre of dialog */
left = (lpDrawItem->rcItem.right - ImgInfo.cxSource) / 2;
hdcMem = CreateCompatibleDC(lpDrawItem->hDC);
if (hdcMem != NULL)
{
SelectObject(hdcMem, ImgInfo.hBitmap);
BitBlt(lpDrawItem->hDC,
left,
lpDrawItem->rcItem.top,
lpDrawItem->rcItem.right - lpDrawItem->rcItem.left,
lpDrawItem->rcItem.bottom - lpDrawItem->rcItem.top,
hdcMem,
0,
0,
SRCCOPY);
DeleteDC(hdcMem);
}
}
return TRUE;
}
} }
}
return FALSE; return FALSE;
} }

View file

@ -1,29 +1,10 @@
/* /*
* ReactOS * PROJECT: ReactOS System Control Panel Applet
* Copyright (C) 2004 ReactOS Team * LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/sysdm/hardware.c
* PURPOSE: Hardware devices
* COPYRIGHT: Copyright Thomas Weidenmueller <w3seek@reactos.org>
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* PROJECT: ReactOS System Control Panel
* FILE: lib/cpl/system/hardware.c
* PURPOSE: Hardware devices
* PROGRAMMER: Thomas Weidenmueller (w3seek@users.sourceforge.net)
* UPDATE HISTORY:
* 03-04-2004 Created
*/ */
#include "precomp.h" #include "precomp.h"

View file

@ -0,0 +1,81 @@
/*
* PROJECT: ReactOS System Control Panel Applet
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/sysdm/general.c
* PURPOSE: Licence dialog box message handler
* COPYRIGHT: Copyright 2006 Ged Murphy <gedmurphy@gmail.com>
*
*/
#include "precomp.h"
INT_PTR CALLBACK
LicenceDialogProc(HWND hDlg,
UINT message,
WPARAM wParam,
LPARAM lParam)
{
HRSRC hResInfo;
HGLOBAL hResMem;
WCHAR *LicenseText;
static HICON hIcon;
UNREFERENCED_PARAMETER(lParam);
switch (message)
{
case WM_INITDIALOG:
{
hIcon = LoadImage(hApplet,
MAKEINTRESOURCE(IDI_CPLSYSTEM),
IMAGE_ICON,
16,
16,
0);
SendMessage(hDlg,
WM_SETICON,
ICON_SMALL,
(LPARAM)hIcon);
/* load license from resource */
if(!(hResInfo = FindResource(hApplet,
MAKEINTRESOURCE(RC_LICENSE),
MAKEINTRESOURCE(RTDATA))) ||
!(hResMem = LoadResource(hApplet, hResInfo)) ||
!(LicenseText = LockResource(hResMem)))
{
ShowLastWin32Error(hDlg);
break;
}
/* insert the license into the edit control (unicode!) */
SetDlgItemText(hDlg,
IDC_LICENCEEDIT,
LicenseText);
SendDlgItemMessage(hDlg,
IDC_LICENCEEDIT,
EM_SETSEL,
-1,
0);
return TRUE;
}
case WM_COMMAND:
{
if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
{
DestroyIcon(hIcon);
EndDialog(hDlg,
LOWORD(wParam));
return TRUE;
}
}
break;
}
return FALSE;
}

View file

@ -24,14 +24,17 @@ extern HINSTANCE hApplet;
void ShowLastWin32Error(HWND hWndOwner); void ShowLastWin32Error(HWND hWndOwner);
/* prop sheet pages */
INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK ComputerPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK ComputerPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK HardwarePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK HardwarePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK AdvancedPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK AdvancedPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK UserProfilePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
/* dialogs */
INT_PTR CALLBACK UserProfileDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK EnvironmentDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK EnvironmentDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK VirtMemDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK VirtMemDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK LicenceDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
typedef struct _PAGEFILE typedef struct _PAGEFILE
{ {

View file

@ -1,93 +1,106 @@
#ifndef __CPL_RESOURCE_H #ifndef __CPL_RESOURCE_H
#define __CPL_RESOURCE_H #define __CPL_RESOURCE_H
/* metrics */ #define IDC_STATIC -1
#define PROPSHEETWIDTH 256
#define PROPSHEETHEIGHT 218
#define PROPSHEETPADDING(x) (x+x+x+x+x+x)
#define SYSTEM_COLUMN PROPSHEETPADDING(18)
#define LABELLINE(x) (x+x+x+2+x+x+x+x+x+x)
#define ICONSIZE 16
/* ids */ #define IDI_CPLSYSTEM 50
#define RC_LICENSE 101 #define IDI_DEVMGR 51
#define RTDATA 300 #define IDC_ICON1 52
#define IDB_ROSBMP 53
#define IDI_CPLSYSTEM 100 #define IDS_CPLSYSTEMNAME 60
#define IDI_DEVMGR 101 #define IDS_CPLSYSTEMDESCRIPTION 61
/* propsheet - general */
#define IDD_PROPPAGEGENERAL 100 #define IDD_PROPPAGEGENERAL 100
#define IDD_PROPPAGECOMPUTER 101 #define IDC_PROCESSORMANUFACTURER 101
#define IDD_PROPPAGEHARDWARE 102 #define IDC_PROCESSOR 102
#define IDD_PROPPAGEUSERPROFILE 103 #define IDC_PROCESSORSPEED 103
#define IDD_PROPPAGEADVANCED 104 #define IDC_SYSTEMMEMORY 104
#define IDC_LICENCE 105
#define IDC_ROSIMG 106
#define IDS_CPLSYSTEMNAME 1001
#define IDS_CPLSYSTEMDESCRIPTION 2001
#define IDS_DRIVE 3000
#define IDS_SPACE 3001
#define IDS_MIN 3002
#define IDS_REC 3003
#define IDS_CUR 3004
/* controls */
#define IDC_LICENSEMEMO 101
#define IDC_PROCESSORMANUFACTURER 102
#define IDC_PROCESSOR 103
#define IDC_PROCESSORSPEED 104
#define IDC_SYSTEMMEMORY 105
#define IDC_DEVMGR 106
#define IDC_ENVVAR 107
#define IDC_STAREC 108
#define IDC_PERFOR 109
#define IDC_ICON1 201
/* propsheet - computer name */
#define IDD_PROPPAGECOMPUTER 200
#define IDC_COMPDESC 201
#define IDC_COMPUTERNAME 202 #define IDC_COMPUTERNAME 202
#define IDC_WORKGROUPDOMAIN_NAME 203 #define IDC_WORKGROUPDOMAIN_NAME 203
#define IDC_WORKGROUPDOMAIN 204 #define IDC_WORKGROUPDOMAIN 204
#define IDC_NETWORK_ID 205 #define IDC_NETWORK_ID 205
#define IDC_NETWORK_PROPERTY 206 #define IDC_NETWORK_PROPERTY 206
/* propsheet - hardware */
#define IDD_PROPPAGEHARDWARE 300
#define IDC_HARDWARE_WIZARD 207 #define IDC_HARDWARE_WIZARD 207
#define IDC_HARDWARE_PROFILE 210 #define IDC_HARDWARE_PROFILE 209
#define IDC_HARDWARE_DRIVER_SIGN 211 #define IDC_HARDWARE_DRIVER_SIGN 210
#define IDC_HARDWARE_DEVICE_MANAGER 212 #define IDC_HARDWARE_DEVICE_MANAGER 211
#define IDC_USERPROFILE_LIST 213
#define IDC_USERPROFILE_DELETE 214
#define IDC_USERPROFILE_CHANGE 215
#define IDC_USERPROFILE_COPY 216
#define IDD_ENVIRONMENT_VARIABLES 105 /* propsheet - advanced */
#define IDC_USER_VARIABLE_LIST 220 #define IDD_PROPPAGEADVANCED 400
#define IDC_USER_VARIABLE_NEW 221 #define IDC_ENVVAR 401
#define IDC_USER_VARIABLE_EDIT 222 #define IDC_STAREC 402
#define IDC_USER_VARIABLE_DELETE 223 #define IDC_PERFOR 403
#define IDC_SYSTEM_VARIABLE_LIST 224 #define IDC_USERPROFILE 404
#define IDC_SYSTEM_VARIABLE_NEW 225 #define IDC_ERRORREPORT 405
#define IDC_SYSTEM_VARIABLE_EDIT 226
#define IDC_SYSTEM_VARIABLE_DELETE 227
/* user profiles */
#define IDD_USERPROFILE 500
#define IDC_USERPROFILE_LIST 501
#define IDC_USERPROFILE_CHANGE 503
#define IDC_CUST_LINK 504
/* environment variables */
#define IDD_ENVIRONMENT_VARIABLES 600
#define IDC_USER_VARIABLE_LIST 601
#define IDC_USER_VARIABLE_NEW 602
#define IDC_USER_VARIABLE_EDIT 603
#define IDC_USER_VARIABLE_DELETE 604
#define IDC_SYSTEM_VARIABLE_LIST 605
#define IDC_SYSTEM_VARIABLE_NEW 606
#define IDC_SYSTEM_VARIABLE_EDIT 607
#define IDC_SYSTEM_VARIABLE_DELETE 608
/* edit environment variables */
#define IDD_EDIT_VARIABLE 700
#define IDC_VARIABLE_NAME 701
#define IDC_VARIABLE_VALUE 702
#define IDD_EDIT_VARIABLE 106
#define IDC_VARIABLE_NAME 230
#define IDC_VARIABLE_VALUE 231
/* Virtual memory */ /* Virtual memory */
#define IDD_VIRTMEM 107 #define IDD_VIRTMEM 900
#define IDC_PAGEFILELIST 240 #define IDC_PAGEFILELIST 901
#define IDC_DRIVEGROUP 241 #define IDC_DRIVEGROUP 902
#define IDC_DRIVE 242 #define IDC_DRIVE 903
#define IDC_SPACEAVAIL 243 #define IDC_SPACEAVAIL 904
#define IDC_CUSTOM 244 #define IDC_CUSTOM 905
#define IDC_INITIALSIZE 245 #define IDC_INITIALSIZE 906
#define IDC_MAXSIZE 246 #define IDC_MAXSIZE 907
#define IDC_SYSMANSIZE 247 #define IDC_SYSMANSIZE 908
#define IDC_NOPAGEFILE 248 #define IDC_NOPAGEFILE 909
#define IDC_SET 249 #define IDC_SET 910
#define IDC_TOTALGROUP 250 #define IDC_TOTALGROUP 911
#define IDC_MINIMUM 251 #define IDC_MINIMUM 912
#define IDC_RECOMMENDED 252 #define IDC_RECOMMENDED 913
#define IDC_CURRENT 253 #define IDC_CURRENT 914
#define IDS_DRIVE 920
#define IDS_SPACE 921
#define IDS_MIN 922
#define IDS_REC 923
#define IDS_CUR 924
/* licence */
#define IDD_LICENCE 1000
#define IDC_LICENCEEDIT 1001
#define RC_LICENSE 1002
#define RTDATA 1003
#endif /* __CPL_RESOURCE_H */ #endif /* __CPL_RESOURCE_H */
/* EOF */

View file

@ -1,40 +1,19 @@
/* /*
* ReactOS * PROJECT: ReactOS System Control Panel Applet
* Copyright (C) 2004 ReactOS Team * LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/sysdm/sysdm.c
* PURPOSE: dll entry file
* COPYRIGHT: Copyright Thomas Weidenmueller <w3seek@reactos.org>
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* PROJECT: ReactOS System Control Panel
* FILE: lib/cpl/system/sysdm.c
* PURPOSE: ReactOS System Control Panel
* PROGRAMMER: Thomas Weidenmueller (w3seek@users.sourceforge.net)
* UPDATE HISTORY:
* 03-04-2004 Created
*/ */
#include "precomp.h" #include "precomp.h"
#define NUM_APPLETS (1)
LONG CALLBACK SystemApplet(VOID); LONG CALLBACK SystemApplet(VOID);
HINSTANCE hApplet = 0; HINSTANCE hApplet = 0;
/* Applets */ /* Applets */
APPLET Applets[NUM_APPLETS] = APPLET Applets[NUM_APPLETS] =
{ {
{IDI_CPLSYSTEM, IDS_CPLSYSTEMNAME, IDS_CPLSYSTEMDESCRIPTION, SystemApplet} {IDI_CPLSYSTEM, IDS_CPLSYSTEMNAME, IDS_CPLSYSTEMDESCRIPTION, SystemApplet}
}; };
@ -76,7 +55,7 @@ PropSheetProc(
return FALSE; return FALSE;
} }
break; break;
case PSCB_INITIALIZED: case PSCB_INITIALIZED:
break; break;
} }
@ -88,12 +67,12 @@ PropSheetProc(
LONG CALLBACK LONG CALLBACK
SystemApplet(VOID) SystemApplet(VOID)
{ {
PROPSHEETPAGE psp[5]; PROPSHEETPAGE psp[4];
PROPSHEETHEADER psh; PROPSHEETHEADER psh;
TCHAR Caption[1024]; TCHAR Caption[1024];
LoadString(hApplet, IDS_CPLSYSTEMNAME, Caption, sizeof(Caption) / sizeof(TCHAR)); LoadString(hApplet, IDS_CPLSYSTEMNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
ZeroMemory(&psh, sizeof(PROPSHEETHEADER)); ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
psh.dwSize = sizeof(PROPSHEETHEADER); psh.dwSize = sizeof(PROPSHEETHEADER);
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE; /* | PSH_USECALLBACK */ psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE; /* | PSH_USECALLBACK */
@ -105,13 +84,12 @@ SystemApplet(VOID)
psh.nStartPage = 0; psh.nStartPage = 0;
psh.ppsp = psp; psh.ppsp = psp;
psh.pfnCallback = NULL; /* PropSheetProc; */ psh.pfnCallback = NULL; /* PropSheetProc; */
InitPropSheetPage(&psp[0], IDD_PROPPAGEGENERAL, (DLGPROC) GeneralPageProc); InitPropSheetPage(&psp[0], IDD_PROPPAGEGENERAL, (DLGPROC) GeneralPageProc);
InitPropSheetPage(&psp[1], IDD_PROPPAGECOMPUTER, (DLGPROC) ComputerPageProc); InitPropSheetPage(&psp[1], IDD_PROPPAGECOMPUTER, (DLGPROC) ComputerPageProc);
InitPropSheetPage(&psp[2], IDD_PROPPAGEHARDWARE, (DLGPROC) HardwarePageProc); InitPropSheetPage(&psp[2], IDD_PROPPAGEHARDWARE, (DLGPROC) HardwarePageProc);
InitPropSheetPage(&psp[3], IDD_PROPPAGEUSERPROFILE, (DLGPROC) UserProfilePageProc); InitPropSheetPage(&psp[3], IDD_PROPPAGEADVANCED, (DLGPROC) AdvancedPageProc);
InitPropSheetPage(&psp[4], IDD_PROPPAGEADVANCED, (DLGPROC) AdvancedPageProc);
return (LONG)(PropertySheet(&psh) != -1); return (LONG)(PropertySheet(&psh) != -1);
} }

View file

@ -7,18 +7,23 @@
<define name="__USE_W32API" /> <define name="__USE_W32API" />
<define name="_WIN32_IE">0x600</define> <define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define> <define name="_WIN32_WINNT">0x501</define>
<define name="WINVER">0x501</define>
<library>kernel32</library> <library>kernel32</library>
<library>advapi32</library> <library>advapi32</library>
<library>user32</library> <library>user32</library>
<library>gdi32</library>
<library>comctl32</library> <library>comctl32</library>
<library>netapi32</library> <library>netapi32</library>
<library>ntdll</library> <library>ntdll</library>
<library>msvcrt</library> <library>msvcrt</library>
<library>msimg32</library>
<library>shell32</library>
<file>advanced.c</file> <file>advanced.c</file>
<file>computer.c</file> <file>computer.c</file>
<file>environment.c</file> <file>environment.c</file>
<file>general.c</file> <file>general.c</file>
<file>hardware.c</file> <file>hardware.c</file>
<file>licence.c</file>
<file>sysdm.c</file> <file>sysdm.c</file>
<file>userprofile.c</file> <file>userprofile.c</file>
<file>virtmem.c</file> <file>virtmem.c</file>

View file

@ -1,20 +1,24 @@
#include "resource.h" #include <windows.h>
#include "windows.h"
#include <commctrl.h> #include <commctrl.h>
#include "resource.h"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#define REACTOS_VERSION_DLL #define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS System Applet\0" #define REACTOS_STR_FILE_DESCRIPTION "ReactOS System Applet\0"
#define REACTOS_STR_INTERNAL_NAME "sysdm\0" #define REACTOS_STR_INTERNAL_NAME "sysdm\0"
#define REACTOS_STR_ORIGINAL_FILENAME "sysdm.cpl\0" #define REACTOS_STR_ORIGINAL_FILENAME "sysdm.cpl\0"
#include <reactos/version.rc> //#include <reactos/version.rc>
IDI_CPLSYSTEM ICON "resources/applet.ico" IDI_CPLSYSTEM ICON "resources/applet.ico"
IDI_DEVMGR ICON "resources/devmgr.ico" IDI_DEVMGR ICON "resources/devmgr.ico"
IDB_ROSBMP BITMAP "resources/rosbitmap.bmp"
RC_LICENSE RTDATA "resources/gpl.txt"
#include "en.rc" #include "en.rc"
/*
#include "cz.rc" #include "cz.rc"
#include "de.rc" #include "de.rc"
#include "dk.rc" #include "dk.rc"
@ -26,3 +30,4 @@ IDI_DEVMGR ICON "resources/devmgr.ico"
#include "hu.rc" #include "hu.rc"
#include "ru.rc" #include "ru.rc"
#include "uk.rc" #include "uk.rc"
*/

View file

@ -1,49 +1,42 @@
/* /*
* ReactOS * PROJECT: ReactOS System Control Panel Applet
* Copyright (C) 2004 ReactOS Team * LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/sysdm/userprofile.c
* PURPOSE: Computer settings for networking
* COPYRIGHT: Copyright Thomas Weidenmueller <w3seek@reactos.org>
* Copyright 2006 Ged Murphy <gedmurphy@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* PROJECT: ReactOS System Control Panel
* FILE: lib/cpl/system/computer.c
* PURPOSE: Computer settings for networking
* PROGRAMMER: Thomas Weidenmueller (w3seek@users.sourceforge.net)
* UPDATE HISTORY:
* 03-04-2004 Created
*/ */
#include "precomp.h" #include "precomp.h"
/* Property page dialog callback */ /* Property page dialog callback */
INT_PTR CALLBACK INT_PTR CALLBACK
UserProfilePageProc( UserProfileDialogProc(HWND hwndDlg,
HWND hwndDlg, UINT uMsg,
UINT uMsg, WPARAM wParam,
WPARAM wParam, LPARAM lParam)
LPARAM lParam
)
{ {
UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(wParam); UNREFERENCED_PARAMETER(wParam);
UNREFERENCED_PARAMETER(hwndDlg); UNREFERENCED_PARAMETER(hwndDlg);
switch(uMsg) switch(uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
break; //GetUserName {
}
break; //GetUserName
case WM_COMMAND:
{
if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
{
EndDialog(hwndDlg,
LOWORD(wParam));
return TRUE;
}
}
break;
} }
return FALSE; return FALSE;
} }

View file

@ -138,7 +138,7 @@ ParseMemSettings(PVIRTMEM pVirtMem)
Item.mask = LVIF_TEXT; Item.mask = LVIF_TEXT;
Item.iItem = ListView_GetItemCount(pVirtMem->hListView); Item.iItem = ListView_GetItemCount(pVirtMem->hListView);
Item.pszText = szDrive; Item.pszText = szDrive;
Item.iItem = ListView_InsertItem(pVirtMem->hListView, &Item); ListView_InsertItem(pVirtMem->hListView, &Item);
/* set a volume label if there is one */ /* set a volume label if there is one */
if (GetVolumeInformation(DrivePtr, if (GetVolumeInformation(DrivePtr,
@ -367,6 +367,8 @@ OnSelChange(PVIRTMEM pVirtMem,
TCHAR szCustVals[255]; TCHAR szCustVals[255];
INT Index; INT Index;
UNREFERENCED_PARAMETER(pnmv);
Index = (INT)SendDlgItemMessage(pVirtMem->hSelf, Index = (INT)SendDlgItemMessage(pVirtMem->hSelf,
IDC_PAGEFILELIST, IDC_PAGEFILELIST,
LB_GETCURSEL, LB_GETCURSEL,