Commit of some work done last year...
svn path=/trunk/; revision=6431
|
@ -14,4 +14,5 @@
|
||||||
*.sym
|
*.sym
|
||||||
*.plg
|
*.plg
|
||||||
*.bak
|
*.bak
|
||||||
|
*.tmp
|
||||||
*.map
|
*.map
|
||||||
|
|
281
rosapps/ctlpanel/roscfg/common.c
Normal file
|
@ -0,0 +1,281 @@
|
||||||
|
/*
|
||||||
|
* ReactOS control
|
||||||
|
*
|
||||||
|
* common.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Dickenson <robd@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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
#include <windows.h>
|
||||||
|
#include <cpl.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
#include <windowsx.h>
|
||||||
|
#include "main.h"
|
||||||
|
#include "system.h"
|
||||||
|
#include "assert.h"
|
||||||
|
#include "trace.h"
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Global and Local Variables:
|
||||||
|
//
|
||||||
|
|
||||||
|
extern HMODULE hModule;
|
||||||
|
|
||||||
|
HWND hApplyButton;
|
||||||
|
|
||||||
|
int nMinimumWidth; // Minimum width of the dialog (OnSize()'s cx)
|
||||||
|
int nMinimumHeight; // Minimum height of the dialog (OnSize()'s cy)
|
||||||
|
int nOldWidth; // Holds the previous client area width
|
||||||
|
int nOldHeight; // Holds the previous client area height
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Local module support methods
|
||||||
|
//
|
||||||
|
|
||||||
|
typedef struct CPlAppletDlgPagesCfg {
|
||||||
|
// int nTabCtrlId;
|
||||||
|
int nDlgTitleId;
|
||||||
|
int nFirstPageId;
|
||||||
|
int nLastPageId;
|
||||||
|
DLGPROC pDlgProc;
|
||||||
|
} CPlAppletDlgPagesCfg;
|
||||||
|
|
||||||
|
//typedef BOOL(CALLBACK *DLGPROC)(HWND,UINT,WPARAM,LPARAM);
|
||||||
|
|
||||||
|
#define DLGPROC_RESULT BOOL
|
||||||
|
//#define DLGPROC_RESULT LRESULT
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK SystemAppletDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
DLGPROC_RESULT CALLBACK KeyboardAppletDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
DLGPROC_RESULT CALLBACK MouseAppletDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
DLGPROC_RESULT CALLBACK UsersAppletDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
DLGPROC_RESULT CALLBACK DisplayAppletDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
DLGPROC_RESULT CALLBACK FoldersAppletDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
DLGPROC_RESULT CALLBACK RegionalAppletDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
DLGPROC_RESULT CALLBACK DateTimeAppletDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
DLGPROC_RESULT CALLBACK IrDaAppletDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
DLGPROC_RESULT CALLBACK AccessibleAppletDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
DLGPROC_RESULT CALLBACK PhoneModemAppletDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
|
||||||
|
CPlAppletDlgPagesCfg CPlAppletDlgPagesData[] = {
|
||||||
|
{ IDC_CPL_SYSTEM_DLG, IDD_CPL_SYSTEM_GENERAL_PAGE, IDD_CPL_SYSTEM_ADVANCED_PAGE, SystemAppletDlgProc },
|
||||||
|
{ IDC_CPL_IRDA_DLG, IDD_CPL_IRDA_FILE_TRANSFER_PAGE, IDD_CPL_IRDA_HARDWARE_PAGE, IrDaAppletDlgProc },
|
||||||
|
{ IDC_CPL_MOUSE_DLG, IDD_CPL_MOUSE_BUTTONS_PAGE, IDD_CPL_MOUSE_HARDWARE_PAGE, MouseAppletDlgProc },
|
||||||
|
{ IDC_CPL_KEYBOARD_DLG, IDD_CPL_KEYBOARD_SPEED_PAGE, IDD_CPL_KEYBOARD_HARDWARE_PAGE, KeyboardAppletDlgProc },
|
||||||
|
{ IDC_CPL_REGIONAL_DLG, IDD_CPL_REGIONAL_GENERAL_PAGE, IDD_CPL_REGIONAL_INPUT_LOCALES_PAGE, RegionalAppletDlgProc },
|
||||||
|
{ IDC_CPL_USERS_DLG, IDD_CPL_USERS_USERS_PAGE, IDD_CPL_USERS_ADVANCED_PAGE, UsersAppletDlgProc },
|
||||||
|
{ IDC_CPL_DATETIME_DLG, IDD_CPL_DATETIME_DATETIME_PAGE, IDD_CPL_DATETIME_TIMEZONE_PAGE, DateTimeAppletDlgProc },
|
||||||
|
{ IDC_CPL_FOLDERS_DLG, IDD_CPL_FOLDERS_GENERAL_PAGE, IDD_CPL_FOLDERS_OFFLINE_FILES_PAGE, FoldersAppletDlgProc },
|
||||||
|
{ IDC_CPL_DISPLAY_DLG, IDD_CPL_DISPLAY_BACKGROUND_PAGE, IDD_CPL_DISPLAY_SETTINGS_PAGE, DisplayAppletDlgProc },
|
||||||
|
{ IDC_CPL_ACCESSIBLE_DLG, IDD_CPL_ACCESSIBLE_KEYBOARD_PAGE, IDD_CPL_ACCESSIBLE_MOUSE_PAGE, AccessibleAppletDlgProc },
|
||||||
|
{ IDC_CPL_PHONE_MODEM_DLG, IDD_CPL_PHONE_MODEM_DIALING_PAGE, IDD_CPL_PHONE_MODEM_ADVANCED_PAGE, PhoneModemAppletDlgProc },
|
||||||
|
};
|
||||||
|
|
||||||
|
#define BORDER_X 10
|
||||||
|
#define BORDER_Y 10
|
||||||
|
#define BORDER_TAB_X 2
|
||||||
|
#define BORDER_TAB_Y 2
|
||||||
|
#define BUTTON_BAR_Y 70
|
||||||
|
|
||||||
|
static void MoveButton(HWND hDlg, int btnId, int pos)
|
||||||
|
{
|
||||||
|
HWND hBtnWnd;
|
||||||
|
RECT rc, rcBtn;
|
||||||
|
|
||||||
|
hBtnWnd = GetDlgItem(hDlg, btnId);
|
||||||
|
GetClientRect(hDlg, &rc);
|
||||||
|
GetWindowRect(hBtnWnd, &rcBtn);
|
||||||
|
SetWindowPos(hBtnWnd, NULL, rc.right - pos * (BORDER_X + (rcBtn.right - rcBtn.left)),
|
||||||
|
rc.bottom - (BORDER_Y + (rcBtn.bottom - rcBtn.top)),
|
||||||
|
0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL CreateTabPages(HWND hDlg, CPlAppletDlgPagesCfg* pPagesData)
|
||||||
|
{
|
||||||
|
TCHAR szPageTitle[MAX_LOADSTRING];
|
||||||
|
RECT rc;
|
||||||
|
TCITEM item;
|
||||||
|
int i, count;
|
||||||
|
int nWidth = 0;
|
||||||
|
int nHeight = 0;
|
||||||
|
int nTabWndHeight = 0;
|
||||||
|
HWND hTabWnd = GetDlgItem(hDlg, IDC_CPL_DIALOG_TAB);
|
||||||
|
|
||||||
|
//GetWindowRect(hTabWnd, &rc);
|
||||||
|
GetClientRect(hTabWnd, &rc);
|
||||||
|
nWidth = rc.right - rc.left;
|
||||||
|
nHeight = rc.bottom - rc.top;
|
||||||
|
//MapWindowPoints(hTabWnd, hDlg, (LPPOINT)(&rc), (sizeof(RECT)/sizeof(POINT)));
|
||||||
|
|
||||||
|
for (i = pPagesData->nFirstPageId; i <= pPagesData->nLastPageId; i++) {
|
||||||
|
HWND hPage;
|
||||||
|
//TRACE(_T("Calling CreateDialogParam(%08X, %u, %08X, %08X)\n"), hModule, i, hDlg, pPagesData->pDlgProc);
|
||||||
|
hPage = CreateDialogParam(hModule, MAKEINTRESOURCE(i), hDlg, pPagesData->pDlgProc, i);
|
||||||
|
LoadString(hModule, i, szPageTitle, MAX_LOADSTRING);
|
||||||
|
memset(&item, 0, sizeof(TCITEM));
|
||||||
|
item.mask = TCIF_TEXT | TCIF_PARAM;
|
||||||
|
item.pszText = szPageTitle;
|
||||||
|
item.lParam = (LPARAM)hPage;
|
||||||
|
if (TabCtrl_InsertItem(hTabWnd, i - pPagesData->nFirstPageId, &item) == -1) {
|
||||||
|
assert(0);
|
||||||
|
}
|
||||||
|
//if (i == pPagesData->nFirstPageId) ShowWindow(hPage, SW_SHOW);
|
||||||
|
GetWindowRect(hPage, &rc);
|
||||||
|
nWidth = max(nWidth, rc.right - rc.left);
|
||||||
|
nHeight = max(nHeight, rc.bottom - rc.top);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TabCtrl_GetItemRect(hTabWnd, 0, &rc)) {
|
||||||
|
nTabWndHeight = rc.bottom - rc.top;
|
||||||
|
assert(nTabWndHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
// size the Tab control window to contain the largest property page
|
||||||
|
SetWindowPos(hTabWnd, NULL, BORDER_X, BORDER_Y, nWidth+2, nHeight+nTabWndHeight+4, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER);
|
||||||
|
InvalidateRect(hTabWnd, NULL, TRUE);
|
||||||
|
GetWindowRect(hTabWnd, &rc);
|
||||||
|
|
||||||
|
// set all the property pages in the Tab control to the size of the largest page
|
||||||
|
count = TabCtrl_GetItemCount(hTabWnd);
|
||||||
|
for (i = 0; i < count; i++) {
|
||||||
|
item.mask = TCIF_PARAM;
|
||||||
|
item.lParam = 0;
|
||||||
|
if (TabCtrl_GetItem(hTabWnd, i, &item)) {
|
||||||
|
if (item.lParam) {
|
||||||
|
//GetWindowRect((HWND)item.lParam, &rc);
|
||||||
|
//SetWindowPos((HWND)item.lParam, NULL, 0, 0, nWidth-10, nHeight-10, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOZORDER);
|
||||||
|
SetWindowPos((HWND)item.lParam, NULL, rc.left-2, rc.top-2, nWidth, nHeight, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER);
|
||||||
|
InvalidateRect((HWND)item.lParam, NULL, TRUE);
|
||||||
|
|
||||||
|
// show the first property page while we have a handle on it
|
||||||
|
if (i == 0) ShowWindow((HWND)item.lParam, SW_SHOW);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// resize the dialog box to contain the Tab control with borders
|
||||||
|
if (nWidth && nHeight) {
|
||||||
|
nWidth += 2 * (BORDER_X + BORDER_TAB_X);
|
||||||
|
nHeight += 3 * (BORDER_Y + BORDER_TAB_Y) + (BUTTON_BAR_Y + nTabWndHeight);
|
||||||
|
MoveWindow(hDlg, 0, 0, nWidth, nHeight, TRUE);
|
||||||
|
MoveButton(hDlg, IDCANCEL, 1);
|
||||||
|
MoveButton(hDlg, IDOK, 2);
|
||||||
|
MoveButton(hDlg, ID_APPLY, 3);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL OnCreate(HWND hDlg, LONG lData)
|
||||||
|
{
|
||||||
|
TCHAR buffer[50];
|
||||||
|
RECT rc;
|
||||||
|
HWND hTabWnd = GetDlgItem(hDlg, IDC_CPL_DIALOG_TAB);
|
||||||
|
|
||||||
|
hApplyButton = GetDlgItem(hDlg, ID_APPLY);
|
||||||
|
|
||||||
|
//SendMessage(hDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(IDI_TASKMANAGER)));
|
||||||
|
|
||||||
|
// Get the minimum window sizes
|
||||||
|
GetWindowRect(hDlg, &rc);
|
||||||
|
nMinimumWidth = (rc.right - rc.left);
|
||||||
|
nMinimumHeight = (rc.bottom - rc.top);
|
||||||
|
|
||||||
|
// Create tab pages
|
||||||
|
if (lData >= 0 && lData < GetCountProc()) {
|
||||||
|
CreateTabPages(hDlg, &CPlAppletDlgPagesData[lData]);
|
||||||
|
}
|
||||||
|
LoadString(hModule, CPlAppletDlgPagesData[lData].nDlgTitleId, buffer, sizeof(buffer)/sizeof(TCHAR));
|
||||||
|
SetWindowText(hDlg, buffer);
|
||||||
|
TabCtrl_SetCurFocus/*Sel*/(hTabWnd, 0);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LRESULT OnNotify(HWND hDlg, WPARAM wParam, LPARAM lParam, CPlAppletDlgPagesCfg* pPagesData)
|
||||||
|
{
|
||||||
|
// int idctrl = (int)wParam;
|
||||||
|
HWND hTabWnd = GetDlgItem(hDlg, IDC_CPL_DIALOG_TAB);
|
||||||
|
LPNMHDR pnmh = (LPNMHDR)lParam;
|
||||||
|
if ((pnmh->hwndFrom == hTabWnd) && (pnmh->code == TCN_SELCHANGE)) {
|
||||||
|
// (pnmh->idFrom == IDD_CPL_TABBED_DIALOG) &&
|
||||||
|
TCITEM item;
|
||||||
|
int i;
|
||||||
|
int nActiveTabPage = TabCtrl_GetCurSel(hTabWnd);
|
||||||
|
int nPageCount = TabCtrl_GetItemCount(hTabWnd);
|
||||||
|
for (i = 0; i < nPageCount; i++) {
|
||||||
|
item.mask = TCIF_PARAM;
|
||||||
|
if (TabCtrl_GetItem(hTabWnd, i, &item)) {
|
||||||
|
if ((HWND)item.lParam) {
|
||||||
|
if (i == nActiveTabPage) {
|
||||||
|
ShowWindow((HWND)item.lParam, SW_SHOW);
|
||||||
|
//BringWindowToTop((HWND)item.lParam);
|
||||||
|
//TabCtrl_SetCurFocus(hTabWnd, i);
|
||||||
|
} else {
|
||||||
|
ShowWindow((HWND)item.lParam, SW_HIDE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef struct tagCPlAppletInstanceData {
|
||||||
|
HWND hWnd;
|
||||||
|
LONG lData;
|
||||||
|
} CPlAppletInstanceData;
|
||||||
|
|
||||||
|
LRESULT CALLBACK CPlAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
CPlAppletInstanceData* pData = (CPlAppletInstanceData*)GetWindowLong(hDlg, GWL_USERDATA);
|
||||||
|
LONG nThisApp = 0;
|
||||||
|
if (pData) nThisApp = pData->lData;
|
||||||
|
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
pData = (CPlAppletInstanceData*)lParam;
|
||||||
|
SetWindowLong(hDlg, GWL_USERDATA, (LONG)pData);
|
||||||
|
nThisApp = pData->lData;
|
||||||
|
return OnCreate(hDlg, nThisApp);
|
||||||
|
|
||||||
|
case WM_DESTROY:
|
||||||
|
if (pData && (pData->hWnd == hDlg)) {
|
||||||
|
DestroyWindow(pData->hWnd);
|
||||||
|
pData->hWnd = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_COMMAND:
|
||||||
|
// Handle the button clicks
|
||||||
|
switch (LOWORD(wParam)) {
|
||||||
|
case IDOK:
|
||||||
|
case IDCANCEL:
|
||||||
|
if (pData && (pData->hWnd == hDlg)) {
|
||||||
|
DestroyWindow(pData->hWnd);
|
||||||
|
pData->hWnd = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_NOTIFY:
|
||||||
|
return OnNotify(hDlg, wParam, lParam, &CPlAppletDlgPagesData[nThisApp]);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
485
rosapps/ctlpanel/roscfg/datetime.c
Normal file
|
@ -0,0 +1,485 @@
|
||||||
|
/*
|
||||||
|
* ReactOS control
|
||||||
|
*
|
||||||
|
* datetime.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Dickenson <robd@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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
#include <windows.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <math.h>
|
||||||
|
//#include <windowsx.h>
|
||||||
|
#include "main.h"
|
||||||
|
#include "system.h"
|
||||||
|
#include "assert.h"
|
||||||
|
#include "trace.h"
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Global and Local Variables:
|
||||||
|
//
|
||||||
|
|
||||||
|
#define DLGPROC_RESULT BOOL
|
||||||
|
//#define DLGPROC_RESULT LRESULT
|
||||||
|
|
||||||
|
extern HMODULE hModule;
|
||||||
|
|
||||||
|
typedef LRESULT(WINAPI *t_fnOldWndProc)(HWND,UINT,WPARAM,LPARAM);
|
||||||
|
//FARPROC lpfnOldWndProc;
|
||||||
|
t_fnOldWndProc lpfnOldWndProc;
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Local module support methods
|
||||||
|
//
|
||||||
|
|
||||||
|
static void SetIsoTropic(HDC hdc, int cxClient, int cyClient)
|
||||||
|
{
|
||||||
|
SetMapMode(hdc, MM_ISOTROPIC);
|
||||||
|
SetWindowExtEx(hdc, 1000, 1000, NULL);
|
||||||
|
SetViewportExtEx(hdc, cxClient / 2, -cyClient / 2, NULL);
|
||||||
|
SetViewportOrgEx(hdc, cxClient / 2, cyClient / 2, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TWOPI (2*3.14159)
|
||||||
|
|
||||||
|
static void RotatePoint(POINT pt[], int iNum, int iAngle)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
POINT ptTemp;
|
||||||
|
for (i = 0; i < iNum; i++) {
|
||||||
|
ptTemp.x = (int)(pt[i].x * cos(TWOPI * iAngle / 360) +
|
||||||
|
pt[i].y * sin(TWOPI * iAngle / 360));
|
||||||
|
ptTemp.y = (int)(pt[i].y * cos(TWOPI * iAngle / 360) -
|
||||||
|
pt[i].x * sin(TWOPI * iAngle / 360));
|
||||||
|
pt[i] = ptTemp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DrawClock(HDC hdc)
|
||||||
|
{
|
||||||
|
int iAngle;
|
||||||
|
POINT pt[3];
|
||||||
|
|
||||||
|
for (iAngle = 0; iAngle < 360; iAngle += 6) {
|
||||||
|
pt[0].x = 0;
|
||||||
|
pt[0].y = 900;
|
||||||
|
|
||||||
|
RotatePoint(pt, 1, iAngle);
|
||||||
|
|
||||||
|
pt[2].x = pt[2].y = iAngle % 5 ? 23 : 100;
|
||||||
|
|
||||||
|
pt[0].x -= pt[2].x / 2;
|
||||||
|
pt[0].y -= pt[2].y / 2;
|
||||||
|
|
||||||
|
pt[1].x = pt[0].x + pt[2].x;
|
||||||
|
pt[1].y = pt[0].y + pt[2].y;
|
||||||
|
|
||||||
|
SelectObject(hdc, GetStockObject(BLACK_BRUSH));
|
||||||
|
Ellipse(hdc, pt[0].x, pt[0].y, pt[1].x, pt[1].y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DrawHands(HDC hdc, struct tm* datetime, BOOL bChange)
|
||||||
|
{
|
||||||
|
static POINT pt[3][5] = { 0, -150, 100, 0, 0, 600, -100, 0, 0, -150,
|
||||||
|
0, -200, 50, 0, 0, 800, -50, 0, 0, -200,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, -800 };
|
||||||
|
int i, iAngle[3];
|
||||||
|
POINT ptTemp[3][5];
|
||||||
|
|
||||||
|
iAngle[0] = (datetime->tm_hour * 30) % 360 + datetime->tm_min / 2;
|
||||||
|
iAngle[1] = datetime->tm_min * 6;
|
||||||
|
iAngle[2] = datetime->tm_sec * 6;
|
||||||
|
|
||||||
|
memcpy(ptTemp, pt, sizeof(pt));
|
||||||
|
|
||||||
|
for (i = bChange ? 0 : 2; i < 3; i++) {
|
||||||
|
RotatePoint(ptTemp[i], 5, iAngle[i]);
|
||||||
|
Polyline(hdc, ptTemp[i], 5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK AnalogClockFaceWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
static int cxClient, cyClient;
|
||||||
|
static struct tm dtPrevious;
|
||||||
|
BOOL bChange;
|
||||||
|
HDC hdc;
|
||||||
|
PAINTSTRUCT ps;
|
||||||
|
time_t lTime;
|
||||||
|
struct tm * datetime;
|
||||||
|
RECT rc;
|
||||||
|
|
||||||
|
switch (message) {
|
||||||
|
case WM_CREATE:
|
||||||
|
GetClientRect(hWnd, &rc);
|
||||||
|
//GetWindowRect(hWnd, &rc);
|
||||||
|
cxClient = rc.right - rc.left;
|
||||||
|
cyClient = rc.bottom - rc.top;
|
||||||
|
time(&lTime);
|
||||||
|
datetime = localtime(&lTime);
|
||||||
|
dtPrevious = *datetime;
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case WM_PAINT:
|
||||||
|
hdc = BeginPaint(hWnd, &ps);
|
||||||
|
SetIsoTropic(hdc, cxClient, cyClient);
|
||||||
|
DrawClock(hdc);
|
||||||
|
DrawHands(hdc, &dtPrevious, TRUE);
|
||||||
|
EndPaint(hWnd, &ps);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case WM_TIMER:
|
||||||
|
time(&lTime);
|
||||||
|
datetime = localtime(&lTime);
|
||||||
|
bChange = datetime->tm_hour != dtPrevious.tm_hour ||
|
||||||
|
datetime->tm_min != dtPrevious.tm_min;
|
||||||
|
hdc = GetDC(hWnd);
|
||||||
|
SetIsoTropic(hdc, cxClient, cyClient);
|
||||||
|
|
||||||
|
SelectObject(hdc, GetStockObject(WHITE_PEN));
|
||||||
|
{
|
||||||
|
//HPEN hPen = CreatePen(PS_SOLID, 0, RGB(255,0,0));
|
||||||
|
//hPen = SelectObject(hdc, hPen);
|
||||||
|
DrawHands(hdc, &dtPrevious, bChange);
|
||||||
|
SelectObject(hdc, GetStockObject(BLACK_PEN));
|
||||||
|
DrawHands(hdc, datetime, TRUE);
|
||||||
|
ReleaseDC(hWnd, hdc);
|
||||||
|
dtPrevious = *datetime;
|
||||||
|
//hPen = SelectObject(hdc, hPen);
|
||||||
|
//DeleteObject(hPen);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case WM_SIZE:
|
||||||
|
cxClient = LOWORD(wParam);
|
||||||
|
cyClient = HIWORD(wParam);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
return CallWindowProc(lpfnOldWndProc, hWnd, message, wParam, lParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
static LRESULT OnCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, int nDlgCtrlID)
|
||||||
|
{
|
||||||
|
// TRACE(_T("OnCommand(%u, %08X, %08X)\n"), nDlgCtrlID, wParam, lParam);
|
||||||
|
// Handle the button clicks
|
||||||
|
/*
|
||||||
|
switch (LOWORD(wParam)) {
|
||||||
|
case IDOK:
|
||||||
|
case IDCANCEL:
|
||||||
|
DestroyWindow(hDlg);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
*/
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT OnNotify(HWND hDlg, WPARAM wParam, LPARAM lParam, int nDlgCtrlID)
|
||||||
|
{
|
||||||
|
TRACE(_T("OnNotify(%u, %08X, %08X)\n"), nDlgCtrlID, wParam, lParam);
|
||||||
|
/*
|
||||||
|
// int idctrl = (int)wParam;
|
||||||
|
// HWND hTabWnd = GetDlgItem(hWnd, pPagesData->nTabCtrlId);
|
||||||
|
LPNMHDR pnmh = (LPNMHDR)lParam;
|
||||||
|
if ((pnmh->hwndFrom == hTabWnd) && (pnmh->code == TCN_SELCHANGE)) {
|
||||||
|
// (pnmh->idFrom == IDD_CPL_TABBED_DIALOG) &&
|
||||||
|
TCITEM item;
|
||||||
|
int i;
|
||||||
|
int nActiveTabPage = TabCtrl_GetCurSel(hTabWnd);
|
||||||
|
int nPageCount = TabCtrl_GetItemCount(hTabWnd);
|
||||||
|
for (i = 0; i < nPageCount; i++) {
|
||||||
|
item.mask = TCIF_PARAM;
|
||||||
|
if (TabCtrl_GetItem(hTabWnd, i, &item)) {
|
||||||
|
if ((HWND)item.lParam) {
|
||||||
|
if (i == nActiveTabPage) {
|
||||||
|
ShowWindow((HWND)item.lParam, SW_SHOW);
|
||||||
|
//BringWindowToTop((HWND)item.lParam);
|
||||||
|
//TabCtrl_SetCurFocus(hTabWnd, i);
|
||||||
|
} else {
|
||||||
|
ShowWindow((HWND)item.lParam, SW_HIDE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// assert(0);
|
||||||
|
*/
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void OnTimer(HWND hDlg)
|
||||||
|
{
|
||||||
|
TCHAR buffer[20];
|
||||||
|
struct tm *newtime;
|
||||||
|
time_t aclock;
|
||||||
|
HWND hEdit = GetDlgItem(hDlg, IDC_CPL_DATETIME_TIME_EDIT);
|
||||||
|
time(&aclock); /* Get time in seconds */
|
||||||
|
newtime = localtime(&aclock); /* Convert time to struct tm form */
|
||||||
|
swprintf(buffer, _T("%02u:%02u:%02u"), newtime->tm_hour, newtime->tm_min, newtime->tm_sec);
|
||||||
|
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM)buffer);
|
||||||
|
{
|
||||||
|
HWND hClockFace = GetDlgItem(hDlg, IDC_CPL_DATETIME_CLOCKFACE);
|
||||||
|
SendMessage(hClockFace, WM_TIMER, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL SetEarthMapOffset(HWND hDlg)
|
||||||
|
{
|
||||||
|
// int i;
|
||||||
|
HWND hImage = GetDlgItem(hDlg, IDC_CPL_DATETIME_EARTHMAP_IMAGE);
|
||||||
|
//SendMessage(hImage, CB_RESETCONTENT, 0, 0);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL LoadDateTimeMonthCombo(HWND hDlg)
|
||||||
|
{
|
||||||
|
TCHAR buffer[20];
|
||||||
|
struct tm *newtime;
|
||||||
|
time_t aclock;
|
||||||
|
int i;
|
||||||
|
HWND hCombo = GetDlgItem(hDlg, IDC_CPL_DATETIME_MONTH_COMBO);
|
||||||
|
HWND hEdit = GetDlgItem(hDlg, IDC_CPL_DATETIME_YEAR_EDIT);
|
||||||
|
|
||||||
|
SendMessage(hCombo, CB_RESETCONTENT, 0, 0);
|
||||||
|
time(&aclock); /* Get time in seconds */
|
||||||
|
newtime = localtime(&aclock); /* Convert time to struct tm form */
|
||||||
|
for (i = IDS_CPL_DATETIME_MONTH_1; i <= IDS_CPL_DATETIME_MONTH_12; i++) {
|
||||||
|
TCHAR buffer[34];
|
||||||
|
if (LoadString(hModule, i, buffer, sizeof(buffer)/sizeof(TCHAR))) {
|
||||||
|
int retval = SendMessage(hCombo, CB_INSERTSTRING, -1, (LPARAM)buffer);
|
||||||
|
if (retval == CB_ERR) {
|
||||||
|
MessageBox(hDlg, _T("CB_ERR: failed to add month item to combo box"), _T("Date Time Applet"), MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
|
} else
|
||||||
|
if (retval == CB_ERRSPACE) {
|
||||||
|
MessageBox(hDlg, _T("CB_ERRSPACE: failed to add month item to combo box"), _T("Date Time Applet"), MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SendMessage(hCombo, CB_SETCURSEL, newtime->tm_mon, 0);
|
||||||
|
// _itot(newtime->tm_year + 1900, buffer, 10);
|
||||||
|
// SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM)buffer);
|
||||||
|
SendMessage(GetDlgItem(hDlg, IDC_CPL_DATETIME_YEAR_EDIT), WM_SETTEXT, 0, (LPARAM)_itot(newtime->tm_year + 1900, buffer, 10));
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// IDC_CPL_DATETIME_DAYLIGHT_SAVINGS_CHECK
|
||||||
|
|
||||||
|
static BOOL ReadTimeZoneRegKey(HWND hDlg, HKEY hNewKey, TCHAR* Name)
|
||||||
|
{
|
||||||
|
DWORD dwCount = 0L;
|
||||||
|
HKEY hSubKey = 0;
|
||||||
|
HWND hCombo = GetDlgItem(hDlg, IDC_CPL_DATETIME_TIMEZONE_COMBO);
|
||||||
|
LONG errCode = errCode = RegOpenKeyEx(hNewKey, Name, 0, KEY_READ, &hSubKey);
|
||||||
|
if (errCode == ERROR_SUCCESS) {
|
||||||
|
DWORD max_sub_key_len, max_val_name_len, max_val_size, val_count;
|
||||||
|
/* get size information and resize the buffers if necessary */
|
||||||
|
errCode = RegQueryInfoKey(hSubKey, NULL, NULL, NULL, NULL,
|
||||||
|
&max_sub_key_len, NULL, &val_count, &max_val_name_len, &max_val_size, NULL, NULL);
|
||||||
|
if (errCode == ERROR_SUCCESS) {
|
||||||
|
TCHAR* ValName = malloc(++max_val_name_len * sizeof(TCHAR));
|
||||||
|
DWORD dwValNameLen = max_val_name_len;
|
||||||
|
BYTE* ValBuf = malloc(++max_val_size);
|
||||||
|
DWORD dwValSize = max_val_size;
|
||||||
|
DWORD dwIndex = 0L;
|
||||||
|
DWORD dwValType;
|
||||||
|
// if (RegQueryValueEx(hSubKey, NULL, NULL, &dwValType, ValBuf, &dwValSize) == ERROR_SUCCESS) {
|
||||||
|
// AddEntryToList(hwndLV, _T("(Default)"), dwValType, ValBuf, dwValSize);
|
||||||
|
// }
|
||||||
|
// dwValSize = max_val_size;
|
||||||
|
while (RegEnumValue(hSubKey, dwIndex, ValName, &dwValNameLen, NULL, &dwValType, ValBuf, &dwValSize) == ERROR_SUCCESS) {
|
||||||
|
ValBuf[dwValSize] = _T('\0');
|
||||||
|
//AddEntryToList(hwndLV, ValName, dwValType, ValBuf, dwValSize);
|
||||||
|
if (_tcsstr(ValName, _T("Display"))) {
|
||||||
|
//TRACE(_T(" %u %s = %s\n"), dwIndex, ValName, ValBuf);
|
||||||
|
int retval = SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM)ValBuf);
|
||||||
|
if (retval == CB_ERR) {
|
||||||
|
MessageBox(hDlg, _T("CB_ERR: failed to add timezone item to combo box"), _T("Date Time Applet"), MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
|
} else {
|
||||||
|
if (retval == CB_ERRSPACE) {
|
||||||
|
MessageBox(hDlg, _T("CB_ERRSPACE: failed to add timezone item to combo box"), _T("Date Time Applet"), MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dwValNameLen = max_val_name_len;
|
||||||
|
dwValSize = max_val_size;
|
||||||
|
dwValType = 0L;
|
||||||
|
++dwIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free(ValBuf);
|
||||||
|
free(ValName);
|
||||||
|
}
|
||||||
|
RegCloseKey(hSubKey);
|
||||||
|
} else {
|
||||||
|
TRACE(_T("ReadTimeZoneRegKey() ERROR: failed to open registry data %s\n"), Name);
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL LoadTimeZoneCombo(HWND hDlg)
|
||||||
|
{
|
||||||
|
HKEY hKey = HKEY_LOCAL_MACHINE;
|
||||||
|
TCHAR keyPath[1000];
|
||||||
|
int keyPathLen = 0;
|
||||||
|
|
||||||
|
HWND hCombo = GetDlgItem(hDlg, IDC_CPL_DATETIME_TIMEZONE_COMBO);
|
||||||
|
SendMessage(hCombo, CB_RESETCONTENT, 0, 0);
|
||||||
|
|
||||||
|
if (hKey != NULL) {
|
||||||
|
HKEY hNewKey;
|
||||||
|
LONG errCode;
|
||||||
|
_tcscpy(keyPath, _T("SOFTWARE\\ReactWare\\Windows NT\\CurrentVersion\\Time Zones"));
|
||||||
|
errCode = RegOpenKeyEx(hKey, keyPath, 0, KEY_READ, &hNewKey);
|
||||||
|
if (errCode == ERROR_SUCCESS) {
|
||||||
|
TCHAR Name[MAX_NAME_LEN];
|
||||||
|
DWORD cName = MAX_NAME_LEN;
|
||||||
|
DWORD dwIndex = 0L;
|
||||||
|
while (RegEnumKeyEx(hNewKey, dwIndex, Name, &cName, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
|
||||||
|
ReadTimeZoneRegKey(hDlg, hNewKey, Name);
|
||||||
|
cName = MAX_NAME_LEN;
|
||||||
|
++dwIndex;
|
||||||
|
}
|
||||||
|
RegCloseKey(hNewKey);
|
||||||
|
} else {
|
||||||
|
TRACE(_T("LoadTimeZoneCombo() ERROR: failed to open registry key %s\n"), keyPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
TRACE(_T("LoadTimeZoneCombo() ERROR: no registry root key\n"));
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ID_CPL_DATETIME_TIMER_ID 34
|
||||||
|
#define ID_CPL_DATETIME_TIMER_PERIOD 1000
|
||||||
|
static int nTimerID;
|
||||||
|
|
||||||
|
static BOOL OnInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TCHAR StandardNameBuf[100];
|
||||||
|
TCHAR keyPath[1000];
|
||||||
|
HKEY hNewKey;
|
||||||
|
LONG errCode;
|
||||||
|
|
||||||
|
TRACE(_T("OnInitDialog(%08X, %08X, %08X)\n"), hDlg, wParam, lParam);
|
||||||
|
|
||||||
|
nTimerID = SetTimer(hDlg, ID_CPL_DATETIME_TIMER_ID, ID_CPL_DATETIME_TIMER_PERIOD, NULL);
|
||||||
|
if (!nTimerID) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lParam == IDD_CPL_DATETIME_DATETIME_PAGE) {
|
||||||
|
|
||||||
|
HWND hClockFace = GetDlgItem(hDlg, IDC_CPL_DATETIME_CLOCKFACE);
|
||||||
|
//lpfnOldWndProc = (FARPROC)SetWindowLong(hClockFace, GWL_WNDPROC, (DWORD)AnalogClockFaceWndProc);
|
||||||
|
lpfnOldWndProc = (t_fnOldWndProc)SetWindowLong(hClockFace, GWL_WNDPROC, (DWORD)AnalogClockFaceWndProc);
|
||||||
|
|
||||||
|
SendMessage(hClockFace, WM_CREATE, 0, 0);
|
||||||
|
|
||||||
|
//HWND hEdit = GetDlgItem(hDlg, IDC_CPL_DATETIME_CURRENT_TIMEZONE_EDIT);
|
||||||
|
LoadDateTimeMonthCombo(hDlg);
|
||||||
|
//SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM)StandardNameBuf);
|
||||||
|
} else
|
||||||
|
if (lParam == IDD_CPL_DATETIME_TIMEZONE_PAGE) {
|
||||||
|
//HWND hCombo = GetDlgItem(hDlg, IDC_CPL_DATETIME_TIMEZONE_COMBO);
|
||||||
|
LoadTimeZoneCombo(hDlg);
|
||||||
|
// SendMessage(hCombo, CB_SETCURSEL, newtime->tm_mon, 0);
|
||||||
|
//SendMessage(hCombo, CB_SELECTSTRING, 0, (LPARAM)StandardNameBuf);
|
||||||
|
//SendMessage(hCombo, CB_SELECTSTRING, 0, (LPARAM)_T("(UTC+10:00) Australia New South Wales"));
|
||||||
|
}
|
||||||
|
|
||||||
|
StandardNameBuf[0] = _T('\0');
|
||||||
|
//_tcscpy(keyPath, _T("SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation"));
|
||||||
|
_tcscpy(keyPath, _T("SYSTEM\\CurrentControlSet\\Control\\TimeZoneInfo"));
|
||||||
|
errCode = RegOpenKeyEx(HKEY_LOCAL_MACHINE, keyPath, 0, KEY_READ, &hNewKey);
|
||||||
|
if (errCode == ERROR_SUCCESS) {
|
||||||
|
DWORD dwValSize = 100;
|
||||||
|
DWORD dwValType;
|
||||||
|
if (RegQueryValueEx(hNewKey, _T("StandardName"), NULL, &dwValType, (LPBYTE)StandardNameBuf, &dwValSize) == ERROR_SUCCESS) {
|
||||||
|
}
|
||||||
|
RegCloseKey(hNewKey);
|
||||||
|
|
||||||
|
if (lParam == IDD_CPL_DATETIME_DATETIME_PAGE) {
|
||||||
|
HWND hEdit = GetDlgItem(hDlg, IDC_CPL_DATETIME_CURRENT_TIMEZONE_EDIT);
|
||||||
|
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM)StandardNameBuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
_tcscpy(keyPath, _T("SOFTWARE\\ReactWare\\Windows NT\\CurrentVersion\\Time Zones\\"));
|
||||||
|
_tcscat(keyPath, StandardNameBuf);
|
||||||
|
|
||||||
|
TRACE(_T("OnInitDialog() keyPath %s\n"), keyPath);
|
||||||
|
|
||||||
|
errCode = RegOpenKeyEx(HKEY_LOCAL_MACHINE, keyPath, 0, KEY_READ, &hNewKey);
|
||||||
|
if (errCode == ERROR_SUCCESS) {
|
||||||
|
dwValSize = 100;
|
||||||
|
if (RegQueryValueEx(hNewKey, _T("Display"), NULL, &dwValType, (LPBYTE)StandardNameBuf, &dwValSize) == ERROR_SUCCESS) {
|
||||||
|
if (lParam == IDD_CPL_DATETIME_TIMEZONE_PAGE) {
|
||||||
|
HWND hCombo = GetDlgItem(hDlg, IDC_CPL_DATETIME_TIMEZONE_COMBO);
|
||||||
|
//SendMessage(hCombo, CB_SELECTSTRING, 0, (LPARAM)StandardNameBuf);
|
||||||
|
SendMessage(hCombo, CB_SELECTSTRING, 0, (LPARAM)_T("(UTC+10:00) Australia New South Wales"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RegCloseKey(hNewKey);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
TRACE(_T("LoadTimeZoneCombo() ERROR: failed to open registry key %s\n"), keyPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK DateTimeAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
// LONG nDlgCtrlID = GetWindowLong(hDlg, GWL_ID);
|
||||||
|
LONG nDlgCtrlID = GetWindowLong(hDlg, GWL_USERDATA);
|
||||||
|
|
||||||
|
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
SetWindowLong(hDlg, GWL_USERDATA, lParam);
|
||||||
|
return OnInitDialog(hDlg, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_DESTROY:
|
||||||
|
if (nTimerID) KillTimer(hDlg, nTimerID);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_COMMAND:
|
||||||
|
return OnCommand(hDlg, wParam, lParam, nDlgCtrlID);
|
||||||
|
|
||||||
|
case WM_TIMER:
|
||||||
|
OnTimer(hDlg);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_NOTIFY:
|
||||||
|
return OnNotify(hDlg, wParam, lParam, nDlgCtrlID);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
51
rosapps/ctlpanel/roscfg/dllmain.c
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
* ReactOS Control Panel Applet
|
||||||
|
*
|
||||||
|
* dllmain.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Dickenson <robd@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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
#include <windows.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
|
||||||
|
HMODULE hModule;
|
||||||
|
|
||||||
|
BOOL APIENTRY
|
||||||
|
DllMain(PVOID hinstDll,
|
||||||
|
ULONG dwReason,
|
||||||
|
PVOID reserved)
|
||||||
|
{
|
||||||
|
|
||||||
|
switch (dwReason) {
|
||||||
|
case DLL_PROCESS_ATTACH:
|
||||||
|
//DisableThreadLibraryCalls(hinstDll);
|
||||||
|
//RegInitialize();
|
||||||
|
hModule = (HMODULE)hinstDll;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DLL_PROCESS_DETACH:
|
||||||
|
//RegCleanup();
|
||||||
|
break;
|
||||||
|
case DLL_THREAD_ATTACH:
|
||||||
|
case DLL_THREAD_DETACH:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
189
rosapps/ctlpanel/roscfg/lang_table.txt
Normal file
|
@ -0,0 +1,189 @@
|
||||||
|
Primary Language Identifiers:
|
||||||
|
|
||||||
|
Identifier Predefined symbol Language
|
||||||
|
0x00 LANG_NEUTRAL Neutral
|
||||||
|
0x01 LANG_ARABIC Arabic
|
||||||
|
0x02 LANG_BULGARIAN Bulgarian
|
||||||
|
0x03 LANG_CATALAN Catalan
|
||||||
|
0x04 LANG_CHINESE Chinese
|
||||||
|
0x05 LANG_CZECH Czech
|
||||||
|
0x06 LANG_DANISH Danish
|
||||||
|
0x07 LANG_GERMAN German
|
||||||
|
0x08 LANG_GREEK Greek
|
||||||
|
0x09 LANG_ENGLISH English
|
||||||
|
0x0a LANG_SPANISH Spanish
|
||||||
|
0x0b LANG_FINNISH Finnish
|
||||||
|
0x0c LANG_FRENCH French
|
||||||
|
0x0d LANG_HEBREW Hebrew
|
||||||
|
0x0e LANG_HUNGARIAN Hungarian
|
||||||
|
0x0f LANG_ICELANDIC Icelandic
|
||||||
|
0x10 LANG_ITALIAN Italian
|
||||||
|
0x11 LANG_JAPANESE Japanese
|
||||||
|
0x12 LANG_KOREAN Korean
|
||||||
|
0x13 LANG_DUTCH Dutch
|
||||||
|
0x14 LANG_NORWEGIAN Norwegian
|
||||||
|
0x15 LANG_POLISH Polish
|
||||||
|
0x16 LANG_PORTUGUESE Portuguese
|
||||||
|
0x18 LANG_ROMANIAN Romanian
|
||||||
|
0x19 LANG_RUSSIAN Russian
|
||||||
|
0x1a LANG_CROATIAN Croatian
|
||||||
|
0x1a LANG_SERBIAN Serbian
|
||||||
|
0x1b LANG_SLOVAK Slovak
|
||||||
|
0x1c LANG_ALBANIAN Albanian
|
||||||
|
0x1d LANG_SWEDISH Swedish
|
||||||
|
0x1e LANG_THAI Thai
|
||||||
|
0x1f LANG_TURKISH Turkish
|
||||||
|
0x20 LANG_URDU Urdu
|
||||||
|
0x21 LANG_INDONESIAN Indonesian
|
||||||
|
0x22 LANG_UKRAINIAN Ukrainian
|
||||||
|
0x23 LANG_BELARUSIAN Belarusian
|
||||||
|
0x24 LANG_SLOVENIAN Slovenian
|
||||||
|
0x25 LANG_ESTONIAN Estonian
|
||||||
|
0x26 LANG_LATVIAN Latvian
|
||||||
|
0x27 LANG_LITHUANIAN Lithuanian
|
||||||
|
0x29 LANG_FARSI Farsi
|
||||||
|
0x2a LANG_VIETNAMESE Vietnamese
|
||||||
|
0x2b LANG_ARMENIAN Armenian
|
||||||
|
0x2c LANG_AZERI Azeri
|
||||||
|
0x2d LANG_BASQUE Basque
|
||||||
|
0x2f LANG_MACEDONIAN FYRO Macedonian
|
||||||
|
0x36 LANG_AFRIKAANS Afrikaans
|
||||||
|
0x37 LANG_GEORGIAN Georgian
|
||||||
|
0x38 LANG_FAEROESE Faeroese
|
||||||
|
0x39 LANG_HINDI Hindi
|
||||||
|
0x3e LANG_MALAY Malay
|
||||||
|
0x3f LANG_KAZAK Kazak
|
||||||
|
0x40 LANG_KYRGYZ Kyrgyz
|
||||||
|
0x41 LANG_SWAHILI Swahili
|
||||||
|
0x43 LANG_UZBEK Uzbek
|
||||||
|
0x44 LANG_TATAR Tatar
|
||||||
|
0x45 LANG_BENGALI Not supported.
|
||||||
|
0x46 LANG_PUNJABI Punjabi
|
||||||
|
0x47 LANG_GUJARATI Gujarati
|
||||||
|
0x48 LANG_ORIYA Not supported.
|
||||||
|
0x49 LANG_TAMIL Tamil
|
||||||
|
0x4a LANG_TELUGU Telugu
|
||||||
|
0x4b LANG_KANNADA Kannada
|
||||||
|
0x4c LANG_MALAYALAM Not supported.
|
||||||
|
0x4d LANG_ASSAMESE Not supported.
|
||||||
|
0x4e LANG_MARATHI Marathi
|
||||||
|
0x4f LANG_SANSKRIT Sanskrit
|
||||||
|
0x50 LANG_MONGOLIAN Mongolian
|
||||||
|
0x56 LANG_GALICIAN Galician
|
||||||
|
0x57 LANG_KONKANI Konkani
|
||||||
|
0x58 LANG_MANIPURI Not supported.
|
||||||
|
0x59 LANG_SINDHI Not supported.
|
||||||
|
0x5a LANG_SYRIAC Syriac
|
||||||
|
0x60 LANG_KASHMIRI Not supported.
|
||||||
|
0x61 LANG_NEPALI Not supported.
|
||||||
|
0x65 LANG_DIVEHI Divehi
|
||||||
|
0x7f LANG_INVARIANT
|
||||||
|
|
||||||
|
|
||||||
|
SubLanguage Identifiers:
|
||||||
|
|
||||||
|
Identifier Predefined symbol Language
|
||||||
|
0x00 SUBLANG_NEUTRAL Language neutral
|
||||||
|
0x01 SUBLANG_DEFAULT User Default
|
||||||
|
0x02 SUBLANG_SYS_DEFAULT System Default
|
||||||
|
0x01 SUBLANG_ARABIC_SAUDI_ARABIA Arabic (Saudi Arabia)
|
||||||
|
0x02 SUBLANG_ARABIC_IRAQ Arabic (Iraq)
|
||||||
|
0x03 SUBLANG_ARABIC_EGYPT Arabic (Egypt)
|
||||||
|
0x04 SUBLANG_ARABIC_LIBYA Arabic (Libya)
|
||||||
|
0x05 SUBLANG_ARABIC_ALGERIA Arabic (Algeria)
|
||||||
|
0x06 SUBLANG_ARABIC_MOROCCO Arabic (Morocco)
|
||||||
|
0x07 SUBLANG_ARABIC_TUNISIA Arabic (Tunisia)
|
||||||
|
0x08 SUBLANG_ARABIC_OMAN Arabic (Oman)
|
||||||
|
0x09 SUBLANG_ARABIC_YEMEN Arabic (Yemen)
|
||||||
|
0x0a SUBLANG_ARABIC_SYRIA Arabic (Syria)
|
||||||
|
0x0b SUBLANG_ARABIC_JORDAN Arabic (Jordan)
|
||||||
|
0x0c SUBLANG_ARABIC_LEBANON Arabic (Lebanon)
|
||||||
|
0x0d SUBLANG_ARABIC_KUWAIT Arabic (Kuwait)
|
||||||
|
0x0e SUBLANG_ARABIC_UAE Arabic (U.A.E.)
|
||||||
|
0x0f SUBLANG_ARABIC_BAHRAIN Arabic (Bahrain)
|
||||||
|
0x10 SUBLANG_ARABIC_QATAR Arabic (Qatar)
|
||||||
|
0x01 SUBLANG_AZERI_LATIN Azeri (Latin)
|
||||||
|
0x02 SUBLANG_AZERI_CYRILLIC Azeri (Cyrillic)
|
||||||
|
0x01 SUBLANG_CHINESE_TRADITIONAL Chinese (Traditional)
|
||||||
|
0x02 SUBLANG_CHINESE_SIMPLIFIED Chinese (Simplified)
|
||||||
|
0x03 SUBLANG_CHINESE_HONGKONG Chinese (Hong Kong SAR, PRC)
|
||||||
|
0x04 SUBLANG_CHINESE_SINGAPORE Chinese (Singapore)
|
||||||
|
0x05 SUBLANG_CHINESE_MACAU Chinese (Macau SAR)
|
||||||
|
0x01 SUBLANG_DUTCH Dutch
|
||||||
|
0x02 SUBLANG_DUTCH_BELGIAN Dutch (Belgian)
|
||||||
|
0x01 SUBLANG_ENGLISH_US English (US)
|
||||||
|
0x02 SUBLANG_ENGLISH_UK English (UK)
|
||||||
|
0x03 SUBLANG_ENGLISH_AUS English (Australian)
|
||||||
|
0x04 SUBLANG_ENGLISH_CAN English (Canadian)
|
||||||
|
0x05 SUBLANG_ENGLISH_NZ English (New Zealand)
|
||||||
|
0x06 SUBLANG_ENGLISH_EIRE English (Ireland)
|
||||||
|
0x07 SUBLANG_ENGLISH_SOUTH_AFRICA English (South Africa)
|
||||||
|
0x08 SUBLANG_ENGLISH_JAMAICA English (Jamaica)
|
||||||
|
0x09 SUBLANG_ENGLISH_CARIBBEAN English (Caribbean)
|
||||||
|
0x0a SUBLANG_ENGLISH_BELIZE English (Belize)
|
||||||
|
0x0b SUBLANG_ENGLISH_TRINIDAD English (Trinidad)
|
||||||
|
0x0c SUBLANG_ENGLISH_ZIMBABWE English (Zimbabwe)
|
||||||
|
0x0d SUBLANG_ENGLISH_PHILIPPINES English (Philippines)
|
||||||
|
0x01 SUBLANG_FRENCH French
|
||||||
|
0x02 SUBLANG_FRENCH_BELGIAN French (Belgian)
|
||||||
|
0x03 SUBLANG_FRENCH_CANADIAN French (Canadian)
|
||||||
|
0x04 SUBLANG_FRENCH_SWISS French (Swiss)
|
||||||
|
0x05 SUBLANG_FRENCH_LUXEMBOURG French (Luxembourg)
|
||||||
|
0x06 SUBLANG_FRENCH_MONACO French (Monaco)
|
||||||
|
0x01 SUBLANG_GERMAN German
|
||||||
|
0x02 SUBLANG_GERMAN_SWISS German (Swiss)
|
||||||
|
0x03 SUBLANG_GERMAN_AUSTRIAN German (Austrian)
|
||||||
|
0x04 SUBLANG_GERMAN_LUXEMBOURG German (Luxembourg)
|
||||||
|
0x05 SUBLANG_GERMAN_LIECHTENSTEIN German (Liechtenstein)
|
||||||
|
0x01 SUBLANG_ITALIAN Italian
|
||||||
|
0x02 SUBLANG_ITALIAN_SWISS Italian (Swiss)
|
||||||
|
0x01 SUBLANG_KOREAN Korean
|
||||||
|
0x01 SUBLANG_LITHUANIAN Lithuanian
|
||||||
|
0x01 SUBLANG_MALAY_MALAYSIA Malay (Malaysia)
|
||||||
|
0x02 SUBLANG_MALAY_BRUNEI_DARUSSALAM Malay (Brunei Darassalam)
|
||||||
|
0x01 SUBLANG_NORWEGIAN_BOKMAL Norwegian (Bokmal)
|
||||||
|
0x02 SUBLANG_NORWEGIAN_NYNORSK Norwegian (Nynorsk)
|
||||||
|
0x01 SUBLANG_PORTUGUESE_BRAZILIAN Portuguese (Brazil)
|
||||||
|
0x02 SUBLANG_PORTUGUESE Portuguese (Portugal)
|
||||||
|
0x02 SUBLANG_SERBIAN_LATIN Serbian (Latin)
|
||||||
|
0x03 SUBLANG_SERBIAN_CYRILLIC Serbian (Cyrillic)
|
||||||
|
0x01 SUBLANG_SPANISH Spanish (Castilian)
|
||||||
|
0x02 SUBLANG_SPANISH_MEXICAN Spanish (Mexican)
|
||||||
|
0x03 SUBLANG_SPANISH_MODERN Spanish (Spain)
|
||||||
|
0x04 SUBLANG_SPANISH_GUATEMALA Spanish (Guatemala)
|
||||||
|
0x05 SUBLANG_SPANISH_COSTA_RICA Spanish (Costa Rica)
|
||||||
|
0x06 SUBLANG_SPANISH_PANAMA Spanish (Panama)
|
||||||
|
0x07 SUBLANG_SPANISH_DOMINICAN_REPUBLIC Spanish (Dominican Republic)
|
||||||
|
0x08 SUBLANG_SPANISH_VENEZUELA Spanish (Venezuela)
|
||||||
|
0x09 SUBLANG_SPANISH_COLOMBIA Spanish (Colombia)
|
||||||
|
0x0a SUBLANG_SPANISH_PERU Spanish (Peru)
|
||||||
|
0x0b SUBLANG_SPANISH_ARGENTINA Spanish (Argentina)
|
||||||
|
0x0c SUBLANG_SPANISH_ECUADOR Spanish (Ecuador)
|
||||||
|
0x0d SUBLANG_SPANISH_CHILE Spanish (Chile)
|
||||||
|
0x0e SUBLANG_SPANISH_URUGUAY Spanish (Uruguay)
|
||||||
|
0x0f SUBLANG_SPANISH_PARAGUAY Spanish (Paraguay)
|
||||||
|
0x10 SUBLANG_SPANISH_BOLIVIA Spanish (Bolivia)
|
||||||
|
0x11 SUBLANG_SPANISH_EL_SALVADOR Spanish (El Salvador)
|
||||||
|
0x12 SUBLANG_SPANISH_HONDURAS Spanish (Honduras)
|
||||||
|
0x13 SUBLANG_SPANISH_NICARAGUA Spanish (Nicaragua)
|
||||||
|
0x14 SUBLANG_SPANISH_PUERTO_RICO Spanish (Puerto Rico)
|
||||||
|
0x01 SUBLANG_SWEDISH Swedish
|
||||||
|
0x02 SUBLANG_SWEDISH_FINLAND Swedish (Finland)
|
||||||
|
0x01 SUBLANG_URDU_PAKISTAN Urdu (Pakistan)
|
||||||
|
0x02 SUBLANG_URDU_INDIA Urdu (India)
|
||||||
|
0x01 SUBLANG_UZBEK_LATIN Uzbek (Latin)
|
||||||
|
0x02 SUBLANG_UZBEK_CYRILLIC Uzbek (Cyrillic)
|
||||||
|
|
||||||
|
|
||||||
|
January
|
||||||
|
February
|
||||||
|
March
|
||||||
|
April
|
||||||
|
May
|
||||||
|
June
|
||||||
|
July
|
||||||
|
August
|
||||||
|
September
|
||||||
|
October
|
||||||
|
November
|
||||||
|
December
|
216
rosapps/ctlpanel/roscfg/main.c
Normal file
|
@ -0,0 +1,216 @@
|
||||||
|
/*
|
||||||
|
* ReactOS Control Panel Applet
|
||||||
|
*
|
||||||
|
* main.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Dickenson <robd@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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
#include <windows.h>
|
||||||
|
#include <cpl.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
//#include <shellapi.h>
|
||||||
|
#include "main.h"
|
||||||
|
#include "system.h"
|
||||||
|
#include "trace.h"
|
||||||
|
|
||||||
|
#ifndef __GNUC__
|
||||||
|
//#define CPL_STARTWPARAMS CPL_STARTWPARMS
|
||||||
|
//#define CPL_DBLCLICK CPL_DBLCLK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Global Variables:
|
||||||
|
//
|
||||||
|
|
||||||
|
extern HMODULE hModule;
|
||||||
|
|
||||||
|
typedef struct tagCPlAppletInstanceData {
|
||||||
|
HWND hWnd;
|
||||||
|
LONG lData;
|
||||||
|
} CPlAppletInstanceData;
|
||||||
|
|
||||||
|
CPlAppletInstanceData SystemAppletData = { 0, 0L };
|
||||||
|
CPlAppletInstanceData IrDaAppletData = { 0, 1L };
|
||||||
|
CPlAppletInstanceData MouseAppletData = { 0, 2L };
|
||||||
|
CPlAppletInstanceData KeyboardAppletData = { 0, 3L };
|
||||||
|
CPlAppletInstanceData RegionsAppletData = { 0, 4L };
|
||||||
|
CPlAppletInstanceData UsersAppletData = { 0, 5L };
|
||||||
|
CPlAppletInstanceData DateTimeAppletData = { 0, 6L };
|
||||||
|
CPlAppletInstanceData FoldersAppletData = { 0, 7L };
|
||||||
|
CPlAppletInstanceData DisplayAppletData = { 0, 8L };
|
||||||
|
CPlAppletInstanceData AccessibleAppletData = { 0, 9L };
|
||||||
|
CPlAppletInstanceData PhoneModemAppletData = { 0, 10L };
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Local Support Functions:
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
typedef LONG (*LaunchAppletProc)(UINT, LONG, BOOL);
|
||||||
|
|
||||||
|
typedef struct tagCPLAppletINFO {
|
||||||
|
UINT _uAppNum;
|
||||||
|
CPLINFO info;
|
||||||
|
LaunchAppletProc proc;
|
||||||
|
CPlAppletInstanceData* pData;
|
||||||
|
} CPLAppletINFO;
|
||||||
|
|
||||||
|
static LONG LaunchCommonAppletDlg(UINT uAppNum, LONG lData, BOOL start);
|
||||||
|
|
||||||
|
static CPLAppletINFO cplAppletInfoArray[] = {
|
||||||
|
{ 0, IDI_CPL_SYSTEM_ICON, IDS_CPL_SYSTEM_NAME, IDS_CPL_SYSTEM_INFO, 0L, LaunchCommonAppletDlg, &SystemAppletData },
|
||||||
|
{ 1, IDI_CPL_IRDA_ICON, IDS_CPL_IRDA_NAME, IDS_CPL_IRDA_INFO, 0L, LaunchCommonAppletDlg, &IrDaAppletData },
|
||||||
|
{ 2, IDI_CPL_MOUSE_ICON, IDS_CPL_MOUSE_NAME, IDS_CPL_MOUSE_INFO, 0L, LaunchCommonAppletDlg, &MouseAppletData },
|
||||||
|
{ 3, IDI_CPL_KEYBOARD_ICON, IDS_CPL_KEYBOARD_NAME, IDS_CPL_KEYBOARD_INFO, 0L, LaunchCommonAppletDlg, &KeyboardAppletData },
|
||||||
|
{ 4, IDI_CPL_REGIONS_ICON, IDS_CPL_REGIONS_NAME, IDS_CPL_REGIONS_INFO, 0L, LaunchCommonAppletDlg, &RegionsAppletData },
|
||||||
|
{ 5, IDI_CPL_USERS_ICON, IDS_CPL_USERS_NAME, IDS_CPL_USERS_INFO, 0L, LaunchCommonAppletDlg, &UsersAppletData },
|
||||||
|
{ 6, IDI_CPL_DATETIME_ICON, IDS_CPL_DATETIME_NAME, IDS_CPL_DATETIME_INFO, 0L, LaunchCommonAppletDlg, &DateTimeAppletData },
|
||||||
|
{ 7, IDI_CPL_FOLDERS_ICON, IDS_CPL_FOLDERS_NAME, IDS_CPL_FOLDERS_INFO, 0L, LaunchCommonAppletDlg, &FoldersAppletData },
|
||||||
|
{ 8, IDI_CPL_DISPLAY_ICON, IDS_CPL_DISPLAY_NAME, IDS_CPL_DISPLAY_INFO, 0L, LaunchCommonAppletDlg, &DisplayAppletData },
|
||||||
|
{ 9, IDI_CPL_ACCESSIBLE_ICON, IDS_CPL_ACCESSIBLE_NAME, IDS_CPL_ACCESSIBLE_INFO, 0L, LaunchCommonAppletDlg, &AccessibleAppletData },
|
||||||
|
{10, IDI_CPL_PHONE_MODEM_ICON, IDS_CPL_PHONE_MODEM_NAME, IDS_CPL_PHONE_MODEM_INFO, 0L, LaunchCommonAppletDlg, &PhoneModemAppletData },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static LONG LaunchCommonAppletDlg(UINT uAppNum, LONG lData, BOOL start)
|
||||||
|
{
|
||||||
|
if (start) {
|
||||||
|
|
||||||
|
if (!cplAppletInfoArray[uAppNum].pData->hWnd) {
|
||||||
|
cplAppletInfoArray[uAppNum].pData->hWnd = CreateDialogParam(hModule, MAKEINTRESOURCE(IDD_CPL_TABBED_DIALOG), NULL, (DLGPROC)CPlAppletDlgProc, (LPARAM)(cplAppletInfoArray[uAppNum].pData));
|
||||||
|
ShowWindow(cplAppletInfoArray[uAppNum].pData->hWnd, SW_SHOW);
|
||||||
|
} else {
|
||||||
|
// find the applet window, make forground and set focus
|
||||||
|
SetForegroundWindow(cplAppletInfoArray[uAppNum].pData->hWnd);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (cplAppletInfoArray[uAppNum].pData->hWnd) {
|
||||||
|
DestroyWindow(cplAppletInfoArray[uAppNum].pData->hWnd);
|
||||||
|
cplAppletInfoArray[uAppNum].pData->hWnd = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
static LONG InitialiseProc(VOID) // return zero on failure to initialise, host will then drop us
|
||||||
|
{
|
||||||
|
// if (failed_to_initialise) return 0;
|
||||||
|
return 1L;
|
||||||
|
}
|
||||||
|
|
||||||
|
LONG GetCountProc(VOID)
|
||||||
|
{
|
||||||
|
return (sizeof(cplAppletInfoArray)/sizeof(CPLAppletINFO));
|
||||||
|
}
|
||||||
|
|
||||||
|
static LONG InquireProc(UINT uAppNum, CPLINFO* pCPLInfo)
|
||||||
|
{
|
||||||
|
if (uAppNum < (sizeof(cplAppletInfoArray)/sizeof(CPLAppletINFO))) {
|
||||||
|
if (pCPLInfo != NULL) {
|
||||||
|
pCPLInfo->idName = cplAppletInfoArray[uAppNum].info.idName;
|
||||||
|
pCPLInfo->idInfo = cplAppletInfoArray[uAppNum].info.idInfo;
|
||||||
|
pCPLInfo->idIcon = cplAppletInfoArray[uAppNum].info.idIcon;
|
||||||
|
pCPLInfo->lData = cplAppletInfoArray[uAppNum].pData->lData;
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1L;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LONG NewInquireProc(UINT uAppNum, NEWCPLINFO* pNewCPLInfo)
|
||||||
|
{
|
||||||
|
if (uAppNum < (sizeof(cplAppletInfoArray)/sizeof(CPLAppletINFO))) {
|
||||||
|
if (pNewCPLInfo != NULL) {
|
||||||
|
// pNewCPLInfo->idName = cplAppletInfoArray[uAppNum].info.idName;
|
||||||
|
// pNewCPLInfo->idInfo = cplAppletInfoArray[uAppNum].info.idInfo;
|
||||||
|
// pNewCPLInfo->idIcon = cplAppletInfoArray[uAppNum].info.idIcon;
|
||||||
|
// return 0L;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1L;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LONG StartWithParamsProc(UINT uAppNum, LPCTSTR lpszExtra) // return TRUE if handled, FALSE otherwise
|
||||||
|
{
|
||||||
|
TRACE(_T("StartWithParamsProc(%u, %s)\n"), uAppNum, lpszExtra);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LONG DblClickProc(UINT uAppNum, LONG lData) // return zero on success, nonzero otherwise
|
||||||
|
{
|
||||||
|
TRACE(_T("DblClickProc(%u, %d)\n"), uAppNum, lData);
|
||||||
|
|
||||||
|
if (uAppNum < (sizeof(cplAppletInfoArray)/sizeof(CPLAppletINFO))) {
|
||||||
|
return cplAppletInfoArray[uAppNum].proc(uAppNum, lData, TRUE);
|
||||||
|
}
|
||||||
|
return 1L;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LONG StopProc(UINT uAppNum, LONG lData) // return zero if processed successfully
|
||||||
|
{
|
||||||
|
if (uAppNum < (sizeof(cplAppletInfoArray)/sizeof(CPLAppletINFO))) {
|
||||||
|
return cplAppletInfoArray[uAppNum].proc(uAppNum, lData, FALSE);
|
||||||
|
}
|
||||||
|
return 1L;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LONG ExitProc(VOID) // return zero if processed successfully
|
||||||
|
{
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
static BOOL initialised = FALSE;
|
||||||
|
|
||||||
|
LONG WINAPI CPlApplet(HWND hWnd, UINT message, LONG lParam1, LONG lParam2)
|
||||||
|
{
|
||||||
|
if (!initialised) { // this probably isn't required, or at least move to DllMain ?
|
||||||
|
initialised = TRUE;
|
||||||
|
// Initialize the Windows Common Controls DLL
|
||||||
|
InitCommonControls();
|
||||||
|
}
|
||||||
|
switch (message) {
|
||||||
|
case CPL_INIT:
|
||||||
|
return InitialiseProc();
|
||||||
|
case CPL_GETCOUNT:
|
||||||
|
return GetCountProc();
|
||||||
|
case CPL_INQUIRE:
|
||||||
|
return InquireProc((UINT)lParam1, (CPLINFO*)lParam2);
|
||||||
|
case CPL_NEWINQUIRE:
|
||||||
|
return NewInquireProc((UINT)lParam1, (NEWCPLINFO*)lParam2);
|
||||||
|
case CPL_STARTWPARMS:
|
||||||
|
return StartWithParamsProc((UINT)lParam1, (LPCTSTR)lParam2);
|
||||||
|
case CPL_DBLCLK:
|
||||||
|
return DblClickProc((UINT)lParam1, lParam2);
|
||||||
|
case CPL_STOP:
|
||||||
|
return StopProc((UINT)lParam1, lParam2);
|
||||||
|
case CPL_EXIT:
|
||||||
|
return ExitProc();
|
||||||
|
default:
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
return 1L;
|
||||||
|
}
|
99
rosapps/ctlpanel/roscfg/main.h
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
/*
|
||||||
|
* ReactOS Control Panel Applet
|
||||||
|
*
|
||||||
|
* main.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Dickenson <robd@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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __MAIN_H__
|
||||||
|
#define __MAIN_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define STATUS_WINDOW 2001
|
||||||
|
#define TREE_WINDOW 2002
|
||||||
|
#define LIST_WINDOW 2003
|
||||||
|
|
||||||
|
#define MAX_LOADSTRING 100
|
||||||
|
#define SPLIT_WIDTH 5
|
||||||
|
#define MAX_NAME_LEN 500
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
enum OPTION_FLAGS {
|
||||||
|
OPTIONS_AUTO_REFRESH = 0x01,
|
||||||
|
OPTIONS_READ_ONLY_MODE = 0x02,
|
||||||
|
OPTIONS_CONFIRM_ON_DELETE = 0x04,
|
||||||
|
OPTIONS_SAVE_ON_EXIT = 0x08,
|
||||||
|
OPTIONS_DISPLAY_BINARY_DATA = 0x10,
|
||||||
|
OPTIONS_VIEW_TREE_ONLY = 0x20,
|
||||||
|
OPTIONS_VIEW_DATA_ONLY = 0x40,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
HWND hWnd;
|
||||||
|
HWND hTreeWnd;
|
||||||
|
HWND hListWnd;
|
||||||
|
int nFocusPanel; // 0: left 1: right
|
||||||
|
int nSplitPos;
|
||||||
|
WINDOWPLACEMENT pos;
|
||||||
|
TCHAR szPath[MAX_PATH];
|
||||||
|
} ChildWnd;
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Global Variables:
|
||||||
|
//
|
||||||
|
extern HINSTANCE hInst;
|
||||||
|
extern HWND hFrameWnd;
|
||||||
|
extern HMENU hMenuFrame;
|
||||||
|
extern HWND hStatusBar;
|
||||||
|
extern HFONT hFont;
|
||||||
|
extern enum OPTION_FLAGS Options;
|
||||||
|
|
||||||
|
extern TCHAR szTitle[];
|
||||||
|
extern TCHAR szWindowClass[];
|
||||||
|
|
||||||
|
extern LONG GetCountProc(VOID);
|
||||||
|
|
||||||
|
LRESULT CALLBACK CPlAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
|
#if __MINGW32_MAJOR_VERSION == 1
|
||||||
|
typedef struct tagNMITEMACTIVATE{
|
||||||
|
NMHDR hdr;
|
||||||
|
int iItem;
|
||||||
|
int iSubItem;
|
||||||
|
UINT uNewState;
|
||||||
|
UINT uOldState;
|
||||||
|
UINT uChanged;
|
||||||
|
POINT ptAction;
|
||||||
|
LPARAM lParam;
|
||||||
|
UINT uKeyFlags;
|
||||||
|
} NMITEMACTIVATE, FAR *LPNMITEMACTIVATE;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __MAIN_H__
|
38
rosapps/ctlpanel/roscfg/makefile
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# $Id: makefile,v 1.1 2003/10/25 13:21:40 robd Exp $
|
||||||
|
|
||||||
|
PATH_TO_TOP = ../../../reactos
|
||||||
|
|
||||||
|
TOOLS_PATH = $(PATH_TO_TOP)/tools
|
||||||
|
|
||||||
|
TARGET_TYPE = dynlink
|
||||||
|
|
||||||
|
TARGET_NAME = roscfg
|
||||||
|
|
||||||
|
TARGET_SDKLIBS = ntdll.a kernel32.a user32.a gdi32.a
|
||||||
|
|
||||||
|
TARGET_GCCLIBS = advapi32 comctl32 comdlg32 version
|
||||||
|
|
||||||
|
# TARGET_CFLAGS = -DUNICODE
|
||||||
|
|
||||||
|
TARGET_EXTENSION = .cpl
|
||||||
|
|
||||||
|
TARGET_BASE = 0x77dc0000
|
||||||
|
|
||||||
|
TARGET_OBJECTS = \
|
||||||
|
dllmain.o \
|
||||||
|
main.o \
|
||||||
|
system.o \
|
||||||
|
common.o \
|
||||||
|
datetime.o \
|
||||||
|
trace.o
|
||||||
|
|
||||||
|
TARGET_CLEAN = %(TARGET_OBJECTS) $(TARGET_NAME).coff
|
||||||
|
|
||||||
|
include $(PATH_TO_TOP)/rules.mak
|
||||||
|
|
||||||
|
include $(TOOLS_PATH)/helper.mk
|
||||||
|
|
||||||
|
MK_CFLAGS = -D_WIN32_IE=0x0400 -D_UNICODE -DUNICODE -D_DEBUG -I./
|
||||||
|
MK_CPPFLAGS = -D_WIN32_IE=0x0400 -D_UNICODE -DUNICODE -D_DEBUG -I./
|
||||||
|
MK_RCFLAGS = -D_WIN32_IE=0x0400 -D_UNICODE -DUNICODE -D_DEBUG
|
||||||
|
|
BIN
rosapps/ctlpanel/roscfg/res/accessib.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
rosapps/ctlpanel/roscfg/res/datetime.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
rosapps/ctlpanel/roscfg/res/folders.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
rosapps/ctlpanel/roscfg/res/irda.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
rosapps/ctlpanel/roscfg/res/keyboard.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
rosapps/ctlpanel/roscfg/res/mouse.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
rosapps/ctlpanel/roscfg/res/regions.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
rosapps/ctlpanel/roscfg/res/screen.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
rosapps/ctlpanel/roscfg/res/system.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
rosapps/ctlpanel/roscfg/res/users.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
183
rosapps/ctlpanel/roscfg/resource.h
Normal file
|
@ -0,0 +1,183 @@
|
||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
|
||||||
|
#define ID_FILE_MENU 0
|
||||||
|
#define ID_VIEW_MENU 1
|
||||||
|
#define ID_HELP_MENU 2
|
||||||
|
|
||||||
|
#define IDR_CONTROL_MENU 89
|
||||||
|
#define IDD_CPL_TABBED_DIALOG 90
|
||||||
|
|
||||||
|
#define IDS_LIST_COLUMN_FIRST 91
|
||||||
|
#define IDS_LIST_COLUMN_NAME 91
|
||||||
|
#define IDS_LIST_COLUMN_COMMENT 92
|
||||||
|
#define IDS_LIST_COLUMN_VERSION 93
|
||||||
|
#define IDS_LIST_COLUMN_LAST 93
|
||||||
|
|
||||||
|
#define IDS_APP_TITLE 103
|
||||||
|
#define IDI_CONTROL 107
|
||||||
|
#define IDC_CONTROL 109
|
||||||
|
|
||||||
|
#define IDD_CPL_SYSTEM_GENERAL_PAGE 110
|
||||||
|
#define IDD_CPL_SYSTEM_NETWORK_PAGE 111
|
||||||
|
#define IDD_CPL_SYSTEM_HARDWARE_PAGE 112
|
||||||
|
#define IDD_CPL_SYSTEM_USERS_PAGE 113
|
||||||
|
#define IDD_CPL_SYSTEM_ADVANCED_PAGE 114
|
||||||
|
|
||||||
|
#define IDD_CPL_KEYBOARD_SPEED_PAGE 115
|
||||||
|
#define IDD_CPL_KEYBOARD_LOCALES_PAGE 116
|
||||||
|
#define IDD_CPL_KEYBOARD_HARDWARE_PAGE 117
|
||||||
|
|
||||||
|
#define IDD_CPL_MOUSE_BUTTONS_PAGE 118
|
||||||
|
#define IDD_CPL_MOUSE_POINTERS_PAGE 119
|
||||||
|
#define IDD_CPL_MOUSE_MOTION_PAGE 120
|
||||||
|
#define IDD_CPL_MOUSE_HARDWARE_PAGE 121
|
||||||
|
|
||||||
|
#define IDD_CPL_USERS_USERS_PAGE 122
|
||||||
|
#define IDD_CPL_USERS_ADVANCED_PAGE 123
|
||||||
|
|
||||||
|
#define IDD_CPL_DISPLAY_BACKGROUND_PAGE 124
|
||||||
|
#define IDD_CPL_DISPLAY_SCREEN_SAVER_PAGE 125
|
||||||
|
#define IDD_CPL_DISPLAY_APPEARANCE_PAGE 126
|
||||||
|
#define IDD_CPL_DISPLAY_WEB_PAGE 127
|
||||||
|
#define IDD_CPL_DISPLAY_EFFECTS_PAGE 128
|
||||||
|
#define IDD_CPL_DISPLAY_SETTINGS_PAGE 129
|
||||||
|
|
||||||
|
#define IDD_CPL_FOLDERS_GENERAL_PAGE 130
|
||||||
|
#define IDD_CPL_FOLDERS_VIEW_PAGE 131
|
||||||
|
#define IDD_CPL_FOLDERS_FILE_TYPES_PAGE 132
|
||||||
|
#define IDD_CPL_FOLDERS_OFFLINE_FILES_PAGE 133
|
||||||
|
|
||||||
|
#define IDD_CPL_REGIONAL_GENERAL_PAGE 134
|
||||||
|
#define IDD_CPL_REGIONAL_NUMBERS_PAGE 135
|
||||||
|
#define IDD_CPL_REGIONAL_CURRENCY_PAGE 136
|
||||||
|
#define IDD_CPL_REGIONAL_TIME_PAGE 137
|
||||||
|
#define IDD_CPL_REGIONAL_DATE_PAGE 138
|
||||||
|
#define IDD_CPL_REGIONAL_INPUT_LOCALES_PAGE 139
|
||||||
|
|
||||||
|
#define IDD_CPL_DATETIME_DATETIME_PAGE 140
|
||||||
|
#define IDD_CPL_DATETIME_TIMEZONE_PAGE 141
|
||||||
|
|
||||||
|
#define IDD_CPL_IRDA_FILE_TRANSFER_PAGE 142
|
||||||
|
#define IDD_CPL_IRDA_IMAGE_TRANSFER_PAGE 143
|
||||||
|
#define IDD_CPL_IRDA_HARDWARE_PAGE 144
|
||||||
|
|
||||||
|
#define IDD_CPL_ACCESSIBLE_KEYBOARD_PAGE 145
|
||||||
|
#define IDD_CPL_ACCESSIBLE_GENERAL_PAGE 146
|
||||||
|
#define IDD_CPL_ACCESSIBLE_SOUNDL_PAGE 147
|
||||||
|
#define IDD_CPL_ACCESSIBLE_DISPLAY_PAGE 148
|
||||||
|
#define IDD_CPL_ACCESSIBLE_MOUSE_PAGE 149
|
||||||
|
|
||||||
|
#define IDD_CPL_PHONE_MODEM_DIALING_PAGE 150
|
||||||
|
#define IDD_CPL_PHONE_MODEM_MODEMS_PAGE 151
|
||||||
|
#define IDD_CPL_PHONE_MODEM_ADVANCED_PAGE 152
|
||||||
|
|
||||||
|
#define ID_OK 1000
|
||||||
|
#define ID_CANCEL 1001
|
||||||
|
#define ID_APPLY 1002
|
||||||
|
|
||||||
|
#define IDC_CPL_DATETIME_TIME_EDIT 1005
|
||||||
|
#define IDC_CPL_IRDA_HARDWARE_DEVICE_LIST 1006
|
||||||
|
#define IDC_CPL_DATETIME_MONTH_COMBO 1007
|
||||||
|
#define IDC_CPL_DATETIME_YEAR_SPIN 1008
|
||||||
|
#define IDC_CPL_DATETIME_TIME_SPIN 1010
|
||||||
|
#define IDC_CPL_DATETIME_CURRENT_TIMEZONE_EDIT 1011
|
||||||
|
#define IDC_CPL_DATETIME_TIMEZONE_COMBO 1015
|
||||||
|
#define IDC_CPL_DATETIME_EARTHMAP_IMAGE 1018
|
||||||
|
#define IDC_CPL_DATETIME_YEAR_EDIT 1019
|
||||||
|
#define IDC_CPL_DATETIME_DAYLIGHT_SAVINGS_CHECK 1020
|
||||||
|
#define IDC_CPL_DATETIME_MONTHCALENDAR 1021
|
||||||
|
#define IDC_CPL_DATETIME_CLOCKFACE 1022
|
||||||
|
|
||||||
|
|
||||||
|
#define ID_FILE_EXIT 32771
|
||||||
|
#define ID_VIEW_TOOLBAR 32772
|
||||||
|
#define ID_VIEW_STATUSBAR 32773
|
||||||
|
#define ID_VIEW_LARGE_ICONS 32774
|
||||||
|
#define ID_VIEW_SMALL_ICONS 32775
|
||||||
|
#define ID_VIEW_LIST 32776
|
||||||
|
#define ID_VIEW_DETAILS 32777
|
||||||
|
#define ID_VIEW_ARRANGE_ICONS 32778
|
||||||
|
#define ID_VIEW_ARRANGE_BY_NAME 32779
|
||||||
|
#define ID_VIEW_ARRANGE_BY_COMMENT 32780
|
||||||
|
#define ID_VIEW_ARRANGE_AUTO 32781
|
||||||
|
#define ID_VIEW_LINE_UP_ICONS 32782
|
||||||
|
#define ID_VIEW_REFRESH 32783
|
||||||
|
#define ID_HELP_ABOUT 32784
|
||||||
|
|
||||||
|
#define IDC_CPL_DIALOG_TAB 160
|
||||||
|
#define IDC_CPL_SYSTEM_DLG 161
|
||||||
|
#define IDC_CPL_IRDA_DLG 162
|
||||||
|
#define IDC_CPL_MOUSE_DLG 163
|
||||||
|
#define IDC_CPL_KEYBOARD_DLG 164
|
||||||
|
#define IDC_CPL_REGIONAL_DLG 165
|
||||||
|
#define IDC_CPL_USERS_DLG 166
|
||||||
|
#define IDC_CPL_DATETIME_DLG 167
|
||||||
|
#define IDC_CPL_FOLDERS_DLG 168
|
||||||
|
#define IDC_CPL_DISPLAY_DLG 169
|
||||||
|
#define IDC_CPL_ACCESSIBLE_DLG 170
|
||||||
|
#define IDC_CPL_PHONE_MODEM_DLG 171
|
||||||
|
|
||||||
|
#define IDI_CPL_SYSTEM_ICON 210
|
||||||
|
#define IDI_CPL_IRDA_ICON 211
|
||||||
|
#define IDI_CPL_MOUSE_ICON 212
|
||||||
|
#define IDI_CPL_KEYBOARD_ICON 213
|
||||||
|
#define IDI_CPL_REGIONS_ICON 214
|
||||||
|
#define IDI_CPL_USERS_ICON 215
|
||||||
|
#define IDI_CPL_DATETIME_ICON 216
|
||||||
|
#define IDI_CPL_FOLDERS_ICON 217
|
||||||
|
#define IDI_CPL_DISPLAY_ICON 218
|
||||||
|
#define IDI_CPL_ACCESSIBLE_ICON 219
|
||||||
|
#define IDI_CPL_PHONE_MODEM_ICON 220
|
||||||
|
|
||||||
|
#define IDS_CPL_SYSTEM_NAME 221
|
||||||
|
#define IDS_CPL_SYSTEM_INFO 222
|
||||||
|
#define IDS_CPL_IRDA_NAME 223
|
||||||
|
#define IDS_CPL_IRDA_INFO 224
|
||||||
|
#define IDS_CPL_MOUSE_NAME 225
|
||||||
|
#define IDS_CPL_MOUSE_INFO 226
|
||||||
|
#define IDS_CPL_KEYBOARD_NAME 227
|
||||||
|
#define IDS_CPL_KEYBOARD_INFO 228
|
||||||
|
#define IDS_CPL_REGIONS_NAME 229
|
||||||
|
#define IDS_CPL_REGIONS_INFO 230
|
||||||
|
#define IDS_CPL_USERS_NAME 231
|
||||||
|
#define IDS_CPL_USERS_INFO 232
|
||||||
|
#define IDS_CPL_DATETIME_NAME 233
|
||||||
|
#define IDS_CPL_DATETIME_INFO 234
|
||||||
|
#define IDS_CPL_FOLDERS_NAME 235
|
||||||
|
#define IDS_CPL_FOLDERS_INFO 236
|
||||||
|
#define IDS_CPL_DISPLAY_NAME 237
|
||||||
|
#define IDS_CPL_DISPLAY_INFO 238
|
||||||
|
|
||||||
|
#define IDS_CPL_ACCESSIBLE_NAME 239
|
||||||
|
#define IDS_CPL_ACCESSIBLE_INFO 240
|
||||||
|
#define IDS_CPL_PHONE_MODEM_NAME 241
|
||||||
|
#define IDS_CPL_PHONE_MODEM_INFO 242
|
||||||
|
|
||||||
|
#define IDS_CPL_DATETIME_MONTH_1 250
|
||||||
|
#define IDS_CPL_DATETIME_MONTH_2 251
|
||||||
|
#define IDS_CPL_DATETIME_MONTH_3 252
|
||||||
|
#define IDS_CPL_DATETIME_MONTH_4 253
|
||||||
|
#define IDS_CPL_DATETIME_MONTH_5 254
|
||||||
|
#define IDS_CPL_DATETIME_MONTH_6 255
|
||||||
|
#define IDS_CPL_DATETIME_MONTH_7 256
|
||||||
|
#define IDS_CPL_DATETIME_MONTH_8 257
|
||||||
|
#define IDS_CPL_DATETIME_MONTH_9 258
|
||||||
|
#define IDS_CPL_DATETIME_MONTH_10 259
|
||||||
|
#define IDS_CPL_DATETIME_MONTH_11 260
|
||||||
|
#define IDS_CPL_DATETIME_MONTH_12 261
|
||||||
|
|
||||||
|
#define IDC_STATIC -1
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 145
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 32780
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 115
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
54
rosapps/ctlpanel/roscfg/resrc1.h
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Developer Studio generated include file.
|
||||||
|
// Used by roscfg.rc
|
||||||
|
//
|
||||||
|
#define IDB_EARTH16 134
|
||||||
|
#define IDB_EARTH256 136
|
||||||
|
#define IDC_CHECK1 1001
|
||||||
|
#define IDC_CHECK2 1002
|
||||||
|
#define IDC_CHECK3 1003
|
||||||
|
#define IDC_EDIT1 1004
|
||||||
|
#define IDC_CHECK4 1004
|
||||||
|
#define IDC_BUTTON1 1005
|
||||||
|
#define IDC_EDIT5 1005
|
||||||
|
#define IDC_BUTTON3 1006
|
||||||
|
#define IDC_BUTTON2 1007
|
||||||
|
#define IDC_COMBO1 1007
|
||||||
|
#define IDC_BUTTON6 1007
|
||||||
|
#define IDC_EDIT2 1008
|
||||||
|
#define IDC_SPIN1 1008
|
||||||
|
#define IDC_BUTTON4 1008
|
||||||
|
#define IDC_BUTTON7 1008
|
||||||
|
#define IDC_CHECK5 1008
|
||||||
|
#define IDC_COMBO2 1008
|
||||||
|
#define IDC_EDIT3 1009
|
||||||
|
#define IDC_MONTHCALENDAR1 1009
|
||||||
|
#define IDC_BUTTON5 1009
|
||||||
|
#define IDC_CHECK6 1009
|
||||||
|
#define IDC_COMBO3 1009
|
||||||
|
#define IDC_EDIT4 1010
|
||||||
|
#define IDC_SPIN2 1010
|
||||||
|
#define IDC_EDIT6 1011
|
||||||
|
#define IDC_SLIDER1 1012
|
||||||
|
#define IDC_SLIDER2 1013
|
||||||
|
#define IDC_RADIO1 1013
|
||||||
|
#define IDC_SLIDER3 1014
|
||||||
|
#define IDC_RADIO2 1014
|
||||||
|
#define IDC_RADIO3 1015
|
||||||
|
#define IDC_RADIO4 1016
|
||||||
|
#define IDC_LIST1 1023
|
||||||
|
#define IDC_ANIMATE1 1024
|
||||||
|
#define IDC_LIST2 1025
|
||||||
|
#define IDC_COMBO4 1026
|
||||||
|
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 138
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 32780
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1028
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 110
|
||||||
|
#endif
|
||||||
|
#endif
|
9
rosapps/ctlpanel/roscfg/roscfg.def
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
;
|
||||||
|
; roscfg.def
|
||||||
|
;
|
||||||
|
; ReactOS Operating System
|
||||||
|
;
|
||||||
|
;
|
||||||
|
LIBRARY roscfg.cpl
|
||||||
|
EXPORTS
|
||||||
|
CPlApplet
|
9
rosapps/ctlpanel/roscfg/roscfg.edf
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
;
|
||||||
|
; roscfg.edf
|
||||||
|
;
|
||||||
|
; ReactOS Operating System
|
||||||
|
;
|
||||||
|
;
|
||||||
|
LIBRARY roscfg.cpl
|
||||||
|
EXPORTS
|
||||||
|
CPlApplet=CPlApplet@16
|
893
rosapps/ctlpanel/roscfg/roscfg.rc
Normal file
|
@ -0,0 +1,893 @@
|
||||||
|
//Microsoft Developer Studio generated resource script.
|
||||||
|
//
|
||||||
|
#include "resrc1.h"
|
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
|
//
|
||||||
|
#include "defines.h"
|
||||||
|
#include "reactos\resource.h"
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// English (U.S.) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Icon
|
||||||
|
//
|
||||||
|
|
||||||
|
// Icon with lowest ID value placed first to ensure application icon
|
||||||
|
// remains consistent on all systems.
|
||||||
|
IDI_CPL_SYSTEM_ICON ICON DISCARDABLE "res/system.ico"
|
||||||
|
IDI_CPL_IRDA_ICON ICON DISCARDABLE "res/irda.ico"
|
||||||
|
IDI_CPL_MOUSE_ICON ICON DISCARDABLE "res/mouse.ico"
|
||||||
|
IDI_CPL_KEYBOARD_ICON ICON DISCARDABLE "res/keyboard.ico"
|
||||||
|
IDI_CPL_REGIONS_ICON ICON DISCARDABLE "res/regions.ico"
|
||||||
|
IDI_CPL_USERS_ICON ICON DISCARDABLE "res/users.ico"
|
||||||
|
IDI_CPL_DATETIME_ICON ICON DISCARDABLE "res/datetime.ico"
|
||||||
|
IDI_CPL_FOLDERS_ICON ICON DISCARDABLE "res/folders.ico"
|
||||||
|
IDI_CPL_DISPLAY_ICON ICON DISCARDABLE "res/display.ico"
|
||||||
|
IDI_CPL_ACCESSIBLE_ICON ICON DISCARDABLE "res/accessib.ico"
|
||||||
|
IDI_CPL_PHONE_MODEM_ICON ICON DISCARDABLE "res/phonemod.ico"
|
||||||
|
|
||||||
|
#ifndef _MAC
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Version
|
||||||
|
//
|
||||||
|
|
||||||
|
(1) VERSIONINFO
|
||||||
|
FILEVERSION 0,0,19,154
|
||||||
|
PRODUCTVERSION 0,0,19,0
|
||||||
|
FILEFLAGSMASK 0x3fL
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS 0x1L
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS 0x40004L
|
||||||
|
FILETYPE 0x2L
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", "ReactOS Development Team\0"
|
||||||
|
VALUE "FileDescription", "ReactOS System Control Panel Applet\0"
|
||||||
|
VALUE "FileVersion", "0.0.19.154\0"
|
||||||
|
VALUE "InternalName", "roscfg\0"
|
||||||
|
VALUE "LegalCopyright", "Copyright (c) 1998-2002 ReactOS Team\0"
|
||||||
|
VALUE "OriginalFilename", "roscfg.cpl\0"
|
||||||
|
VALUE "ProductName", "ReactOS Operating System\0"
|
||||||
|
VALUE "ProductVersion", "0.0.19\0"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // !_MAC
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Dialog
|
||||||
|
//
|
||||||
|
|
||||||
|
IDD_CPL_TABBED_DIALOG DIALOG DISCARDABLE 0, 0, 152, 78
|
||||||
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
|
||||||
|
WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Tabbed Applet"
|
||||||
|
FONT 8, "MS Sans Serif"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "Tab1",IDC_CPL_DIALOG_TAB,"SysTabControl32",WS_TABSTOP,7,
|
||||||
|
7,142,47
|
||||||
|
PUSHBUTTON "&Cancel",IDCANCEL,103,59,45,14
|
||||||
|
PUSHBUTTON "OK",IDOK,55,59,45,14
|
||||||
|
PUSHBUTTON "&Apply",ID_APPLY,7,59,45,14
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_SYSTEM_GENERAL_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_SYSTEM_NETWORK_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_SYSTEM_HARDWARE_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_SYSTEM_USERS_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_SYSTEM_ADVANCED_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_KEYBOARD_SPEED_PAGE DIALOG DISCARDABLE 10, 10, 220, 161
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
GROUPBOX "Character repeat",IDC_STATIC,3,4,209,100
|
||||||
|
GROUPBOX "Cursor blink rate",IDC_STATIC,3,104,209,50
|
||||||
|
CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_AUTOTICKS |
|
||||||
|
WS_TABSTOP,35,123,145,12
|
||||||
|
LTEXT "Slow",IDC_STATIC,5,132,26,8
|
||||||
|
LTEXT "Fast",IDC_STATIC,188,131,21,9
|
||||||
|
CONTROL "Slider1",IDC_SLIDER2,"msctls_trackbar32",TBS_AUTOTICKS |
|
||||||
|
WS_TABSTOP,44,53,145,12
|
||||||
|
LTEXT "Fast",IDC_STATIC,191,48,21,9
|
||||||
|
LTEXT "Slow",IDC_STATIC,10,48,26,8
|
||||||
|
EDITTEXT IDC_EDIT2,13,84,193,12,ES_AUTOHSCROLL
|
||||||
|
LTEXT "Click here and hold down a key to test repeat rate:",
|
||||||
|
IDC_STATIC,13,74,169,10
|
||||||
|
LTEXT "Repeat rate:",IDC_STATIC,36,40,63,8
|
||||||
|
LTEXT "Repeat rate:",IDC_STATIC,31,10,63,8
|
||||||
|
CONTROL "Slider1",IDC_SLIDER3,"msctls_trackbar32",TBS_AUTOTICKS |
|
||||||
|
WS_TABSTOP,42,21,145,12
|
||||||
|
LTEXT "Short",IDC_STATIC,189,15,21,9
|
||||||
|
LTEXT "Long",IDC_STATIC,8,20,26,8
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_KEYBOARD_LOCALES_PAGE DIALOG DISCARDABLE 10, 10, 247, 190
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
GROUPBOX "Installed input locales",IDC_STATIC,7,3,232,76
|
||||||
|
GROUPBOX "To turn off Caps Lock",IDC_STATIC,6,85,233,22
|
||||||
|
GROUPBOX "Hot keys for input locales",IDC_STATIC,7,112,233,62
|
||||||
|
LTEXT "Item",IDC_STATIC,11,123,31,8
|
||||||
|
LTEXT "Key sequence",IDC_STATIC,166,124,67,8
|
||||||
|
CONTROL "Enable indicator on taskbar",IDC_CHECK1,"Button",
|
||||||
|
BS_AUTOCHECKBOX | WS_TABSTOP,6,177,163,8
|
||||||
|
LTEXT "Keyboard layout",IDC_STATIC,148,16,82,8
|
||||||
|
LTEXT "Input language",IDC_STATIC,13,15,98,8
|
||||||
|
CONTROL "Press CAPS LOCK key",IDC_RADIO1,"Button",
|
||||||
|
BS_AUTORADIOBUTTON,15,94,85,9
|
||||||
|
CONTROL "Press SHIFT key",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,
|
||||||
|
129,94,99,10
|
||||||
|
LISTBOX IDC_LIST1,11,25,224,33,LBS_SORT | LBS_NOINTEGRALHEIGHT |
|
||||||
|
WS_VSCROLL | WS_TABSTOP
|
||||||
|
PUSHBUTTON "A&dd",IDC_BUTTON1,11,62,55,12
|
||||||
|
PUSHBUTTON "&Remove",IDC_BUTTON3,69,62,55,12
|
||||||
|
PUSHBUTTON "&Properties",IDC_BUTTON6,126,62,55,12
|
||||||
|
PUSHBUTTON "&Set as Default",IDC_BUTTON7,183,62,55,12
|
||||||
|
LISTBOX IDC_LIST2,11,132,221,23,LBS_SORT | LBS_NOINTEGRALHEIGHT |
|
||||||
|
WS_VSCROLL | WS_TABSTOP
|
||||||
|
PUSHBUTTON "&Change Key Sequence...",IDC_BUTTON5,119,157,109,12
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_KEYBOARD_HARDWARE_PAGE DIALOG DISCARDABLE 10, 10, 192, 130
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
GROUPBOX "Static",IDC_STATIC,15,9,147,107
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_MOUSE_BUTTONS_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
GROUPBOX "Button configuration",IDC_STATIC,3,0,239,70
|
||||||
|
GROUPBOX "Files and Folders",IDC_STATIC,2,76,239,40
|
||||||
|
GROUPBOX "Double-click s&peed",IDC_STATIC,1,124,239,56
|
||||||
|
CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",WS_TABSTOP,37,
|
||||||
|
152,113,16
|
||||||
|
LTEXT "Test area:",IDC_STATIC,146,133,43,10
|
||||||
|
LTEXT "Slow",IDC_STATIC,5,152,32,9
|
||||||
|
LTEXT "Fast",IDC_STATIC,151,148,32,9
|
||||||
|
CONTROL "&Single-click to open an item (point to select)",
|
||||||
|
IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,38,88,173,9
|
||||||
|
CONTROL "&Double-click to open an item (single-click to select)",
|
||||||
|
IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,37,100,200,9
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,9,91,19,17
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,81,27,78,38
|
||||||
|
CONTROL "&Right-handed",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,
|
||||||
|
11,13,61,9
|
||||||
|
CONTROL "&Left-handed",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,76,
|
||||||
|
13,61,9
|
||||||
|
LTEXT "Left Button:",IDC_STATIC,11,26,48,8
|
||||||
|
LTEXT "Right Button:",IDC_STATIC,179,25,48,8
|
||||||
|
LTEXT "- Context Menu",IDC_STATIC,175,37,59,8
|
||||||
|
LTEXT "- Special Drag",IDC_STATIC,176,48,56,8
|
||||||
|
LTEXT "- Normal Select",IDC_STATIC,9,37,59,8
|
||||||
|
LTEXT "- Normal Drag",IDC_STATIC,8,48,56,8
|
||||||
|
CONTROL "Animate1",IDC_ANIMATE1,"SysAnimate32",WS_BORDER |
|
||||||
|
WS_TABSTOP,186,135,46,35
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_MOUSE_POINTERS_PAGE DIALOG DISCARDABLE 10, 10, 247, 204
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
GROUPBOX "Scheme",IDC_STATIC,6,16,179,52
|
||||||
|
LTEXT "Customise:",IDC_STATIC,6,74,78,9
|
||||||
|
CONTROL "Enable pointer shadow",IDC_CHECK1,"Button",
|
||||||
|
BS_AUTOCHECKBOX | WS_TABSTOP,9,189,116,9
|
||||||
|
COMBOBOX IDC_COMBO1,14,28,162,12,CBS_DROPDOWN | CBS_SORT |
|
||||||
|
WS_VSCROLL | WS_TABSTOP
|
||||||
|
PUSHBUTTON "Save As...",IDC_BUTTON1,73,48,49,12
|
||||||
|
PUSHBUTTON "Delete",IDC_BUTTON3,126,48,49,12
|
||||||
|
PUSHBUTTON "Use Default",IDC_BUTTON4,134,185,49,12
|
||||||
|
PUSHBUTTON "Browse",IDC_BUTTON5,189,185,49,12
|
||||||
|
LISTBOX IDC_LIST1,7,88,230,92,LBS_SORT | LBS_NOINTEGRALHEIGHT |
|
||||||
|
WS_VSCROLL | WS_TABSTOP
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_MOUSE_MOTION_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
GROUPBOX "&Speed",IDC_STATIC,3,6,238,50
|
||||||
|
GROUPBOX "Acceleration",IDC_STATIC,2,61,238,50
|
||||||
|
GROUPBOX "Snap to &default",IDC_STATIC,2,116,238,50
|
||||||
|
CONTROL "Move pointer to the default button in dialog boxes",
|
||||||
|
IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,51,141,
|
||||||
|
175,9
|
||||||
|
LTEXT "Adjust how fast your pointer moves",IDC_STATIC,46,18,
|
||||||
|
144,9
|
||||||
|
LTEXT "Adjust how much your pointer accelerates as you move it faster",
|
||||||
|
IDC_STATIC,58,72,174,18
|
||||||
|
CONTROL "&None",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,7,99,50,8
|
||||||
|
CONTROL "&Low",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,59,99,50,8
|
||||||
|
CONTROL "&Medium",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,117,100,
|
||||||
|
50,8
|
||||||
|
CONTROL "&High",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,183,99,50,
|
||||||
|
8
|
||||||
|
CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_AUTOTICKS |
|
||||||
|
WS_TABSTOP,51,28,132,16
|
||||||
|
LTEXT "Slow",IDC_STATIC,34,44,37,7
|
||||||
|
LTEXT "Fast",IDC_STATIC,165,44,35,7
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,13,72,22,19
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,12,134,22,19
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,10,19,22,19
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_MOUSE_HARDWARE_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_USERS_USERS_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_USERS_ADVANCED_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_DISPLAY_BACKGROUND_PAGE DIALOG DISCARDABLE 10, 10, 266, 216
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,59,18,133,80
|
||||||
|
LISTBOX IDC_LIST1,10,141,164,68,LBS_SORT | LBS_NOINTEGRALHEIGHT |
|
||||||
|
WS_VSCROLL | WS_TABSTOP
|
||||||
|
PUSHBUTTON "&Browse...",IDC_BUTTON1,183,139,67,14
|
||||||
|
LTEXT "Select a background picture as Wallpaper:",IDC_STATIC,
|
||||||
|
12,131,165,10
|
||||||
|
LTEXT "Picture &Dispaly:",IDC_STATIC,183,160,71,9
|
||||||
|
COMBOBOX IDC_COMBO1,183,176,65,12,CBS_DROPDOWN | CBS_SORT |
|
||||||
|
WS_VSCROLL | WS_TABSTOP
|
||||||
|
PUSHBUTTON "&Pattern",IDC_BUTTON3,182,193,67,14,WS_DISABLED
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_DISPLAY_SCREEN_SAVER_PAGE DIALOG DISCARDABLE 10, 10, 263, 204
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,58,16,126,74
|
||||||
|
GROUPBOX "&Screen Saver",IDC_STATIC,5,103,254,43
|
||||||
|
GROUPBOX "Ener&gy saving features of monitor",IDC_STATIC,1,149,
|
||||||
|
254,54
|
||||||
|
PUSHBUTTON "&Settings...",IDC_BUTTON1,132,114,53,14
|
||||||
|
LTEXT "Click Power to adjust the power settings for your monitor",
|
||||||
|
IDC_STATIC,65,164,126,15
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,10,166,47,23
|
||||||
|
CONTROL "&Password protected",IDC_CHECK1,"Button",
|
||||||
|
BS_AUTOCHECKBOX | WS_TABSTOP,15,131,99,8
|
||||||
|
COMBOBOX IDC_COMBO1,11,114,114,12,CBS_DROPDOWN | CBS_SORT |
|
||||||
|
WS_VSCROLL | WS_TABSTOP
|
||||||
|
PUSHBUTTON "P&ower...",IDC_BUTTON3,191,188,67,15
|
||||||
|
PUSHBUTTON "Pre&view",IDC_BUTTON4,190,113,53,14
|
||||||
|
LTEXT "&Wait:",IDC_STATIC,159,133,22,8
|
||||||
|
EDITTEXT IDC_EDIT1,181,132,30,10,ES_AUTOHSCROLL
|
||||||
|
CONTROL "Spin2",IDC_SPIN2,"msctls_updown32",UDS_ARROWKEYS,210,
|
||||||
|
132,11,11
|
||||||
|
LTEXT "minutes",IDC_STATIC,221,133,36,8
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_DISPLAY_APPEARANCE_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,3,6,241,84
|
||||||
|
LTEXT "&Scheme:",IDC_STATIC,3,97,65,9
|
||||||
|
COMBOBOX IDC_COMBO1,2,109,142,12,CBS_DROPDOWN | CBS_SORT |
|
||||||
|
WS_VSCROLL | WS_TABSTOP
|
||||||
|
LTEXT "&Item:",IDC_STATIC,3,127,65,9
|
||||||
|
COMBOBOX IDC_COMBO2,2,137,142,12,CBS_DROPDOWN | CBS_SORT |
|
||||||
|
WS_VSCROLL | WS_TABSTOP
|
||||||
|
LTEXT "&Font:",IDC_STATIC,2,152,65,9,WS_DISABLED
|
||||||
|
COMBOBOX IDC_COMBO3,2,163,142,12,CBS_DROPDOWN | CBS_SORT |
|
||||||
|
WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||||
|
PUSHBUTTON "Sa&ve As...",IDC_BUTTON1,151,111,46,13
|
||||||
|
PUSHBUTTON "&Delete",IDC_BUTTON3,199,111,43,13
|
||||||
|
LTEXT "Si&ze:",IDC_STATIC,148,129,39,10
|
||||||
|
LTEXT "Siz&e:",IDC_STATIC,149,154,39,8
|
||||||
|
EDITTEXT IDC_EDIT1,151,139,44,10,ES_AUTOHSCROLL | WS_DISABLED
|
||||||
|
COMBOBOX IDC_COMBO4,150,162,43,12,CBS_DROPDOWN | CBS_SORT |
|
||||||
|
WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_DISPLAY_WEB_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_DISPLAY_EFFECTS_PAGE DIALOG DISCARDABLE 10, 10, 263, 210
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
GROUPBOX "&Desktop icons",IDC_STATIC,3,6,256,91
|
||||||
|
GROUPBOX "Visual effects",IDC_STATIC,1,105,256,96
|
||||||
|
PUSHBUTTON "D&efault Icon",IDC_BUTTON1,186,79,69,14
|
||||||
|
PUSHBUTTON "&Change Icon...",IDC_BUTTON3,112,79,69,14
|
||||||
|
COMBOBOX IDC_COMBO1,175,119,72,12,CBS_DROPDOWN | CBS_SORT |
|
||||||
|
WS_VSCROLL | WS_TABSTOP
|
||||||
|
CONTROL "Use &transition effects for menus and tooltips",
|
||||||
|
IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,123,
|
||||||
|
163,9
|
||||||
|
CONTROL "&Smooth edges of screen fonts",IDC_CHECK2,"Button",
|
||||||
|
BS_AUTOCHECKBOX | WS_TABSTOP,7,135,163,9
|
||||||
|
CONTROL "Use &large icons",IDC_CHECK3,"Button",BS_AUTOCHECKBOX |
|
||||||
|
WS_TABSTOP,7,147,163,9
|
||||||
|
CONTROL "Show &icons using all possilbe colours",IDC_CHECK4,
|
||||||
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,159,163,9
|
||||||
|
CONTROL "Show &window contents while dragging",IDC_CHECK5,"Button",
|
||||||
|
BS_AUTOCHECKBOX | WS_TABSTOP,7,171,163,9
|
||||||
|
CONTROL "&Hide keyboard navigation indicators until use of the Alt key",
|
||||||
|
IDC_CHECK6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,183,
|
||||||
|
219,9
|
||||||
|
CONTROL "List1",IDC_LIST1,"SysListView32",WS_BORDER | WS_TABSTOP,
|
||||||
|
10,20,244,53
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_DISPLAY_SETTINGS_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
GROUPBOX "&Colours",IDC_STATIC,3,107,115,40
|
||||||
|
GROUPBOX "&Screen area",IDC_STATIC,126,108,116,40
|
||||||
|
COMBOBOX IDC_COMBO1,6,117,107,13,CBS_DROPDOWN | CBS_SORT |
|
||||||
|
WS_VSCROLL | WS_TABSTOP
|
||||||
|
CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_AUTOTICKS |
|
||||||
|
WS_TABSTOP,151,122,66,15
|
||||||
|
LTEXT "Less",IDC_STATIC,130,118,22,9
|
||||||
|
LTEXT "More",IDC_STATIC,218,119,22,9
|
||||||
|
PUSHBUTTON "&Troubleshoot...",IDC_BUTTON1,111,158,67,13
|
||||||
|
PUSHBUTTON "Ad&vanced...",IDC_BUTTON3,180,158,67,13
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,7,133,106,9
|
||||||
|
LTEXT "Display:",IDC_STATIC,7,84,63,10
|
||||||
|
EDITTEXT IDC_EDIT1,6,97,233,9,ES_AUTOHSCROLL | ES_READONLY | NOT
|
||||||
|
WS_BORDER
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,62,12,120,68
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_FOLDERS_GENERAL_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_FOLDERS_VIEW_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_FOLDERS_FILE_TYPES_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_FOLDERS_OFFLINE_FILES_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_REGIONAL_GENERAL_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_REGIONAL_NUMBERS_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_REGIONAL_CURRENCY_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_REGIONAL_TIME_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_REGIONAL_DATE_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_REGIONAL_INPUT_LOCALES_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_DATETIME_DATETIME_PAGE DIALOG DISCARDABLE 10, 10, 247, 132
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
GROUPBOX "Date",IDC_STATIC,5,5,127,107
|
||||||
|
GROUPBOX "Time",IDC_STATIC,136,5,105,107
|
||||||
|
COMBOBOX IDC_CPL_DATETIME_MONTH_COMBO,13,21,55,100,CBS_DROPDOWN |
|
||||||
|
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||||
|
EDITTEXT IDC_CPL_DATETIME_YEAR_EDIT,69,21,46,13,ES_NUMBER
|
||||||
|
CONTROL "Spin1",IDC_CPL_DATETIME_YEAR_SPIN,"msctls_updown32",
|
||||||
|
UDS_ARROWKEYS,115,21,11,13
|
||||||
|
EDITTEXT IDC_CPL_DATETIME_TIME_EDIT,142,96,82,13,ES_AUTOHSCROLL
|
||||||
|
CONTROL "Spin1",IDC_CPL_DATETIME_TIME_SPIN,"msctls_updown32",
|
||||||
|
UDS_ARROWKEYS,224,96,11,13
|
||||||
|
LTEXT "Current time zone:",IDC_STATIC,8,115,81,10
|
||||||
|
EDITTEXT IDC_CPL_DATETIME_CURRENT_TIMEZONE_EDIT,94,115,145,12,
|
||||||
|
ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT
|
||||||
|
WS_TABSTOP
|
||||||
|
CONTROL "",IDC_CPL_DATETIME_CLOCKFACE,"Static",SS_ETCHEDFRAME,
|
||||||
|
142,15,92,77
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_DATETIME_TIMEZONE_PAGE DIALOG DISCARDABLE 10, 10, 245, 140
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "Automatically adjust clock for &daylight saving changes",
|
||||||
|
IDC_CPL_DATETIME_DAYLIGHT_SAVINGS_CHECK,"Button",
|
||||||
|
BS_AUTOCHECKBOX | WS_TABSTOP,13,125,217,9
|
||||||
|
COMBOBOX IDC_CPL_DATETIME_TIMEZONE_COMBO,4,6,235,120,
|
||||||
|
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
|
CONTROL "",IDC_CPL_DATETIME_EARTHMAP_IMAGE,"Static",
|
||||||
|
SS_BLACKFRAME,10,23,223,98
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_IRDA_FILE_TRANSFER_PAGE DIALOG DISCARDABLE 0, 0, 244, 183
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
GROUPBOX "File Transfer Options",IDC_STATIC,11,56,224,116
|
||||||
|
CONTROL "Display an &icon on the taskbar indicating infrared activity",
|
||||||
|
IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,23,
|
||||||
|
219,8
|
||||||
|
CONTROL "A&llow others to send files to your computer using infrared communications",
|
||||||
|
IDC_CHECK2,"Button",BS_AUTOCHECKBOX | BS_MULTILINE |
|
||||||
|
WS_TABSTOP,23,72,206,18
|
||||||
|
CONTROL "&Display status while receiving files",IDC_CHECK3,
|
||||||
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,100,204,17
|
||||||
|
LTEXT "Default location for received files:",IDC_STATIC,23,126,
|
||||||
|
171,9
|
||||||
|
EDITTEXT IDC_EDIT1,23,137,202,12,ES_AUTOHSCROLL | WS_DISABLED
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_IRDA_IMAGE_TRANSFER_PAGE DIALOG DISCARDABLE 0, 0, 243, 176
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "&Use IrDa to transfer images from a digitial camera to your computer",
|
||||||
|
IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,22,
|
||||||
|
206,21
|
||||||
|
GROUPBOX "Received Images",IDC_STATIC,7,60,229,109
|
||||||
|
LTEXT "Transfer images to a subfolder of:",IDC_STATIC,15,76,
|
||||||
|
213,11
|
||||||
|
EDITTEXT IDC_EDIT1,11,93,218,15,ES_AUTOHSCROLL
|
||||||
|
PUSHBUTTON "&Browse...",IDC_BUTTON1,169,116,59,15
|
||||||
|
CONTROL "&Explore location after receiving pictures",IDC_CHECK2,
|
||||||
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,137,207,9
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_IRDA_HARDWARE_PAGE DIALOG DISCARDABLE 0, 0, 244, 192
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
LTEXT "&Devices:",IDC_STATIC,9,21,154,10
|
||||||
|
CONTROL "List1",IDC_CPL_IRDA_HARDWARE_DEVICE_LIST,"SysListView32",
|
||||||
|
LVS_REPORT | WS_BORDER | WS_TABSTOP,9,31,223,45
|
||||||
|
GROUPBOX "Device Properties",IDC_STATIC,7,87,228,98
|
||||||
|
PUSHBUTTON "P&roperties",IDC_BUTTON1,167,165,58,13
|
||||||
|
PUSHBUTTON "&Troubleshoot...",IDC_BUTTON2,103,165,58,13
|
||||||
|
LTEXT "Manufacturer:",IDC_STATIC,12,102,96,10
|
||||||
|
LTEXT "Hardware Revision:",IDC_STATIC,12,112,96,10
|
||||||
|
LTEXT "Location:",IDC_STATIC,12,122,96,10
|
||||||
|
LTEXT "Device Status:",IDC_STATIC,12,132,96,10
|
||||||
|
EDITTEXT IDC_EDIT1,107,103,118,12,ES_AUTOHSCROLL | WS_DISABLED |
|
||||||
|
NOT WS_BORDER
|
||||||
|
EDITTEXT IDC_EDIT2,107,114,118,12,ES_AUTOHSCROLL | WS_DISABLED |
|
||||||
|
NOT WS_BORDER
|
||||||
|
EDITTEXT IDC_EDIT3,107,125,118,12,ES_AUTOHSCROLL | WS_DISABLED |
|
||||||
|
NOT WS_BORDER
|
||||||
|
EDITTEXT IDC_EDIT4,107,136,118,12,ES_AUTOHSCROLL | WS_DISABLED |
|
||||||
|
NOT WS_BORDER
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_ACCESSIBLE_KEYBOARD_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_ACCESSIBLE_GENERAL_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_ACCESSIBLE_SOUNDL_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_ACCESSIBLE_DISPLAY_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_ACCESSIBLE_MOUSE_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_PHONE_MODEM_DIALING_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_PHONE_MODEM_MODEMS_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_PHONE_MODEM_ADVANCED_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// DESIGNINFO
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
GUIDELINES DESIGNINFO DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDD_CPL_TABBED_DIALOG, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 7
|
||||||
|
RIGHTMARGIN, 149
|
||||||
|
TOPMARGIN, 7
|
||||||
|
BOTTOMMARGIN, 73
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_KEYBOARD_SPEED_PAGE, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 3
|
||||||
|
RIGHTMARGIN, 215
|
||||||
|
TOPMARGIN, 4
|
||||||
|
BOTTOMMARGIN, 157
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_KEYBOARD_HARDWARE_PAGE, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 4
|
||||||
|
RIGHTMARGIN, 186
|
||||||
|
TOPMARGIN, 3
|
||||||
|
BOTTOMMARGIN, 125
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_DATETIME_DATETIME_PAGE, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 4
|
||||||
|
RIGHTMARGIN, 241
|
||||||
|
TOPMARGIN, 5
|
||||||
|
BOTTOMMARGIN, 127
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_DATETIME_TIMEZONE_PAGE, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 4
|
||||||
|
RIGHTMARGIN, 239
|
||||||
|
TOPMARGIN, 6
|
||||||
|
BOTTOMMARGIN, 136
|
||||||
|
END
|
||||||
|
END
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Dialog Info
|
||||||
|
//
|
||||||
|
#ifndef __GNUC__
|
||||||
|
|
||||||
|
IDD_CPL_DATETIME_DATETIME_PAGE DLGINIT
|
||||||
|
BEGIN
|
||||||
|
IDC_CPL_DATETIME_MONTH_COMBO, 0x403, 8, 0
|
||||||
|
0x614a, 0x756e, 0x7261, 0x0079,
|
||||||
|
IDC_CPL_DATETIME_MONTH_COMBO, 0x403, 9, 0
|
||||||
|
0x6546, 0x7262, 0x6175, 0x7972, "\000"
|
||||||
|
IDC_CPL_DATETIME_MONTH_COMBO, 0x403, 6, 0
|
||||||
|
0x614d, 0x6372, 0x0068,
|
||||||
|
IDC_CPL_DATETIME_MONTH_COMBO, 0x403, 6, 0
|
||||||
|
0x7041, 0x6972, 0x006c,
|
||||||
|
IDC_CPL_DATETIME_MONTH_COMBO, 0x403, 4, 0
|
||||||
|
0x614d, 0x0079,
|
||||||
|
IDC_CPL_DATETIME_MONTH_COMBO, 0x403, 5, 0
|
||||||
|
0x754a, 0x656e, "\000"
|
||||||
|
IDC_CPL_DATETIME_MONTH_COMBO, 0x403, 5, 0
|
||||||
|
0x754a, 0x796c, "\000"
|
||||||
|
IDC_CPL_DATETIME_MONTH_COMBO, 0x403, 7, 0
|
||||||
|
0x7541, 0x7567, 0x7473, "\000"
|
||||||
|
IDC_CPL_DATETIME_MONTH_COMBO, 0x403, 10, 0
|
||||||
|
0x6553, 0x7470, 0x6d65, 0x6562, 0x0072,
|
||||||
|
IDC_CPL_DATETIME_MONTH_COMBO, 0x403, 8, 0
|
||||||
|
0x634f, 0x6f74, 0x6562, 0x0072,
|
||||||
|
IDC_CPL_DATETIME_MONTH_COMBO, 0x403, 9, 0
|
||||||
|
0x6f4e, 0x6576, 0x626d, 0x7265, "\000"
|
||||||
|
IDC_CPL_DATETIME_MONTH_COMBO, 0x403, 9, 0
|
||||||
|
0x6544, 0x6563, 0x626d, 0x7265, "\000"
|
||||||
|
0
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// String Table
|
||||||
|
//
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDS_CPL_SYSTEM_NAME "System"
|
||||||
|
IDS_CPL_SYSTEM_INFO "Displays system information and Configures Environment settings"
|
||||||
|
IDS_CPL_IRDA_NAME "Wireless Link"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDS_CPL_IRDA_INFO "Wireless link configuration settings"
|
||||||
|
IDS_CPL_MOUSE_NAME "Mouse"
|
||||||
|
IDS_CPL_MOUSE_INFO "Customises your mouse settings"
|
||||||
|
IDS_CPL_KEYBOARD_NAME "Keyboard"
|
||||||
|
IDS_CPL_KEYBOARD_INFO "Customises your keyboard settings"
|
||||||
|
IDS_CPL_REGIONS_NAME "Regional Settings"
|
||||||
|
IDS_CPL_REGIONS_INFO "Customises settings for display of languages, numbers, times and dates"
|
||||||
|
IDS_CPL_USERS_NAME "Users and Passwords"
|
||||||
|
IDS_CPL_USERS_INFO "Manages users and security for this computer"
|
||||||
|
IDS_CPL_DATETIME_NAME "Date/Time"
|
||||||
|
IDS_CPL_DATETIME_INFO "Sets the date, time and timezone information for this computer"
|
||||||
|
IDS_CPL_FOLDERS_NAME "Folder Options"
|
||||||
|
IDS_CPL_FOLDERS_INFO "Customises the display of files and folders, changes file associations, and makes network files available offline"
|
||||||
|
IDS_CPL_DISPLAY_NAME "Display"
|
||||||
|
IDS_CPL_DISPLAY_INFO "Customises your desktop display and screen saver"
|
||||||
|
IDS_CPL_ACCESSIBLE_NAME "Accessibility Options"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDS_CPL_ACCESSIBLE_INFO "Customises accessibility features for your computer"
|
||||||
|
IDS_CPL_PHONE_MODEM_NAME "Phone and Modem Options"
|
||||||
|
IDS_CPL_PHONE_MODEM_INFO
|
||||||
|
"Configures your telephone dialing rules and modem properties"
|
||||||
|
IDS_CPL_DATETIME_MONTH_1 "January"
|
||||||
|
IDS_CPL_DATETIME_MONTH_2 "February"
|
||||||
|
IDS_CPL_DATETIME_MONTH_3 "March"
|
||||||
|
IDS_CPL_DATETIME_MONTH_4 "April"
|
||||||
|
IDS_CPL_DATETIME_MONTH_5 "May"
|
||||||
|
IDS_CPL_DATETIME_MONTH_6 "June"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDC_CPL_SYSTEM_DLG "System Configuration"
|
||||||
|
IDC_CPL_IRDA_DLG "Infrared Port Configuration"
|
||||||
|
IDC_CPL_MOUSE_DLG "Mouse Properties"
|
||||||
|
IDC_CPL_KEYBOARD_DLG "Keyboard Properties"
|
||||||
|
IDC_CPL_REGIONAL_DLG "Regional Settings"
|
||||||
|
IDC_CPL_USERS_DLG "User Properties"
|
||||||
|
IDC_CPL_DATETIME_DLG "Date and Time Settings"
|
||||||
|
IDC_CPL_FOLDERS_DLG "Folder Options"
|
||||||
|
IDC_CPL_DISPLAY_DLG "Display Settings"
|
||||||
|
IDC_CPL_ACCESSIBLE_DLG "Accessibility Options"
|
||||||
|
IDC_CPL_PHONE_MODEM_DLG "Phone and Modem Options"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDD_CPL_SYSTEM_GENERAL_PAGE "General"
|
||||||
|
IDD_CPL_SYSTEM_NETWORK_PAGE "Network Identification"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDD_CPL_SYSTEM_HARDWARE_PAGE "Hardware"
|
||||||
|
IDD_CPL_SYSTEM_USERS_PAGE "User Profiles"
|
||||||
|
IDD_CPL_SYSTEM_ADVANCED_PAGE "Advanced"
|
||||||
|
IDD_CPL_KEYBOARD_SPEED_PAGE "Speed"
|
||||||
|
IDD_CPL_KEYBOARD_LOCALES_PAGE "Input Locales"
|
||||||
|
IDD_CPL_KEYBOARD_HARDWARE_PAGE "Hardware"
|
||||||
|
IDD_CPL_MOUSE_BUTTONS_PAGE "Buttons"
|
||||||
|
IDD_CPL_MOUSE_POINTERS_PAGE "Pointers"
|
||||||
|
IDD_CPL_MOUSE_MOTION_PAGE "Motion"
|
||||||
|
IDD_CPL_MOUSE_HARDWARE_PAGE "Hardware"
|
||||||
|
IDD_CPL_USERS_USERS_PAGE "Users"
|
||||||
|
IDD_CPL_USERS_ADVANCED_PAGE "Advanced"
|
||||||
|
IDD_CPL_DISPLAY_BACKGROUND_PAGE "Background"
|
||||||
|
IDD_CPL_DISPLAY_SCREEN_SAVER_PAGE "Screen Saver"
|
||||||
|
IDD_CPL_DISPLAY_APPEARANCE_PAGE "Appearance"
|
||||||
|
IDD_CPL_DISPLAY_WEB_PAGE "Web"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDD_CPL_DISPLAY_EFFECTS_PAGE "Effects"
|
||||||
|
IDD_CPL_DISPLAY_SETTINGS_PAGE "Settings"
|
||||||
|
IDD_CPL_FOLDERS_GENERAL_PAGE "General"
|
||||||
|
IDD_CPL_FOLDERS_VIEW_PAGE "View"
|
||||||
|
IDD_CPL_FOLDERS_FILE_TYPES_PAGE "File Types"
|
||||||
|
IDD_CPL_FOLDERS_OFFLINE_FILES_PAGE "Offline Files"
|
||||||
|
IDD_CPL_REGIONAL_GENERAL_PAGE "General"
|
||||||
|
IDD_CPL_REGIONAL_NUMBERS_PAGE "Numbers"
|
||||||
|
IDD_CPL_REGIONAL_CURRENCY_PAGE "Currency"
|
||||||
|
IDD_CPL_REGIONAL_TIME_PAGE "Time"
|
||||||
|
IDD_CPL_REGIONAL_DATE_PAGE "Date"
|
||||||
|
IDD_CPL_REGIONAL_INPUT_LOCALES_PAGE "Input Locales"
|
||||||
|
IDD_CPL_DATETIME_DATETIME_PAGE "Date and Time"
|
||||||
|
IDD_CPL_DATETIME_TIMEZONE_PAGE "Time Zone"
|
||||||
|
IDD_CPL_IRDA_FILE_TRANSFER_PAGE "File Transfer"
|
||||||
|
IDD_CPL_IRDA_IMAGE_TRANSFER_PAGE "Image Transfer"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDD_CPL_IRDA_HARDWARE_PAGE "Hardware"
|
||||||
|
IDD_CPL_ACCESSIBLE_KEYBOARD_PAGE "Keyboard"
|
||||||
|
IDD_CPL_ACCESSIBLE_GENERAL_PAGE "General"
|
||||||
|
IDD_CPL_ACCESSIBLE_SOUNDL_PAGE "Sound"
|
||||||
|
IDD_CPL_ACCESSIBLE_DISPLAY_PAGE "Display"
|
||||||
|
IDD_CPL_ACCESSIBLE_MOUSE_PAGE "Mouse"
|
||||||
|
IDD_CPL_PHONE_MODEM_DIALING_PAGE "Dialing Rules"
|
||||||
|
IDD_CPL_PHONE_MODEM_MODEMS_PAGE "Modems"
|
||||||
|
IDD_CPL_PHONE_MODEM_ADVANCED_PAGE "Advanced"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDS_CPL_DATETIME_MONTH_7 "July"
|
||||||
|
IDS_CPL_DATETIME_MONTH_8 "August"
|
||||||
|
IDS_CPL_DATETIME_MONTH_9 "September"
|
||||||
|
IDS_CPL_DATETIME_MONTH_10 "October"
|
||||||
|
IDS_CPL_DATETIME_MONTH_11 "November"
|
||||||
|
IDS_CPL_DATETIME_MONTH_12 "December"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // English (U.S.) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// English (Australia) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TEXTINCLUDE
|
||||||
|
//
|
||||||
|
|
||||||
|
1 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"resrc1.h\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
2 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"#include ""defines.h""\r\n"
|
||||||
|
"#include ""reactos\\resource.h""\r\n"
|
||||||
|
"#include ""resource.h""\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
3 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Bitmap
|
||||||
|
//
|
||||||
|
|
||||||
|
IDB_EARTH16 BITMAP DISCARDABLE "res\\earth16.bmp"
|
||||||
|
IDB_EARTH256 BITMAP DISCARDABLE "res\\earth256.bmp"
|
||||||
|
#endif // English (Australia) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
206
rosapps/ctlpanel/roscfg/system.c
Normal file
|
@ -0,0 +1,206 @@
|
||||||
|
/*
|
||||||
|
* ReactOS control
|
||||||
|
*
|
||||||
|
* system.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Dickenson <robd@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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
#include <windows.h>
|
||||||
|
#include <cpl.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <memory.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
#include <process.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <windowsx.h>
|
||||||
|
#include "main.h"
|
||||||
|
#include "system.h"
|
||||||
|
|
||||||
|
#include "assert.h"
|
||||||
|
#include "trace.h"
|
||||||
|
|
||||||
|
|
||||||
|
LRESULT CALLBACK SystemGeneralPageProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT CALLBACK SystemNetworkPageProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT CALLBACK SystemHardwarePageProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT CALLBACK SystemUsersPageProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT CALLBACK SystemAdvancedPageProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Global and Local Variables:
|
||||||
|
//
|
||||||
|
|
||||||
|
extern HMODULE hModule;
|
||||||
|
|
||||||
|
extern HWND hApplyButton;
|
||||||
|
/*
|
||||||
|
HWND hSystemGeneralPage;
|
||||||
|
HWND hSystemNetworkPage;
|
||||||
|
HWND hSystemHardwarePage;
|
||||||
|
HWND hSystemUsersPage;
|
||||||
|
HWND hSystemAdvancedPage;
|
||||||
|
*/
|
||||||
|
//typedef BOOL(CALLBACK *DLGPROC)(HWND,UINT,WPARAM,LPARAM);
|
||||||
|
|
||||||
|
#define DLGPROC_RESULT BOOL
|
||||||
|
//#define DLGPROC_RESULT LRESULT
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Local module support methods
|
||||||
|
//
|
||||||
|
|
||||||
|
//DLGPROC_RESULT CALLBACK DateTimeAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK SystemAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
EnableWindow(hApplyButton, FALSE);
|
||||||
|
return TRUE;
|
||||||
|
/*
|
||||||
|
case WM_COMMAND:
|
||||||
|
// Handle the button clicks
|
||||||
|
switch (LOWORD(wParam)) {
|
||||||
|
// case IDC_ENDTASK:
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
case IDOK:
|
||||||
|
case IDCANCEL:
|
||||||
|
DestroyWindow(hDlg);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_NOTIFY:
|
||||||
|
//OnNotify(hDlg, wParam, lParam, &CPlAppletDlgPagesData[nThisApp]);
|
||||||
|
break;
|
||||||
|
*/
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK KeyboardAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
EnableWindow(hApplyButton, FALSE);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK MouseAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
EnableWindow(hApplyButton, FALSE);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK UsersAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
EnableWindow(hApplyButton, FALSE);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK DisplayAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
EnableWindow(hApplyButton, FALSE);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK FoldersAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
EnableWindow(hApplyButton, FALSE);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK RegionalAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
EnableWindow(hApplyButton, FALSE);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK IrDaAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK AccessibleAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK PhoneModemAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
42
rosapps/ctlpanel/roscfg/system.h
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* ReactOS Control Panel Applet
|
||||||
|
*
|
||||||
|
* system.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Dickenson <robd@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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __SYSTEM_H__
|
||||||
|
#define __SYSTEM_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if _MSC_VER > 1000
|
||||||
|
#pragma once
|
||||||
|
#endif // _MSC_VER > 1000
|
||||||
|
|
||||||
|
|
||||||
|
LRESULT CALLBACK CPlAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __SYSTEM_H__
|
82
rosapps/ctlpanel/roscfg/trace.c
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Diagnostic Trace
|
||||||
|
//
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include "windows.h"
|
||||||
|
#include "trace.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
//#include <windows.h>
|
||||||
|
//#include <assert.h>
|
||||||
|
//WINBASEAPI VOID WINAPI DebugBreak(VOID);
|
||||||
|
//WINBASEAPI VOID WINAPI OutputDebugStringA(LPCSTR lpOutputString);
|
||||||
|
//WINBASEAPI VOID WINAPI OutputDebugStringW(LPCWSTR lpOutputString);
|
||||||
|
//void __stdcall DebugBreak(void);
|
||||||
|
//void __stdcall OutputDebugStringA(char* lpOutputString);
|
||||||
|
//void __stdcall OutputDebugStringW(wchar_t* lpOutputString);
|
||||||
|
#ifdef UNICODE
|
||||||
|
#define OutputDebugString OutputDebugStringW
|
||||||
|
#else
|
||||||
|
#define OutputDebugString OutputDebugStringA
|
||||||
|
#endif // !UNICODE
|
||||||
|
|
||||||
|
#else
|
||||||
|
#include "hardware.h"
|
||||||
|
#endif // WIN32
|
||||||
|
|
||||||
|
|
||||||
|
#undef THIS_FILE
|
||||||
|
static char THIS_FILE[] = __FILE__;
|
||||||
|
|
||||||
|
void _DebugBreak(void)
|
||||||
|
{
|
||||||
|
DebugBreak();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Trace(TCHAR* lpszFormat, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
int nBuf;
|
||||||
|
TCHAR szBuffer[512];
|
||||||
|
|
||||||
|
va_start(args, lpszFormat);
|
||||||
|
// nBuf = vsprintf(szBuffer, lpszFormat, args);
|
||||||
|
// nBuf = _vsntprintf(szBuffer, _countof(szBuffer), lpszFormat, args);
|
||||||
|
#ifdef _UNICODE
|
||||||
|
nBuf = _vsnwprintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), lpszFormat, args);
|
||||||
|
#else
|
||||||
|
nBuf = _vsnprintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), lpszFormat, args);
|
||||||
|
#endif
|
||||||
|
OutputDebugString(szBuffer);
|
||||||
|
// was there an error? was the expanded string too long?
|
||||||
|
// ASSERT(nBuf >= 0);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Assert(void* assert, TCHAR* file, int line, void* msg)
|
||||||
|
{
|
||||||
|
if (msg == NULL) {
|
||||||
|
printf("ASSERT -- %s occured on line %u of file %s.\n",
|
||||||
|
assert, line, file);
|
||||||
|
} else {
|
||||||
|
printf("ASSERT -- %s occured on line %u of file %s: Message = %s.\n",
|
||||||
|
assert, line, file, msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
//inline void Trace(TCHAR* lpszFormat, ...) { };
|
||||||
|
//inline void Assert(void* assert, TCHAR* file, int line, void* msg) { };
|
||||||
|
void Trace(TCHAR* lpszFormat, ...) { };
|
||||||
|
void Assert(void* assert, TCHAR* file, int line, void* msg) { };
|
||||||
|
|
||||||
|
#endif //_DEBUG
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
72
rosapps/ctlpanel/roscfg/trace.h
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
#ifndef __TRACE_H__
|
||||||
|
#define __TRACE_H__
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// BreakPoint() macro.
|
||||||
|
//=============================================================================
|
||||||
|
|
||||||
|
#ifdef _X86_
|
||||||
|
#define BreakPoint() _asm { int 3h }
|
||||||
|
#else
|
||||||
|
#define BreakPoint() _DebugBreak()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// MACRO: ASSERT()
|
||||||
|
//=============================================================================
|
||||||
|
|
||||||
|
#ifndef ASSERT
|
||||||
|
#define ASSERT(exp) \
|
||||||
|
{ \
|
||||||
|
if ( !(exp) ) \
|
||||||
|
{ \
|
||||||
|
Assert(#exp, __FILE__, __LINE__, NULL); \
|
||||||
|
BreakPoint(); \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
|
||||||
|
#define ASSERTMSG(exp, msg) \
|
||||||
|
{ \
|
||||||
|
if ( !(exp) ) \
|
||||||
|
{ \
|
||||||
|
Assert(#exp, __FILE__, __LINE__, msg); \
|
||||||
|
BreakPoint(); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// MACRO: TRACE()
|
||||||
|
//=============================================================================
|
||||||
|
|
||||||
|
void Assert(void* assert, TCHAR* file, int line, void* msg);
|
||||||
|
void Trace(TCHAR* lpszFormat, ...);
|
||||||
|
void Trace1(int code, TCHAR* lpszFormat, ...);
|
||||||
|
|
||||||
|
#define TRACE Trace
|
||||||
|
#define TRACE0 Trace
|
||||||
|
|
||||||
|
#else // _DEBUG
|
||||||
|
|
||||||
|
#ifndef ASSERT
|
||||||
|
#define ASSERT(exp)
|
||||||
|
#define ASSERTMSG(exp, msg)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//#define TRACE0 TRACE
|
||||||
|
//#define TRACE1 TRACE
|
||||||
|
|
||||||
|
void Assert(void* assert, TCHAR* file, int line, void* msg);
|
||||||
|
void Trace(TCHAR* lpszFormat, ...);
|
||||||
|
|
||||||
|
#define TRACE 0 ? (void)0 : Trace
|
||||||
|
|
||||||
|
|
||||||
|
#endif // !_DEBUG
|
||||||
|
|
||||||
|
#endif // __TRACE_H__
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
51
rosapps/ctlpanel/rospower/dllmain.c
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
* ReactOS Control Panel Applet
|
||||||
|
*
|
||||||
|
* dllmain.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Dickenson <robd@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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
#include <windows.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
|
||||||
|
HMODULE hModule;
|
||||||
|
|
||||||
|
BOOL APIENTRY
|
||||||
|
DllMain(PVOID hinstDll,
|
||||||
|
ULONG dwReason,
|
||||||
|
PVOID reserved)
|
||||||
|
{
|
||||||
|
|
||||||
|
switch (dwReason) {
|
||||||
|
case DLL_PROCESS_ATTACH:
|
||||||
|
//DisableThreadLibraryCalls(hinstDll);
|
||||||
|
//RegInitialize();
|
||||||
|
hModule = (HMODULE)hinstDll;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DLL_PROCESS_DETACH:
|
||||||
|
//RegCleanup();
|
||||||
|
break;
|
||||||
|
case DLL_THREAD_ATTACH:
|
||||||
|
case DLL_THREAD_DETACH:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
213
rosapps/ctlpanel/rospower/main.c
Normal file
|
@ -0,0 +1,213 @@
|
||||||
|
/*
|
||||||
|
* ReactOS Control Panel Applet
|
||||||
|
*
|
||||||
|
* main.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Dickenson <robd@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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
#include <windows.h>
|
||||||
|
#include <cpl.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
//#include <shellapi.h>
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
|
#include "system.h"
|
||||||
|
|
||||||
|
#ifndef __GNUC__
|
||||||
|
//#define CPL_STARTWPARAMS CPL_STARTWPARMS
|
||||||
|
//#define CPL_DBLCLICK CPL_DBLCLK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Global Variables:
|
||||||
|
//
|
||||||
|
|
||||||
|
extern HMODULE hModule;
|
||||||
|
|
||||||
|
typedef struct tagCPlAppletInstanceData {
|
||||||
|
HWND hWnd;
|
||||||
|
LONG lData;
|
||||||
|
} CPlAppletInstanceData;
|
||||||
|
|
||||||
|
CPlAppletInstanceData PowerAppletData = { 0, 0L };
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Local Support Functions:
|
||||||
|
//
|
||||||
|
|
||||||
|
static LONG LaunchPowerApplet(UINT uAppNum, LONG lData, BOOL start)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
if (start && !hControlPanelAppletDlg) {
|
||||||
|
#if 1
|
||||||
|
DialogBox(hModule, MAKEINTRESOURCE(IDD_CPL_POWER_DIALOG), NULL, (DLGPROC)CPlAppletDlgProc);
|
||||||
|
#else
|
||||||
|
// hControlPanelAppletDlg = CreateDialog(hModule, MAKEINTRESOURCE(IDD_CPL_POWER_DIALOG), NULL, (DLGPROC)CPlAppletDlgProc);
|
||||||
|
hControlPanelAppletDlg = CreateDialogParam(hModule, MAKEINTRESOURCE(IDD_CPL_POWER_DIALOG),
|
||||||
|
NULL, (DLGPROC)CPlAppletDlgProc, (LPARAM)lData);
|
||||||
|
if (hControlPanelAppletDlg) {
|
||||||
|
ShowWindow(hControlPanelAppletDlg, SW_SHOW);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
} else if (hControlPanelAppletDlg) {
|
||||||
|
DestroyWindow(hControlPanelAppletDlg);
|
||||||
|
hControlPanelAppletDlg = 0;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
typedef LONG (*LaunchAppletProc)(UINT, LONG, BOOL);
|
||||||
|
|
||||||
|
typedef struct tagCPLAppletINFO {
|
||||||
|
UINT _uAppNum;
|
||||||
|
CPLINFO info;
|
||||||
|
LaunchAppletProc proc;
|
||||||
|
CPlAppletInstanceData* pData;
|
||||||
|
} CPLAppletINFO;
|
||||||
|
|
||||||
|
static LONG LaunchCommonAppletDlg(UINT uAppNum, LONG lData, BOOL start);
|
||||||
|
|
||||||
|
static CPLAppletINFO cplAppletInfoArray[] = {
|
||||||
|
{ 0, { IDI_CPL_POWER_ICON, IDS_CPL_POWER_NAME, IDS_CPL_POWER_INFO, 0L }, LaunchCommonAppletDlg, &PowerAppletData },
|
||||||
|
};
|
||||||
|
|
||||||
|
static LONG LaunchCommonAppletDlg(UINT uAppNum, LONG lData, BOOL start)
|
||||||
|
{
|
||||||
|
if (start) {
|
||||||
|
|
||||||
|
if (!cplAppletInfoArray[uAppNum].pData->hWnd) {
|
||||||
|
cplAppletInfoArray[uAppNum].pData->hWnd = CreateDialogParam(hModule, MAKEINTRESOURCE(IDD_CPL_POWER_DIALOG), NULL, (DLGPROC)CPlAppletDlgProc, (LPARAM)(cplAppletInfoArray[uAppNum].pData));
|
||||||
|
ShowWindow(cplAppletInfoArray[uAppNum].pData->hWnd, SW_SHOW);
|
||||||
|
} else {
|
||||||
|
// find the applet window, make forground and set focus
|
||||||
|
SetForegroundWindow(cplAppletInfoArray[uAppNum].pData->hWnd);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (cplAppletInfoArray[uAppNum].pData->hWnd) {
|
||||||
|
DestroyWindow(cplAppletInfoArray[uAppNum].pData->hWnd);
|
||||||
|
cplAppletInfoArray[uAppNum].pData->hWnd = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
static LONG InitialiseProc(VOID) // return zero on failure to initialise, host will then drop us
|
||||||
|
{
|
||||||
|
// if (failed_to_initialise) return 0;
|
||||||
|
return 1L;
|
||||||
|
}
|
||||||
|
|
||||||
|
LONG GetCountProc(VOID)
|
||||||
|
{
|
||||||
|
return (sizeof(cplAppletInfoArray)/sizeof(CPLAppletINFO));
|
||||||
|
}
|
||||||
|
|
||||||
|
static LONG InquireProc(UINT uAppNum, CPLINFO* pCPLInfo)
|
||||||
|
{
|
||||||
|
if (uAppNum < (sizeof(cplAppletInfoArray)/sizeof(CPLAppletINFO))) {
|
||||||
|
if (pCPLInfo != NULL) {
|
||||||
|
pCPLInfo->idName = CPL_DYNAMIC_RES;
|
||||||
|
pCPLInfo->idInfo = CPL_DYNAMIC_RES;
|
||||||
|
pCPLInfo->idIcon = CPL_DYNAMIC_RES;
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1L;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LONG NewInquireProc(UINT uAppNum, NEWCPLINFO* pNewCPLInfo)
|
||||||
|
{
|
||||||
|
if (uAppNum < (sizeof(cplAppletInfoArray)/sizeof(CPLAppletINFO))) {
|
||||||
|
if (pNewCPLInfo != NULL && pNewCPLInfo->dwSize == sizeof(NEWCPLINFO)) {
|
||||||
|
pNewCPLInfo->dwSize = (DWORD)sizeof(NEWCPLINFO);
|
||||||
|
pNewCPLInfo->dwFlags = 0;
|
||||||
|
pNewCPLInfo->dwHelpContext = 0;
|
||||||
|
pNewCPLInfo->lData = cplAppletInfoArray[uAppNum].pData->lData;
|
||||||
|
//pNewCPLInfo->hIcon = LoadImage(hModule, (LPCTSTR)cplAppletInfoArray[uAppNum].info.idIcon, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
|
||||||
|
pNewCPLInfo->hIcon = LoadImage(hModule, MAKEINTRESOURCE(cplAppletInfoArray[uAppNum].info.idIcon), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
|
||||||
|
pNewCPLInfo->szHelpFile[0] = _T('\0');
|
||||||
|
LoadString(hModule, cplAppletInfoArray[uAppNum].info.idName, pNewCPLInfo->szName, 32);
|
||||||
|
LoadString(hModule, cplAppletInfoArray[uAppNum].info.idInfo, pNewCPLInfo->szInfo, 64);
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1L;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LONG StartWithParamsProc(UINT uAppNum, LPCTSTR lpszExtra) // return TRUE if handled, FALSE otherwise
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LONG DblClickProc(UINT uAppNum, LONG lData) // return zero on success, nonzero otherwise
|
||||||
|
{
|
||||||
|
if (uAppNum < (sizeof(cplAppletInfoArray)/sizeof(CPLAppletINFO))) {
|
||||||
|
return cplAppletInfoArray[uAppNum].proc(uAppNum, lData, TRUE);
|
||||||
|
}
|
||||||
|
return 1L;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LONG StopProc(UINT uAppNum, LONG lData) // return zero if processed successfully
|
||||||
|
{
|
||||||
|
if (uAppNum < (sizeof(cplAppletInfoArray)/sizeof(CPLAppletINFO))) {
|
||||||
|
return cplAppletInfoArray[uAppNum].proc(uAppNum, lData, FALSE);
|
||||||
|
}
|
||||||
|
return 1L;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LONG ExitProc(VOID) // return zero if processed successfully
|
||||||
|
{
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
LONG WINAPI CPlApplet(HWND hWnd, UINT message, LONG lParam1, LONG lParam2)
|
||||||
|
{
|
||||||
|
switch (message) {
|
||||||
|
case CPL_INIT:
|
||||||
|
return InitialiseProc();
|
||||||
|
case CPL_GETCOUNT:
|
||||||
|
return GetCountProc();
|
||||||
|
case CPL_INQUIRE:
|
||||||
|
return InquireProc((UINT)lParam1, (CPLINFO*)lParam2);
|
||||||
|
case CPL_NEWINQUIRE:
|
||||||
|
return NewInquireProc((UINT)lParam1, (NEWCPLINFO*)lParam2);
|
||||||
|
case CPL_STARTWPARMS:
|
||||||
|
return StartWithParamsProc((UINT)lParam1, (LPCTSTR)lParam2);
|
||||||
|
case CPL_DBLCLK:
|
||||||
|
return DblClickProc((UINT)lParam1, lParam2);
|
||||||
|
case CPL_STOP:
|
||||||
|
return StopProc((UINT)lParam1, lParam2);
|
||||||
|
case CPL_EXIT:
|
||||||
|
return ExitProc();
|
||||||
|
default:
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
return 1L;
|
||||||
|
}
|
99
rosapps/ctlpanel/rospower/main.h
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
/*
|
||||||
|
* ReactOS Control Panel Applet
|
||||||
|
*
|
||||||
|
* main.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Dickenson <robd@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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __MAIN_H__
|
||||||
|
#define __MAIN_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define STATUS_WINDOW 2001
|
||||||
|
#define TREE_WINDOW 2002
|
||||||
|
#define LIST_WINDOW 2003
|
||||||
|
|
||||||
|
#define MAX_LOADSTRING 100
|
||||||
|
#define SPLIT_WIDTH 5
|
||||||
|
#define MAX_NAME_LEN 500
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
enum OPTION_FLAGS {
|
||||||
|
OPTIONS_AUTO_REFRESH = 0x01,
|
||||||
|
OPTIONS_READ_ONLY_MODE = 0x02,
|
||||||
|
OPTIONS_CONFIRM_ON_DELETE = 0x04,
|
||||||
|
OPTIONS_SAVE_ON_EXIT = 0x08,
|
||||||
|
OPTIONS_DISPLAY_BINARY_DATA = 0x10,
|
||||||
|
OPTIONS_VIEW_TREE_ONLY = 0x20,
|
||||||
|
OPTIONS_VIEW_DATA_ONLY = 0x40,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
HWND hWnd;
|
||||||
|
HWND hTreeWnd;
|
||||||
|
HWND hListWnd;
|
||||||
|
int nFocusPanel; // 0: left 1: right
|
||||||
|
int nSplitPos;
|
||||||
|
WINDOWPLACEMENT pos;
|
||||||
|
TCHAR szPath[MAX_PATH];
|
||||||
|
} ChildWnd;
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Global Variables:
|
||||||
|
//
|
||||||
|
extern HINSTANCE hInst;
|
||||||
|
extern HWND hFrameWnd;
|
||||||
|
extern HMENU hMenuFrame;
|
||||||
|
extern HWND hStatusBar;
|
||||||
|
extern HFONT hFont;
|
||||||
|
extern enum OPTION_FLAGS Options;
|
||||||
|
|
||||||
|
extern TCHAR szTitle[];
|
||||||
|
extern TCHAR szWindowClass[];
|
||||||
|
|
||||||
|
extern LONG GetCountProc(VOID);
|
||||||
|
|
||||||
|
LRESULT CALLBACK CPlAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
|
#if __MINGW32_MAJOR_VERSION == 1
|
||||||
|
typedef struct tagNMITEMACTIVATE{
|
||||||
|
NMHDR hdr;
|
||||||
|
int iItem;
|
||||||
|
int iSubItem;
|
||||||
|
UINT uNewState;
|
||||||
|
UINT uOldState;
|
||||||
|
UINT uChanged;
|
||||||
|
POINT ptAction;
|
||||||
|
LPARAM lParam;
|
||||||
|
UINT uKeyFlags;
|
||||||
|
} NMITEMACTIVATE, FAR *LPNMITEMACTIVATE;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __MAIN_H__
|
37
rosapps/ctlpanel/rospower/makefile
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# $Id: makefile,v 1.1 2003/10/25 13:21:41 robd Exp $
|
||||||
|
|
||||||
|
PATH_TO_TOP = ../../../reactos
|
||||||
|
|
||||||
|
TOOLS_PATH = $(PATH_TO_TOP)/tools
|
||||||
|
|
||||||
|
TARGET_TYPE = dynlink
|
||||||
|
|
||||||
|
TARGET_NAME = rospower
|
||||||
|
|
||||||
|
TARGET_SDKLIBS = ntdll.a kernel32.a user32.a gdi32.a
|
||||||
|
|
||||||
|
TARGET_GCCLIBS = advapi32 comctl32 comdlg32 version
|
||||||
|
|
||||||
|
# TARGET_CFLAGS = -DUNICODE
|
||||||
|
|
||||||
|
TARGET_EXTENSION = .cpl
|
||||||
|
|
||||||
|
TARGET_BASE = 0x77dc0000
|
||||||
|
|
||||||
|
TARGET_OBJECTS = \
|
||||||
|
dllmain.o \
|
||||||
|
main.o \
|
||||||
|
system.o \
|
||||||
|
power.o \
|
||||||
|
trace.o
|
||||||
|
|
||||||
|
TARGET_CLEAN = %(TARGET_OBJECTS) $(TARGET_NAME).coff
|
||||||
|
|
||||||
|
include $(PATH_TO_TOP)/rules.mak
|
||||||
|
|
||||||
|
include $(TOOLS_PATH)/helper.mk
|
||||||
|
|
||||||
|
MK_CFLAGS = -D_WIN32_IE=0x0400 -D_UNICODE -DUNICODE -D_DEBUG -I./
|
||||||
|
MK_CPPFLAGS = -D_WIN32_IE=0x0400 -D_UNICODE -DUNICODE -D_DEBUG -I./
|
||||||
|
MK_RCFLAGS = -D_WIN32_IE=0x0400 -D_UNICODE -DUNICODE -D_DEBUG
|
||||||
|
|
435
rosapps/ctlpanel/rospower/power.c
Normal file
|
@ -0,0 +1,435 @@
|
||||||
|
/*
|
||||||
|
* ReactOS rospower control panel applet
|
||||||
|
*
|
||||||
|
* power.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Dickenson <robd@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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
#include <windows.h>
|
||||||
|
#include <cpl.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <memory.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
#include <process.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
#include <windowsx.h>
|
||||||
|
#include "main.h"
|
||||||
|
#include "system.h"
|
||||||
|
|
||||||
|
#include "assert.h"
|
||||||
|
#include "trace.h"
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Global and Local Variables:
|
||||||
|
//
|
||||||
|
|
||||||
|
extern HMODULE hModule;
|
||||||
|
/*
|
||||||
|
HWND hSystemGeneralPage;
|
||||||
|
HWND hSystemNetworkPage;
|
||||||
|
HWND hSystemHardwarePage;
|
||||||
|
HWND hSystemUsersPage;
|
||||||
|
HWND hSystemAdvancedPage;
|
||||||
|
*/
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Local module support methods
|
||||||
|
//
|
||||||
|
|
||||||
|
#define DLGPROC_RESULT BOOL
|
||||||
|
//#define DLGPROC_RESULT LRESULT
|
||||||
|
|
||||||
|
static HWND OnCreate(HWND hDlg, LONG lData)
|
||||||
|
{
|
||||||
|
// TCHAR buffer[50];
|
||||||
|
HWND hTabWnd = NULL;
|
||||||
|
// RECT rc;
|
||||||
|
|
||||||
|
//SendMessage(hDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(IDI_TASKMANAGER)));
|
||||||
|
|
||||||
|
// Create tab pages
|
||||||
|
// hTabWnd = GetDlgItem(hDlg, IDC_CPL_DIALOG_TAB);
|
||||||
|
// if (lData >= 0 && lData < GetCountProc()) {
|
||||||
|
// CreateTabPages(hDlg, &CPlAppletDlgPagesData[lData]);
|
||||||
|
// }
|
||||||
|
// LoadString(hModule, CPlAppletDlgPagesData[lData].nDlgTitleId, buffer, sizeof(buffer)/sizeof(TCHAR));
|
||||||
|
// SetWindowText(hDlg, buffer);
|
||||||
|
// TabCtrl_SetCurFocus/*Sel*/(hTabWnd, 0);
|
||||||
|
|
||||||
|
return hTabWnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LRESULT OnCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, int nDlgCtrlID)
|
||||||
|
{
|
||||||
|
TRACE(_T("OnCommand(%u, %08X, %08X)\n"), nDlgCtrlID, wParam, lParam);
|
||||||
|
|
||||||
|
switch (LOWORD(wParam)) {
|
||||||
|
case ID_APPLY:
|
||||||
|
break;
|
||||||
|
case IDC_SAVEAS_BUTTON:
|
||||||
|
break;
|
||||||
|
case IDC_DELETE_BUTTON:
|
||||||
|
break;
|
||||||
|
case IDC_CPL_POWER_UPS_ABOUT_BUTTON:
|
||||||
|
MessageBox(hDlg, _T("IDC_CPL_POWER_UPS_ABOUT_BUTTON"), _T("Power Config Applet"), MB_ICONEXCLAMATION);
|
||||||
|
return TRUE;
|
||||||
|
break;
|
||||||
|
case IDC_CPL_POWER_UPS_CONFIGURE_BUTTON:
|
||||||
|
//MessageBox(hDlg, _T("IDC_CPL_POWER_UPS_CONFIGURE_BUTTON"), _T("Power Config Applet"), MB_ICONEXCLAMATION);
|
||||||
|
break;
|
||||||
|
case IDC_CPL_POWER_UPS_SELECT_BUTTON:
|
||||||
|
//MessageBox(hDlg, _T("IDC_CPL_POWER_UPS_SELECT_BUTTON"), _T("Power Config Applet"), MB_ICONEXCLAMATION);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT OnNotify(HWND hDlg, WPARAM wParam, LPARAM lParam, int nDlgCtrlID)
|
||||||
|
{
|
||||||
|
TRACE(_T("OnNotify(%u, %08X, %08X)\n"), nDlgCtrlID, wParam, lParam);
|
||||||
|
/*
|
||||||
|
// int idctrl = (int)wParam;
|
||||||
|
// HWND hTabWnd = GetDlgItem(hWnd, pPagesData->nTabCtrlId);
|
||||||
|
LPNMHDR pnmh = (LPNMHDR)lParam;
|
||||||
|
if ((pnmh->hwndFrom == hTabWnd) && (pnmh->code == TCN_SELCHANGE)) {
|
||||||
|
// (pnmh->idFrom == IDD_CPL_TABBED_DIALOG) &&
|
||||||
|
TCITEM item;
|
||||||
|
int i;
|
||||||
|
int nActiveTabPage = TabCtrl_GetCurSel(hTabWnd);
|
||||||
|
int nPageCount = TabCtrl_GetItemCount(hTabWnd);
|
||||||
|
for (i = 0; i < nPageCount; i++) {
|
||||||
|
item.mask = TCIF_PARAM;
|
||||||
|
if (TabCtrl_GetItem(hTabWnd, i, &item)) {
|
||||||
|
if ((HWND)item.lParam) {
|
||||||
|
if (i == nActiveTabPage) {
|
||||||
|
ShowWindow((HWND)item.lParam, SW_SHOW);
|
||||||
|
//BringWindowToTop((HWND)item.lParam);
|
||||||
|
//TabCtrl_SetCurFocus(hTabWnd, i);
|
||||||
|
} else {
|
||||||
|
ShowWindow((HWND)item.lParam, SW_HIDE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// assert(0);
|
||||||
|
*/
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void OnTimer(HWND hDlg)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
TCHAR buffer[20];
|
||||||
|
struct tm *newtime;
|
||||||
|
time_t aclock;
|
||||||
|
HWND hEdit = GetDlgItem(hDlg, IDC_CPL_DATETIME_TIME_EDIT);
|
||||||
|
time(&aclock); /* Get time in seconds */
|
||||||
|
newtime = localtime(&aclock); /* Convert time to struct tm form */
|
||||||
|
swprintf(buffer, _T("%02u:%02u:%02u"), newtime->tm_hour, newtime->tm_min, newtime->tm_sec);
|
||||||
|
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM)buffer);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL LoadPowerSchemesCombo2(HWND hDlg)
|
||||||
|
{
|
||||||
|
// TCHAR buffer[20];
|
||||||
|
// struct tm *newtime;
|
||||||
|
// time_t aclock;
|
||||||
|
// int i;
|
||||||
|
HWND hCombo = GetDlgItem(hDlg, IDC_CPL_POWER_SCHEMES_COMBO);
|
||||||
|
// HWND hEdit = GetDlgItem(hDlg, IDC_CPL_POWER_SCHEMES_COMBO);
|
||||||
|
|
||||||
|
SendMessage(hCombo, CB_RESETCONTENT, 0, 0);
|
||||||
|
// time(&aclock); /* Get time in seconds */
|
||||||
|
// newtime = localtime(&aclock); /* Convert time to struct tm form */
|
||||||
|
/*
|
||||||
|
for (i = IDS_CPL_DATETIME_MONTH_1; i <= IDS_CPL_DATETIME_MONTH_12; i++) {
|
||||||
|
TCHAR buffer[34];
|
||||||
|
if (LoadString(hModule, i, buffer, sizeof(buffer)/sizeof(TCHAR))) {
|
||||||
|
int retval = SendMessage(hCombo, CB_INSERTSTRING, -1, (LPARAM)buffer);
|
||||||
|
if (retval == CB_ERR) {
|
||||||
|
MessageBox(hDlg, _T("CB_ERR: failed to add month item to combo box"), _T("Date Time Applet"), MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
|
} else
|
||||||
|
if (retval == CB_ERRSPACE) {
|
||||||
|
MessageBox(hDlg, _T("CB_ERRSPACE: failed to add month item to combo box"), _T("Date Time Applet"), MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
// SendMessage(hCombo, CB_SETCURSEL, newtime->tm_mon, 0);
|
||||||
|
//// _itot(newtime->tm_year + 1900, buffer, 10);
|
||||||
|
//// SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM)buffer);
|
||||||
|
// SendMessage(GetDlgItem(hDlg, IDC_CPL_POWER_UPS_MODEL_EDIT), WM_SETTEXT, 0, (LPARAM)_itot(newtime->tm_year + 1900, buffer, 10));
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
#define IDC_CPL_POWER_SCHEMES_STANDBY_COMBO 1010
|
||||||
|
#define IDC_CPL_POWER_SCHEMES_MONITOROFF_COMBO 1011
|
||||||
|
#define IDC_CPL_POWER_SCHEMES_DISKOFF_COMBO 1012
|
||||||
|
#define IDC_CPL_POWER_SCHEMES_HIBERNATE_COMBO 1013
|
||||||
|
#define IDC_CPL_POWER_SCHEMES_COMBO 1014
|
||||||
|
#define IDC_CPL_POWER_HIBERNATE_DISK_AVAIL_EDIT 1015
|
||||||
|
#define IDC_CPL_POWER_HIBERNATE_ENABLE_CHECK 1016
|
||||||
|
#define IDC_CPL_POWER_HIBERNATE_DISK_REQ_EDIT 1017
|
||||||
|
#define IDC_CPL_POWER_ADVANCED_RESUME_PASSWORD_CHECK 1018
|
||||||
|
#define IDC_CPL_POWER_ADVANCED_POWER_COMBO 1019
|
||||||
|
#define IDC_CPL_POWER_ADVANCED_SLEEP_COMBO 1020
|
||||||
|
#define IDC_CPL_POWER_ADVANCED_TASKBAR_ICON_CHECK 1021
|
||||||
|
#define IDC_CPL_POWER_UPS_POWER_SOURCE_EDIT 1022
|
||||||
|
#define IDC_CPL_POWER_UPS_ABOUT_BUTTON 1023
|
||||||
|
#define IDC_CPL_POWER_UPS_ESTIMATED_RUNTIME_EDIT 1024
|
||||||
|
#define IDC_CPL_POWER_UPS_ESTIMATED_CAPACITY_EDIT 1025
|
||||||
|
#define IDC_CPL_POWER_UPS_BATTERY_STATE_EDIT 1026
|
||||||
|
#define IDC_CPL_POWER_UPS_MANUFACTURER_EDIT 1027
|
||||||
|
#define IDC_CPL_POWER_UPS_MODEL_EDIT 1028
|
||||||
|
#define IDC_CPL_POWER_UPS_SERVICE_STATUS_EDIT 1029
|
||||||
|
#define IDC_CPL_POWER_UPS_CONFIGURE_BUTTON 1030
|
||||||
|
#define IDC_CPL_POWER_UPS_SELECT_BUTTON 1031
|
||||||
|
*/
|
||||||
|
|
||||||
|
static BOOL ReadPowerPoliciesRegKey(HWND hDlg, HKEY hNewKey, TCHAR* Name)
|
||||||
|
{
|
||||||
|
DWORD dwCount = 0L;
|
||||||
|
HKEY hSubKey = 0;
|
||||||
|
HWND hCombo = GetDlgItem(hDlg, IDC_CPL_POWER_SCHEMES_COMBO);
|
||||||
|
LONG errCode = errCode = RegOpenKeyEx(hNewKey, Name, 0, KEY_READ, &hSubKey);
|
||||||
|
if (errCode == ERROR_SUCCESS) {
|
||||||
|
DWORD max_sub_key_len, max_val_name_len, max_val_size, val_count;
|
||||||
|
/* get size information and resize the buffers if necessary */
|
||||||
|
errCode = RegQueryInfoKey(hSubKey, NULL, NULL, NULL, NULL,
|
||||||
|
&max_sub_key_len, NULL, &val_count, &max_val_name_len, &max_val_size, NULL, NULL);
|
||||||
|
if (errCode == ERROR_SUCCESS) {
|
||||||
|
TCHAR* ValName = malloc(++max_val_name_len * sizeof(TCHAR));
|
||||||
|
DWORD dwValNameLen = max_val_name_len;
|
||||||
|
BYTE* ValBuf = malloc(++max_val_size);
|
||||||
|
DWORD dwValSize = max_val_size;
|
||||||
|
DWORD dwIndex = 0L;
|
||||||
|
DWORD dwValType;
|
||||||
|
while (RegEnumValue(hSubKey, dwIndex, ValName, &dwValNameLen, NULL, &dwValType, ValBuf, &dwValSize) == ERROR_SUCCESS) {
|
||||||
|
ValBuf[dwValSize] = _T('\0');
|
||||||
|
if (_tcsstr(ValName, _T("Name"))) {
|
||||||
|
//TRACE(_T(" %u %s = %s\n"), dwIndex, ValName, ValBuf);
|
||||||
|
int retval = SendMessage(hCombo, CB_INSERTSTRING, -1, (LPARAM)ValBuf);
|
||||||
|
if (retval == CB_ERR) {
|
||||||
|
MessageBox(hDlg, _T("CB_ERR: failed to add power policy item to combo box"), _T("Power Config Applet"), MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
|
} else {
|
||||||
|
if (retval == CB_ERRSPACE) {
|
||||||
|
MessageBox(hDlg, _T("CB_ERRSPACE: failed to add power policy item to combo box"), _T("Power Config Applet"), MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dwValNameLen = max_val_name_len;
|
||||||
|
dwValSize = max_val_size;
|
||||||
|
dwValType = 0L;
|
||||||
|
++dwIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free(ValBuf);
|
||||||
|
free(ValName);
|
||||||
|
}
|
||||||
|
RegCloseKey(hSubKey);
|
||||||
|
} else {
|
||||||
|
TRACE(_T("ReadPowerPoliciesRegKey() ERROR: failed to open registry data %s\n"), Name);
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL LoadPowerSchemesCombo(HWND hDlg)
|
||||||
|
{
|
||||||
|
HKEY hKey = HKEY_CURRENT_USER;
|
||||||
|
TCHAR keyPath[1000];
|
||||||
|
int keyPathLen = 0;
|
||||||
|
|
||||||
|
HWND hCombo = GetDlgItem(hDlg, IDC_CPL_POWER_SCHEMES_COMBO);
|
||||||
|
SendMessage(hCombo, CB_RESETCONTENT, 0, 0);
|
||||||
|
|
||||||
|
if (hKey != NULL) {
|
||||||
|
HKEY hNewKey;
|
||||||
|
LONG errCode;
|
||||||
|
_tcscpy(keyPath, _T("Control Panel\\PowerCfg\\PowerPolicies"));
|
||||||
|
errCode = RegOpenKeyEx(hKey, keyPath, 0, KEY_READ, &hNewKey);
|
||||||
|
if (errCode == ERROR_SUCCESS) {
|
||||||
|
TCHAR Name[MAX_NAME_LEN];
|
||||||
|
DWORD cName = MAX_NAME_LEN;
|
||||||
|
DWORD dwIndex = 0L;
|
||||||
|
while (RegEnumKeyEx(hNewKey, dwIndex, Name, &cName, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
|
||||||
|
ReadPowerPoliciesRegKey(hDlg, hNewKey, Name);
|
||||||
|
cName = MAX_NAME_LEN;
|
||||||
|
++dwIndex;
|
||||||
|
}
|
||||||
|
RegCloseKey(hNewKey);
|
||||||
|
} else {
|
||||||
|
TRACE(_T("LoadPowerSchemesCombo() ERROR: failed to open registry key %s\n"), keyPath);
|
||||||
|
MessageBox(hDlg, _T("ERROR: failed to open registry key"), _T("Power Config Applet"), MB_ICONERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
_tcscpy(keyPath, _T("Control Panel\\PowerCfg"));
|
||||||
|
errCode = RegOpenKeyEx(hKey, keyPath, 0, KEY_READ, &hNewKey);
|
||||||
|
if (errCode == ERROR_SUCCESS) {
|
||||||
|
TCHAR buffer[32];
|
||||||
|
DWORD dwSize = sizeof(buffer)/sizeof(buffer[0]);
|
||||||
|
errCode = RegQueryValueEx(hNewKey, _T("CurrentPowerPolicy"), NULL, NULL, (LPBYTE)buffer, &dwSize);
|
||||||
|
if (errCode == ERROR_SUCCESS) {
|
||||||
|
SendMessage(hCombo, CB_SETCURSEL, _ttoi(buffer), 0);
|
||||||
|
}
|
||||||
|
RegCloseKey(hNewKey);
|
||||||
|
} else {
|
||||||
|
TRACE(_T("LoadPowerSchemesCombo() ERROR: failed to open registry key %s\n"), keyPath);
|
||||||
|
MessageBox(hDlg, _T("ERROR: failed to open registry key"), _T("Power Config Applet"), MB_ICONERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
MessageBox(hDlg, _T("ERROR: no registry root key"), _T("Power Config Applet"), MB_ICONERROR);
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ID_CPL_POWERCFG_TIMER_ID 36
|
||||||
|
#define ID_CPL_POWERCFG_TIMER_PERIOD 1000
|
||||||
|
static int nTimerID;
|
||||||
|
|
||||||
|
static BOOL OnInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
// BYTE StandardNameBuf[100];
|
||||||
|
// TCHAR keyPath[1000];
|
||||||
|
// HKEY hNewKey;
|
||||||
|
// LONG errCode;
|
||||||
|
|
||||||
|
TRACE(_T("OnInitDialog(%08X, %08X, %08X)\n"), hDlg, wParam, lParam);
|
||||||
|
|
||||||
|
// nTimerID = SetTimer(hDlg, ID_CPL_POWERCFG_TIMER_ID, ID_CPL_POWERCFG_TIMER_PERIOD, NULL);
|
||||||
|
// if (!nTimerID) {
|
||||||
|
// return FALSE;
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (lParam == IDD_CPL_POWER_SCHEMES_PAGE) {
|
||||||
|
//HWND hEdit = GetDlgItem(hDlg, IDC_CPL_DATETIME_CURRENT_TIMEZONE_EDIT);
|
||||||
|
LoadPowerSchemesCombo(hDlg);
|
||||||
|
//SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM)StandardNameBuf);
|
||||||
|
} else
|
||||||
|
if (lParam == IDD_CPL_POWER_ADVANCED_PAGE) {
|
||||||
|
//HWND hCombo = GetDlgItem(hDlg, IDC_CPL_DATETIME_TIMEZONE_COMBO);
|
||||||
|
LoadPowerSchemesCombo2(hDlg);
|
||||||
|
// SendMessage(hCombo, CB_SETCURSEL, newtime->tm_mon, 0);
|
||||||
|
//SendMessage(hCombo, CB_SELECTSTRING, 0, (LPARAM)StandardNameBuf);
|
||||||
|
//SendMessage(hCombo, CB_SELECTSTRING, 0, (LPARAM)_T("(UTC+10:00) Australia New South Wales"));
|
||||||
|
} else
|
||||||
|
if (lParam == IDD_CPL_POWER_HIBERNATE_PAGE) {
|
||||||
|
} else
|
||||||
|
if (lParam == IDD_CPL_POWER_UPS_PAGE) {
|
||||||
|
} else
|
||||||
|
if (lParam == IDD_CPL_POWER_HARDWARE_PAGE) {
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
StandardNameBuf[0] = _T('\0');
|
||||||
|
//_tcscpy(keyPath, _T("SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation"));
|
||||||
|
_tcscpy(keyPath, _T("SYSTEM\\CurrentControlSet\\Control\\TimeZoneInfo"));
|
||||||
|
errCode = RegOpenKeyEx(HKEY_LOCAL_MACHINE, keyPath, 0, KEY_READ, &hNewKey);
|
||||||
|
if (errCode == ERROR_SUCCESS) {
|
||||||
|
DWORD dwValSize = 100;
|
||||||
|
DWORD dwValType;
|
||||||
|
if (RegQueryValueEx(hNewKey, _T("StandardName"), NULL, &dwValType, StandardNameBuf, &dwValSize) == ERROR_SUCCESS) {
|
||||||
|
}
|
||||||
|
RegCloseKey(hNewKey);
|
||||||
|
|
||||||
|
if (lParam == IDD_CPL_POWER_SCHEMES_PAGE) {
|
||||||
|
HWND hEdit = GetDlgItem(hDlg, IDC_CPL_POWER_HIBERNATE_DISK_REQ_EDIT);
|
||||||
|
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM)StandardNameBuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
_tcscpy(keyPath, _T("SOFTWARE\\ReactWare\\Windows NT\\CurrentVersion\\Time Zones\\"));
|
||||||
|
_tcscat(keyPath, StandardNameBuf);
|
||||||
|
|
||||||
|
TRACE(_T("OnInitDialog() keyPath %s\n"), keyPath);
|
||||||
|
|
||||||
|
errCode = RegOpenKeyEx(HKEY_LOCAL_MACHINE, keyPath, 0, KEY_READ, &hNewKey);
|
||||||
|
if (errCode == ERROR_SUCCESS) {
|
||||||
|
dwValSize = 100;
|
||||||
|
if (RegQueryValueEx(hNewKey, _T("Display"), NULL, &dwValType, StandardNameBuf, &dwValSize) == ERROR_SUCCESS) {
|
||||||
|
if (lParam == IDD_CPL_POWER_ADVANCED_PAGE) {
|
||||||
|
HWND hCombo = GetDlgItem(hDlg, IDC_CPL_POWER_SCHEMES_MONITOROFF_COMBO);
|
||||||
|
//SendMessage(hCombo, CB_SELECTSTRING, 0, (LPARAM)StandardNameBuf);
|
||||||
|
SendMessage(hCombo, CB_SELECTSTRING, 0, (LPARAM)_T("(UTC+10:00) Australia New South Wales"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RegCloseKey(hNewKey);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
TRACE(_T("LoadPowerSchemesCombo() ERROR: failed to open registry key %s\n"), keyPath);
|
||||||
|
MessageBox(hDlg, _T("ERROR: failed to open registry key"), _T("Power Config Applet"), MB_ICONERROR);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLGPROC_RESULT CALLBACK CPlPowerAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
// LONG nDlgCtrlID = GetWindowLong(hDlg, GWL_ID);
|
||||||
|
LONG nDlgCtrlID = GetWindowLong(hDlg, DWL_USER);
|
||||||
|
|
||||||
|
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
SetWindowLong(hDlg, DWL_USER, lParam);
|
||||||
|
return OnInitDialog(hDlg, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_DESTROY:
|
||||||
|
if (nTimerID) KillTimer(hDlg, nTimerID);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_COMMAND:
|
||||||
|
return OnCommand(hDlg, wParam, lParam, nDlgCtrlID);
|
||||||
|
// Handle the button clicks
|
||||||
|
/*
|
||||||
|
switch (LOWORD(wParam)) {
|
||||||
|
// case IDC_ENDTASK:
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
case IDOK:
|
||||||
|
case IDCANCEL:
|
||||||
|
DestroyWindow(hDlg);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
*/
|
||||||
|
case WM_TIMER:
|
||||||
|
OnTimer(hDlg);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_NOTIFY:
|
||||||
|
return OnNotify(hDlg, wParam, lParam, nDlgCtrlID);
|
||||||
|
//break;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
66
rosapps/ctlpanel/rospower/resource.h
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
|
||||||
|
#define IDC_CPL_DIALOG_TAB 100
|
||||||
|
|
||||||
|
#define IDD_CPL_POWER_DIALOG 101
|
||||||
|
#define IDI_CPL_POWER_ICON 102
|
||||||
|
#define IDS_CPL_POWER_DIALOG 103
|
||||||
|
#define IDD_CPL_POWER_SCHEMES_PAGE 110
|
||||||
|
#define IDD_CPL_POWER_ADVANCED_PAGE 111
|
||||||
|
#define IDD_CPL_POWER_HIBERNATE_PAGE 112
|
||||||
|
#define IDD_CPL_POWER_UPS_PAGE 113
|
||||||
|
#define IDD_CPL_POWER_HARDWARE_PAGE 114
|
||||||
|
#define IDS_CPL_POWER_NAME 115
|
||||||
|
#define IDS_CPL_POWER_INFO 116
|
||||||
|
|
||||||
|
#define ID_APPLY 1002
|
||||||
|
#define IDC_SAVEAS_BUTTON 1003
|
||||||
|
#define IDC_DELETE_BUTTON 1004
|
||||||
|
|
||||||
|
#define IDC_CPL_POWER_SCHEMES_STANDBY_COMBO 1010
|
||||||
|
#define IDC_CPL_POWER_SCHEMES_MONITOROFF_COMBO 1011
|
||||||
|
#define IDC_CPL_POWER_SCHEMES_DISKOFF_COMBO 1012
|
||||||
|
#define IDC_CPL_POWER_SCHEMES_HIBERNATE_COMBO 1013
|
||||||
|
#define IDC_CPL_POWER_SCHEMES_COMBO 1014
|
||||||
|
#define IDC_CPL_POWER_HIBERNATE_DISK_AVAIL_EDIT 1015
|
||||||
|
#define IDC_CPL_POWER_HIBERNATE_ENABLE_CHECK 1016
|
||||||
|
#define IDC_CPL_POWER_HIBERNATE_DISK_REQ_EDIT 1017
|
||||||
|
#define IDC_CPL_POWER_ADVANCED_RESUME_PASSWORD_CHECK 1018
|
||||||
|
#define IDC_CPL_POWER_ADVANCED_POWER_COMBO 1019
|
||||||
|
#define IDC_CPL_POWER_ADVANCED_SLEEP_COMBO 1020
|
||||||
|
#define IDC_CPL_POWER_ADVANCED_TASKBAR_ICON_CHECK 1021
|
||||||
|
#define IDC_CPL_POWER_UPS_POWER_SOURCE_EDIT 1022
|
||||||
|
#define IDC_CPL_POWER_UPS_ABOUT_BUTTON 1023
|
||||||
|
#define IDC_CPL_POWER_UPS_ESTIMATED_RUNTIME_EDIT 1024
|
||||||
|
#define IDC_CPL_POWER_UPS_ESTIMATED_CAPACITY_EDIT 1025
|
||||||
|
#define IDC_CPL_POWER_UPS_BATTERY_STATE_EDIT 1026
|
||||||
|
#define IDC_CPL_POWER_UPS_MANUFACTURER_EDIT 1027
|
||||||
|
#define IDC_CPL_POWER_UPS_MODEL_EDIT 1028
|
||||||
|
#define IDC_CPL_POWER_UPS_SERVICE_STATUS_EDIT 1029
|
||||||
|
#define IDC_CPL_POWER_UPS_CONFIGURE_BUTTON 1030
|
||||||
|
#define IDC_CPL_POWER_UPS_SELECT_BUTTON 1031
|
||||||
|
/*
|
||||||
|
#define IDC_SPIN1 1041
|
||||||
|
#define IDC_SPIN2 1042
|
||||||
|
#define IDC_RADIO1 1043
|
||||||
|
#define IDC_RADIO2 1044
|
||||||
|
#define IDC_SLIDER1 1045
|
||||||
|
#define IDC_SLIDER2 1046
|
||||||
|
#define IDC_SLIDER3 1047
|
||||||
|
#define IDC_MONTHCALENDAR1 1048
|
||||||
|
*/
|
||||||
|
#define IDC_STATIC -1
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 145
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 32780
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 115
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
35
rosapps/ctlpanel/rospower/resrc1.h
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Developer Studio generated include file.
|
||||||
|
// Used by rospower.rc
|
||||||
|
//
|
||||||
|
#define IDC_CHECK1 1001
|
||||||
|
#define IDC_CHECK2 1002
|
||||||
|
#define IDC_CHECK3 1003
|
||||||
|
#define IDC_EDIT1 1004
|
||||||
|
#define IDC_BUTTON1 1005
|
||||||
|
#define IDC_EDIT5 1005
|
||||||
|
#define IDC_BUTTON2 1007
|
||||||
|
#define IDC_COMBO1 1007
|
||||||
|
#define IDC_EDIT2 1008
|
||||||
|
#define IDC_SPIN1 1008
|
||||||
|
#define IDC_EDIT3 1009
|
||||||
|
#define IDC_MONTHCALENDAR1 1009
|
||||||
|
#define IDC_EDIT4 1010
|
||||||
|
#define IDC_SPIN2 1010
|
||||||
|
#define IDC_EDIT6 1011
|
||||||
|
#define IDC_SLIDER1 1012
|
||||||
|
#define IDC_SLIDER2 1013
|
||||||
|
#define IDC_RADIO1 1013
|
||||||
|
#define IDC_SLIDER3 1014
|
||||||
|
#define IDC_RADIO2 1014
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 130
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 32780
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1023
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 110
|
||||||
|
#endif
|
||||||
|
#endif
|
9
rosapps/ctlpanel/rospower/rospower.def
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
;
|
||||||
|
; rospower.def
|
||||||
|
;
|
||||||
|
; ReactOS Operating System
|
||||||
|
;
|
||||||
|
;
|
||||||
|
LIBRARY rospower.cpl
|
||||||
|
EXPORTS
|
||||||
|
CPlApplet
|
9
rosapps/ctlpanel/rospower/rospower.edf
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
;
|
||||||
|
; rospower.edf
|
||||||
|
;
|
||||||
|
; ReactOS Operating System
|
||||||
|
;
|
||||||
|
;
|
||||||
|
LIBRARY rospower.cpl
|
||||||
|
EXPORTS
|
||||||
|
CPlApplet=CPlApplet@16
|
307
rosapps/ctlpanel/rospower/rospower.rc
Normal file
|
@ -0,0 +1,307 @@
|
||||||
|
//Microsoft Developer Studio generated resource script.
|
||||||
|
//
|
||||||
|
#include "resrc1.h"
|
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
|
//
|
||||||
|
#include "defines.h"
|
||||||
|
#include "reactos\resource.h"
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// English (U.S.) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Icon
|
||||||
|
//
|
||||||
|
|
||||||
|
// Icon with lowest ID value placed first to ensure application icon
|
||||||
|
// remains consistent on all systems.
|
||||||
|
IDI_CPL_POWER_ICON ICON DISCARDABLE "res/power.ico"
|
||||||
|
|
||||||
|
#ifndef _MAC
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Version
|
||||||
|
//
|
||||||
|
|
||||||
|
(1) VERSIONINFO
|
||||||
|
FILEVERSION 0,0,19,154
|
||||||
|
PRODUCTVERSION 0,0,19,0
|
||||||
|
FILEFLAGSMASK 0x3fL
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS 0x1L
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS 0x40004L
|
||||||
|
FILETYPE 0x2L
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", "ReactOS Development Team\0"
|
||||||
|
VALUE "FileDescription", "ReactOS System Control Panel Applet\0"
|
||||||
|
VALUE "FileVersion", "0.0.19.154\0"
|
||||||
|
VALUE "InternalName", "rospower\0"
|
||||||
|
VALUE "LegalCopyright", "Copyright (c) 1998-2002 ReactOS Team\0"
|
||||||
|
VALUE "OriginalFilename", "rospower.cpl\0"
|
||||||
|
VALUE "ProductName", "ReactOS Operating System\0"
|
||||||
|
VALUE "ProductVersion", "0.0.19\0"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // !_MAC
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Dialog
|
||||||
|
//
|
||||||
|
|
||||||
|
IDD_CPL_POWER_DIALOG DIALOG DISCARDABLE 0, 0, 270, 230
|
||||||
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
|
||||||
|
WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Tabbed Applet"
|
||||||
|
FONT 8, "MS Sans Serif"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "Tab1",IDC_CPL_DIALOG_TAB,"SysTabControl32",WS_TABSTOP,5,
|
||||||
|
5,260,200
|
||||||
|
PUSHBUTTON "&Cancel",IDCANCEL,200,250,50,14
|
||||||
|
PUSHBUTTON "OK",IDOK,130,250,50,14
|
||||||
|
PUSHBUTTON "&Apply",ID_APPLY,60,250,50,14
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_POWER_SCHEMES_PAGE DIALOG DISCARDABLE 10, 10, 291, 220
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,7,7,32,32
|
||||||
|
LTEXT "Select the power scheme with the most appropriate settings for this computer. Changing the settings will modify the selected scheme.",
|
||||||
|
IDC_STATIC,42,5,232,20
|
||||||
|
|
||||||
|
GROUPBOX "P&ower schemes",IDC_STATIC,5,45,275,50
|
||||||
|
PUSHBUTTON "&Save As...",IDC_SAVEAS_BUTTON,150,75,50,14
|
||||||
|
PUSHBUTTON "&Delete",IDC_DELETE_BUTTON,210,75,50,14
|
||||||
|
COMBOBOX IDC_CPL_POWER_SCHEMES_COMBO,15,55,255,115,CBS_DROPDOWN |
|
||||||
|
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||||
|
GROUPBOX "Settings for Home/Office Desk power scheme",IDC_STATIC,
|
||||||
|
5,100,275,100
|
||||||
|
LTEXT "Turn off &monitor:",IDC_STATIC,14,120,80,10
|
||||||
|
LTEXT "Turn off hard d&isks:",IDC_STATIC,14,135,80,10
|
||||||
|
LTEXT "System s&tandby:",IDC_STATIC,14,165,80,10
|
||||||
|
LTEXT "System &hibernates:",IDC_STATIC,14,180,80,10
|
||||||
|
COMBOBOX IDC_CPL_POWER_SCHEMES_MONITOROFF_COMBO,90,120,175,85,
|
||||||
|
CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||||
|
COMBOBOX IDC_CPL_POWER_SCHEMES_DISKOFF_COMBO,90,135,175,85,
|
||||||
|
CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||||
|
COMBOBOX IDC_CPL_POWER_SCHEMES_STANDBY_COMBO,90,165,175,85,
|
||||||
|
CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||||
|
COMBOBOX IDC_CPL_POWER_SCHEMES_HIBERNATE_COMBO,90,180,175,85,
|
||||||
|
CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_POWER_ADVANCED_PAGE DIALOG DISCARDABLE 10, 10, 294, 224
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,7,7,32,32
|
||||||
|
LTEXT "Select advanced behaviour options for this computer.",
|
||||||
|
IDC_STATIC,47,13,225,10
|
||||||
|
GROUPBOX "Options",IDC_STATIC,5,45,275,50
|
||||||
|
CONTROL "Always show &icon on the taskbar.",
|
||||||
|
IDC_CPL_POWER_ADVANCED_TASKBAR_ICON_CHECK,"Button",
|
||||||
|
BS_AUTOCHECKBOX | WS_TABSTOP,23,60,239,9
|
||||||
|
CONTROL "Prompt for &password when the computer returns from standby.",
|
||||||
|
IDC_CPL_POWER_ADVANCED_RESUME_PASSWORD_CHECK,"Button",
|
||||||
|
BS_AUTOCHECKBOX | WS_TABSTOP,23,74,239,9
|
||||||
|
GROUPBOX "Power buttons",IDC_STATIC,5,100,275,100
|
||||||
|
LTEXT "Pow&er button causes computer to:",IDC_STATIC,18,118,
|
||||||
|
241,10
|
||||||
|
LTEXT "Sleep butto&n causes computer to:",IDC_STATIC,18,161,
|
||||||
|
241,10
|
||||||
|
COMBOBOX IDC_CPL_POWER_ADVANCED_POWER_COMBO,19,131,247,85,
|
||||||
|
CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||||
|
COMBOBOX IDC_CPL_POWER_ADVANCED_SLEEP_COMBO,17,174,247,85,
|
||||||
|
CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_POWER_HIBERNATE_PAGE DIALOG DISCARDABLE 10, 10, 294, 227
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
GROUPBOX "Hibernate",IDC_STATIC,5,50,275,75
|
||||||
|
CONTROL "Enable computer to enter &hiberate mode.",
|
||||||
|
IDC_CPL_POWER_HIBERNATE_ENABLE_CHECK,"Button",
|
||||||
|
BS_AUTOCHECKBOX | WS_TABSTOP,18,67,232,11
|
||||||
|
LTEXT "Available disk space:",IDC_STATIC,47,86,84,10
|
||||||
|
LTEXT "Disk space required for hiberate:",IDC_STATIC,13,102,
|
||||||
|
116,10
|
||||||
|
EDITTEXT IDC_CPL_POWER_HIBERNATE_DISK_AVAIL_EDIT,135,85,85,10,
|
||||||
|
ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
|
EDITTEXT IDC_CPL_POWER_HIBERNATE_DISK_REQ_EDIT,135,101,85,10,
|
||||||
|
ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,7,7,32,32
|
||||||
|
LTEXT "When the computer hiberates it stores the contents of the RAM onto the hard disk and then powers down. Upon returning from hibernation the computer will return to it's previous operating state.",
|
||||||
|
IDC_STATIC,51,7,224,30
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_POWER_UPS_PAGE DIALOG DISCARDABLE 10, 10, 269, 206
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
GROUPBOX "Status",IDC_STATIC,5,5,275,55
|
||||||
|
GROUPBOX "Details",IDC_STATIC,5,60,275,55
|
||||||
|
GROUPBOX "Details",IDC_STATIC,5,120,275,55
|
||||||
|
PUSHBUTTON "A&bout...",IDC_CPL_POWER_UPS_ABOUT_BUTTON,5,183,60,14
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,10,140,32,32
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,10,85,32,32
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,10,20,32,32
|
||||||
|
LTEXT "Current power source:",IDC_STATIC,48,11,85,10
|
||||||
|
LTEXT "Estimated UPS runtime:",IDC_STATIC,48,20,85,10
|
||||||
|
LTEXT "Estimated UPS capacity:",IDC_STATIC,48,30,85,10
|
||||||
|
LTEXT "Battery condition:",IDC_STATIC,48,42,85,10
|
||||||
|
LTEXT "Manufacturer:",IDC_STATIC,48,74,85,10
|
||||||
|
LTEXT "Model:",IDC_STATIC,48,83,85,10
|
||||||
|
EDITTEXT IDC_CPL_POWER_UPS_POWER_SOURCE_EDIT,138,11,118,10,
|
||||||
|
ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
|
EDITTEXT IDC_CPL_POWER_UPS_ESTIMATED_RUNTIME_EDIT,138,19,118,10,
|
||||||
|
ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
|
EDITTEXT IDC_CPL_POWER_UPS_ESTIMATED_CAPACITY_EDIT,138,30,118,10,
|
||||||
|
ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
|
EDITTEXT IDC_CPL_POWER_UPS_BATTERY_STATE_EDIT,138,42,118,10,
|
||||||
|
ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
|
EDITTEXT IDC_CPL_POWER_UPS_MANUFACTURER_EDIT,138,73,118,10,
|
||||||
|
ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
|
EDITTEXT IDC_CPL_POWER_UPS_MODEL_EDIT,138,82,118,10,
|
||||||
|
ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
|
EDITTEXT IDC_CPL_POWER_UPS_SERVICE_STATUS_EDIT,50,146,200,10,
|
||||||
|
ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
|
PUSHBUTTON "&Configure...",IDC_CPL_POWER_UPS_CONFIGURE_BUTTON,127,
|
||||||
|
100,60,14
|
||||||
|
PUSHBUTTON "&Select...",IDC_CPL_POWER_UPS_SELECT_BUTTON,196,100,60,
|
||||||
|
14
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_CPL_POWER_HARDWARE_PAGE DIALOG DISCARDABLE 10, 10, 247, 180
|
||||||
|
STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||||
|
FONT 8, "Tahoma"
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// DESIGNINFO
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
GUIDELINES DESIGNINFO DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDD_CPL_POWER_DIALOG, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 7
|
||||||
|
RIGHTMARGIN, 267
|
||||||
|
TOPMARGIN, 7
|
||||||
|
BOTTOMMARGIN, 225
|
||||||
|
END
|
||||||
|
END
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// String Table
|
||||||
|
//
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDD_CPL_POWER_HIBERNATE_PAGE "Hibernate"
|
||||||
|
IDD_CPL_POWER_UPS_PAGE "UPS"
|
||||||
|
IDD_CPL_POWER_HARDWARE_PAGE "Hardware"
|
||||||
|
IDS_CPL_POWER_NAME "Power Settings"
|
||||||
|
IDS_CPL_POWER_INFO "Configures Energy Saving and UPS Options"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDS_CPL_POWER_DIALOG "Power Management Configuration"
|
||||||
|
IDD_CPL_POWER_SCHEMES_PAGE "Power Schemes"
|
||||||
|
IDD_CPL_POWER_ADVANCED_PAGE "Advanced"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // English (U.S.) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// English (Australia) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TEXTINCLUDE
|
||||||
|
//
|
||||||
|
|
||||||
|
1 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"resrc1.h\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
2 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"#include ""defines.h""\r\n"
|
||||||
|
"#include ""reactos\\resource.h""\r\n"
|
||||||
|
"#include ""resource.h""\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
3 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
#endif // English (Australia) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
351
rosapps/ctlpanel/rospower/system.c
Normal file
|
@ -0,0 +1,351 @@
|
||||||
|
/*
|
||||||
|
* ReactOS control
|
||||||
|
*
|
||||||
|
* system.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Dickenson <robd@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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
#include <windows.h>
|
||||||
|
#include <cpl.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <memory.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
#include <process.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <windowsx.h>
|
||||||
|
#include "main.h"
|
||||||
|
#include "system.h"
|
||||||
|
|
||||||
|
#include "assert.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
LRESULT CALLBACK SystemGeneralPageProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT CALLBACK SystemNetworkPageProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT CALLBACK SystemHardwarePageProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT CALLBACK SystemUsersPageProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT CALLBACK SystemAdvancedPageProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Global and Local Variables:
|
||||||
|
//
|
||||||
|
|
||||||
|
extern HMODULE hModule;
|
||||||
|
|
||||||
|
//HWND hSystemGeneralPage;
|
||||||
|
//HWND hSystemNetworkPage;
|
||||||
|
//HWND hSystemHardwarePage;
|
||||||
|
//HWND hSystemUsersPage;
|
||||||
|
//HWND hSystemAdvancedPage;
|
||||||
|
|
||||||
|
int nMinimumWidth; // Minimum width of the dialog (OnSize()'s cx)
|
||||||
|
int nMinimumHeight; // Minimum height of the dialog (OnSize()'s cy)
|
||||||
|
int nOldWidth; // Holds the previous client area width
|
||||||
|
int nOldHeight; // Holds the previous client area height
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Local module support methods
|
||||||
|
//
|
||||||
|
|
||||||
|
typedef struct CPlAppletDlgPagesCfg {
|
||||||
|
// int nTabCtrlId;
|
||||||
|
int nDlgTitleId;
|
||||||
|
int nFirstPageId;
|
||||||
|
int nLastPageId;
|
||||||
|
DLGPROC pDlgProc;
|
||||||
|
} CPlAppletDlgPagesCfg;
|
||||||
|
|
||||||
|
#define DLGPROC_RESULT BOOL
|
||||||
|
//#define DLGPROC_RESULT LRESULT
|
||||||
|
|
||||||
|
LRESULT CALLBACK CPlPowerAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
|
CPlAppletDlgPagesCfg CPlAppletDlgPagesData[] = {
|
||||||
|
{ IDS_CPL_POWER_DIALOG, IDD_CPL_POWER_SCHEMES_PAGE, IDD_CPL_POWER_HARDWARE_PAGE, CPlPowerAppletDlgProc },
|
||||||
|
};
|
||||||
|
|
||||||
|
//static BOOL CreateTabPages(HWND hDlg, int nTabCtrlId, int nFirstPageId, int nLastPageId, DLGPROC pDlgProc)
|
||||||
|
static BOOL CreateTabPages(HWND hDlg, CPlAppletDlgPagesCfg* pPagesData)
|
||||||
|
{
|
||||||
|
TCHAR szPageTitle[MAX_LOADSTRING];
|
||||||
|
RECT rc;
|
||||||
|
TCITEM item;
|
||||||
|
int i, count;
|
||||||
|
int nWidth = 0;
|
||||||
|
int nHeight = 0;
|
||||||
|
int nTabWndHeight = 0;
|
||||||
|
HWND hTabWnd = GetDlgItem(hDlg, IDC_CPL_DIALOG_TAB);
|
||||||
|
|
||||||
|
if (TabCtrl_GetItemRect(hTabWnd, 0, &rc)) {
|
||||||
|
nTabWndHeight = rc.bottom - rc.top;
|
||||||
|
}
|
||||||
|
|
||||||
|
//GetWindowRect(hTabWnd, &rc);
|
||||||
|
GetClientRect(hTabWnd, &rc);
|
||||||
|
nWidth = rc.right - rc.left;
|
||||||
|
nHeight = rc.bottom - rc.top;
|
||||||
|
|
||||||
|
MapWindowPoints(hTabWnd, hDlg, (LPPOINT)(&rc), (sizeof(RECT)/sizeof(POINT)));
|
||||||
|
|
||||||
|
for (i = pPagesData->nFirstPageId; i <= pPagesData->nLastPageId; i++) {
|
||||||
|
HWND hPage;
|
||||||
|
// hPage = CreateDialog(hModule, MAKEINTRESOURCE(i), hDlg, pPagesData->pDlgProc);
|
||||||
|
hPage = CreateDialogParam(hModule, MAKEINTRESOURCE(i), hDlg, pPagesData->pDlgProc, i);
|
||||||
|
#ifdef __GNUC__
|
||||||
|
SetParent(hPage, hDlg);
|
||||||
|
#endif
|
||||||
|
LoadString(hModule, i, szPageTitle, MAX_LOADSTRING);
|
||||||
|
memset(&item, 0, sizeof(TCITEM));
|
||||||
|
item.mask = TCIF_TEXT | TCIF_PARAM;
|
||||||
|
item.pszText = szPageTitle;
|
||||||
|
item.lParam = (LPARAM)hPage;
|
||||||
|
if (TabCtrl_InsertItem(hTabWnd, i - pPagesData->nFirstPageId, &item) == -1) {
|
||||||
|
assert(0);
|
||||||
|
}
|
||||||
|
//if (i == pPagesData->nFirstPageId) ShowWindow(hPage, SW_SHOW);
|
||||||
|
//GetClientRect(hPage, &rc);
|
||||||
|
GetWindowRect(hPage, &rc);
|
||||||
|
nWidth = max(nWidth, rc.right - rc.left);
|
||||||
|
nHeight = max(nHeight, rc.bottom - rc.top);
|
||||||
|
}
|
||||||
|
SetWindowPos(hTabWnd, NULL, 0, 0, nWidth + rc.left, nHeight/* + rc.top*/, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOZORDER);
|
||||||
|
//SetWindowPos(hTabWnd, NULL, rc.left, rc.top, nWidth, nHeight, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER);
|
||||||
|
InvalidateRect(hTabWnd, NULL, TRUE);
|
||||||
|
|
||||||
|
count = TabCtrl_GetItemCount(hTabWnd);
|
||||||
|
for (i = 0; i < count; i++) {
|
||||||
|
item.mask = TCIF_PARAM;
|
||||||
|
item.lParam = 0;
|
||||||
|
if (TabCtrl_GetItem(hTabWnd, i, &item)) {
|
||||||
|
if (item.lParam) {
|
||||||
|
//GetWindowRect((HWND)item.lParam, &rc);
|
||||||
|
//SetWindowPos((HWND)item.lParam, NULL, 0, 0, nWidth-10, nHeight-10, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOZORDER);
|
||||||
|
|
||||||
|
GetWindowRect((HWND)item.lParam, &rc);
|
||||||
|
SetWindowPos((HWND)item.lParam, NULL, rc.left, rc.top, nWidth, nHeight, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER);
|
||||||
|
// SetWindowPos((HWND)item.lParam, NULL, rc.left, rc.top + nTabWndHeight, nWidth-10, nHeight-10, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER);
|
||||||
|
|
||||||
|
//SetWindowPos((HWND)item.lParam, NULL, rc.left, rc.top, nWidth-10, nHeight-10, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER);
|
||||||
|
InvalidateRect((HWND)item.lParam, NULL, TRUE);
|
||||||
|
if (i == 0) ShowWindow((HWND)item.lParam, SW_SHOW);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#define BORDER_X 15
|
||||||
|
#define BORDER_Y 15
|
||||||
|
#define BUTTON_BAR_Y 70
|
||||||
|
if (nWidth && nHeight) {
|
||||||
|
nWidth += (BORDER_X * 3);
|
||||||
|
nHeight += ((BORDER_Y * 4) + BUTTON_BAR_Y);
|
||||||
|
MoveWindow(hDlg, 0, 0, nWidth, nHeight, TRUE);
|
||||||
|
// MoveWindow(hTabWnd, 0, 0, nWidth, nHeight, TRUE);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL OnCreate(HWND hDlg, LONG lData)
|
||||||
|
{
|
||||||
|
TCHAR buffer[50];
|
||||||
|
RECT rc;
|
||||||
|
HWND hTabWnd = GetDlgItem(hDlg, IDC_CPL_DIALOG_TAB);
|
||||||
|
|
||||||
|
//SendMessage(hDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(IDI_TASKMANAGER)));
|
||||||
|
|
||||||
|
// Get the minimum window sizes
|
||||||
|
GetWindowRect(hDlg, &rc);
|
||||||
|
nMinimumWidth = (rc.right - rc.left);
|
||||||
|
nMinimumHeight = (rc.bottom - rc.top);
|
||||||
|
|
||||||
|
// Create tab pages
|
||||||
|
if (lData >= 0 && lData < GetCountProc()) {
|
||||||
|
//HWND hTabWnd = GetDlgItem(hDlg, pPagesData->nTabCtrlId);
|
||||||
|
CreateTabPages(hDlg, &CPlAppletDlgPagesData[lData]);
|
||||||
|
}
|
||||||
|
LoadString(hModule, CPlAppletDlgPagesData[lData].nDlgTitleId, buffer, sizeof(buffer)/sizeof(TCHAR));
|
||||||
|
SetWindowText(hDlg, buffer);
|
||||||
|
|
||||||
|
TabCtrl_SetCurFocus/*Sel*/(hTabWnd, 0);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OnSize()
|
||||||
|
// This function handles all the sizing events for the application
|
||||||
|
// It re-sizes every window, and child window that needs re-sizing
|
||||||
|
static void OnSize(HWND hDlg, int cx, int cy, CPlAppletDlgPagesCfg* pPagesData)
|
||||||
|
{
|
||||||
|
int nXDifference;
|
||||||
|
int nYDifference;
|
||||||
|
RECT rc;
|
||||||
|
TCITEM item;
|
||||||
|
int i, nPageCount;
|
||||||
|
int nTabWndHeight = 0;
|
||||||
|
HWND hTabWnd = GetDlgItem(hDlg, IDC_CPL_DIALOG_TAB);
|
||||||
|
|
||||||
|
nXDifference = cx - nOldWidth;
|
||||||
|
nYDifference = cy - nOldHeight;
|
||||||
|
nOldWidth = cx;
|
||||||
|
nOldHeight = cy;
|
||||||
|
|
||||||
|
nPageCount = TabCtrl_GetItemCount(hTabWnd);
|
||||||
|
// for (i = pPagesData->nFirstPageId; i <= pPagesData->nLastPageId; i++) {
|
||||||
|
if (TabCtrl_GetItemRect(hTabWnd, 0, &rc)) {
|
||||||
|
nTabWndHeight = rc.bottom - rc.top;
|
||||||
|
}
|
||||||
|
for (i = 0; i < nPageCount; i++) {
|
||||||
|
// Resize the pages
|
||||||
|
item.mask = TCIF_PARAM;
|
||||||
|
if (TabCtrl_GetItem(hTabWnd, i, &item)) {
|
||||||
|
HWND hPage;
|
||||||
|
hPage = (HWND)item.lParam;
|
||||||
|
if (hPage) {
|
||||||
|
int width, height;
|
||||||
|
|
||||||
|
//GetWindowRect(hPage, &rc);
|
||||||
|
GetWindowRect(hTabWnd, &rc);
|
||||||
|
nTabWndHeight += 3;
|
||||||
|
//InflateRect(&rc, -2, -2);
|
||||||
|
|
||||||
|
width = rc.right - rc.left;
|
||||||
|
height = rc.bottom - rc.top;
|
||||||
|
|
||||||
|
height -= nTabWndHeight;
|
||||||
|
height -= 2;
|
||||||
|
width -= 3;
|
||||||
|
|
||||||
|
GetWindowRect(hDlg, &rc);
|
||||||
|
rc.top += nTabWndHeight;
|
||||||
|
rc.left += 1;
|
||||||
|
//rc.top += 3;
|
||||||
|
|
||||||
|
SetWindowPos(hPage, NULL, rc.left, rc.top, width, height, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static LRESULT OnNotify(HWND hDlg, WPARAM wParam, LPARAM lParam, CPlAppletDlgPagesCfg* pPagesData)
|
||||||
|
{
|
||||||
|
// int idctrl = (int)wParam;
|
||||||
|
HWND hTabWnd = GetDlgItem(hDlg, IDC_CPL_DIALOG_TAB);
|
||||||
|
LPNMHDR pnmh = (LPNMHDR)lParam;
|
||||||
|
if ((pnmh->hwndFrom == hTabWnd) && (pnmh->code == TCN_SELCHANGE)) {
|
||||||
|
// (pnmh->idFrom == IDD_CPL_POWER_DIALOG) &&
|
||||||
|
TCITEM item;
|
||||||
|
int i;
|
||||||
|
int nActiveTabPage = TabCtrl_GetCurSel(hTabWnd);
|
||||||
|
int nPageCount = TabCtrl_GetItemCount(hTabWnd);
|
||||||
|
for (i = 0; i < nPageCount; i++) {
|
||||||
|
item.mask = TCIF_PARAM;
|
||||||
|
if (TabCtrl_GetItem(hTabWnd, i, &item)) {
|
||||||
|
if ((HWND)item.lParam) {
|
||||||
|
if (i == nActiveTabPage) {
|
||||||
|
ShowWindow((HWND)item.lParam, SW_SHOW);
|
||||||
|
//BringWindowToTop((HWND)item.lParam);
|
||||||
|
//TabCtrl_SetCurFocus(hTabWnd, i);
|
||||||
|
} else {
|
||||||
|
ShowWindow((HWND)item.lParam, SW_HIDE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// assert(0);
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef struct tagCPlAppletInstanceData {
|
||||||
|
HWND hWnd;
|
||||||
|
LONG lData;
|
||||||
|
} CPlAppletInstanceData;
|
||||||
|
|
||||||
|
LRESULT CALLBACK CPlAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
CPlAppletInstanceData* pData = (CPlAppletInstanceData*)GetWindowLong(hDlg, DWL_USER);
|
||||||
|
LONG nThisApp = 0;
|
||||||
|
if (pData) nThisApp = pData->lData;
|
||||||
|
|
||||||
|
switch (message) {
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
// nThisApp = (LONG)lParam;
|
||||||
|
pData = (CPlAppletInstanceData*)lParam;
|
||||||
|
SetWindowLong(hDlg, DWL_USER, (LONG)pData);
|
||||||
|
nThisApp = pData->lData;
|
||||||
|
if (OnCreate(hDlg, nThisApp)) {
|
||||||
|
OnSize(hDlg, 0, 0, &CPlAppletDlgPagesData[nThisApp]);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
case WM_DESTROY:
|
||||||
|
if (pData && (pData->hWnd == hDlg)) {
|
||||||
|
DestroyWindow(pData->hWnd);
|
||||||
|
pData->hWnd = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_COMMAND:
|
||||||
|
// Handle the button clicks
|
||||||
|
switch (LOWORD(wParam)) {
|
||||||
|
// case IDC_ENDTASK:
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
case IDOK:
|
||||||
|
case IDCANCEL:
|
||||||
|
if (pData && (pData->hWnd == hDlg)) {
|
||||||
|
DestroyWindow(pData->hWnd);
|
||||||
|
pData->hWnd = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_SIZE:
|
||||||
|
if (wParam == SIZE_MINIMIZED)
|
||||||
|
return 0;
|
||||||
|
OnSize(hDlg, LOWORD(lParam), HIWORD(lParam), &CPlAppletDlgPagesData[nThisApp]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_NOTIFY:
|
||||||
|
return OnNotify(hDlg, wParam, lParam, &CPlAppletDlgPagesData[nThisApp]);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
42
rosapps/ctlpanel/rospower/system.h
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* ReactOS Control Panel Applet
|
||||||
|
*
|
||||||
|
* system.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Dickenson <robd@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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __SYSTEM_H__
|
||||||
|
#define __SYSTEM_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if _MSC_VER > 1000
|
||||||
|
#pragma once
|
||||||
|
#endif // _MSC_VER > 1000
|
||||||
|
|
||||||
|
|
||||||
|
LRESULT CALLBACK CPlAppletDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __SYSTEM_H__
|
82
rosapps/ctlpanel/rospower/trace.c
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Diagnostic Trace
|
||||||
|
//
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include "windows.h"
|
||||||
|
#include "trace.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
//#include <windows.h>
|
||||||
|
//#include <assert.h>
|
||||||
|
//WINBASEAPI VOID WINAPI DebugBreak(VOID);
|
||||||
|
//WINBASEAPI VOID WINAPI OutputDebugStringA(LPCSTR lpOutputString);
|
||||||
|
//WINBASEAPI VOID WINAPI OutputDebugStringW(LPCWSTR lpOutputString);
|
||||||
|
//void __stdcall DebugBreak(void);
|
||||||
|
//void __stdcall OutputDebugStringA(char* lpOutputString);
|
||||||
|
//void __stdcall OutputDebugStringW(wchar_t* lpOutputString);
|
||||||
|
#ifdef UNICODE
|
||||||
|
#define OutputDebugString OutputDebugStringW
|
||||||
|
#else
|
||||||
|
#define OutputDebugString OutputDebugStringA
|
||||||
|
#endif // !UNICODE
|
||||||
|
|
||||||
|
#else
|
||||||
|
#include "hardware.h"
|
||||||
|
#endif // WIN32
|
||||||
|
|
||||||
|
|
||||||
|
#undef THIS_FILE
|
||||||
|
static char THIS_FILE[] = __FILE__;
|
||||||
|
|
||||||
|
void _DebugBreak(void)
|
||||||
|
{
|
||||||
|
DebugBreak();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Trace(TCHAR* lpszFormat, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
int nBuf;
|
||||||
|
TCHAR szBuffer[512];
|
||||||
|
|
||||||
|
va_start(args, lpszFormat);
|
||||||
|
// nBuf = vsprintf(szBuffer, lpszFormat, args);
|
||||||
|
// nBuf = _vsntprintf(szBuffer, _countof(szBuffer), lpszFormat, args);
|
||||||
|
#ifdef _UNICODE
|
||||||
|
nBuf = _vsnwprintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), lpszFormat, args);
|
||||||
|
#else
|
||||||
|
nBuf = _vsnprintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), lpszFormat, args);
|
||||||
|
#endif
|
||||||
|
OutputDebugString(szBuffer);
|
||||||
|
// was there an error? was the expanded string too long?
|
||||||
|
// ASSERT(nBuf >= 0);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Assert(void* assert, TCHAR* file, int line, void* msg)
|
||||||
|
{
|
||||||
|
if (msg == NULL) {
|
||||||
|
printf("ASSERT -- %s occured on line %u of file %s.\n",
|
||||||
|
assert, line, file);
|
||||||
|
} else {
|
||||||
|
printf("ASSERT -- %s occured on line %u of file %s: Message = %s.\n",
|
||||||
|
assert, line, file, msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
//inline void Trace(TCHAR* lpszFormat, ...) { };
|
||||||
|
//inline void Assert(void* assert, TCHAR* file, int line, void* msg) { };
|
||||||
|
void Trace(TCHAR* lpszFormat, ...) { };
|
||||||
|
void Assert(void* assert, TCHAR* file, int line, void* msg) { };
|
||||||
|
|
||||||
|
#endif //_DEBUG
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
72
rosapps/ctlpanel/rospower/trace.h
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
#ifndef __TRACE_H__
|
||||||
|
#define __TRACE_H__
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// BreakPoint() macro.
|
||||||
|
//=============================================================================
|
||||||
|
|
||||||
|
#ifdef _X86_
|
||||||
|
#define BreakPoint() _asm { int 3h }
|
||||||
|
#else
|
||||||
|
#define BreakPoint() _DebugBreak()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// MACRO: ASSERT()
|
||||||
|
//=============================================================================
|
||||||
|
|
||||||
|
#ifndef ASSERT
|
||||||
|
#define ASSERT(exp) \
|
||||||
|
{ \
|
||||||
|
if ( !(exp) ) \
|
||||||
|
{ \
|
||||||
|
Assert(#exp, __FILE__, __LINE__, NULL); \
|
||||||
|
BreakPoint(); \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
|
||||||
|
#define ASSERTMSG(exp, msg) \
|
||||||
|
{ \
|
||||||
|
if ( !(exp) ) \
|
||||||
|
{ \
|
||||||
|
Assert(#exp, __FILE__, __LINE__, msg); \
|
||||||
|
BreakPoint(); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// MACRO: TRACE()
|
||||||
|
//=============================================================================
|
||||||
|
|
||||||
|
void Assert(void* assert, TCHAR* file, int line, void* msg);
|
||||||
|
void Trace(TCHAR* lpszFormat, ...);
|
||||||
|
void Trace1(int code, TCHAR* lpszFormat, ...);
|
||||||
|
|
||||||
|
#define TRACE Trace
|
||||||
|
#define TRACE0 Trace
|
||||||
|
|
||||||
|
#else // _DEBUG
|
||||||
|
|
||||||
|
#ifndef ASSERT
|
||||||
|
#define ASSERT(exp)
|
||||||
|
#define ASSERTMSG(exp, msg)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//#define TRACE0 TRACE
|
||||||
|
//#define TRACE1 TRACE
|
||||||
|
|
||||||
|
void Assert(void* assert, TCHAR* file, int line, void* msg);
|
||||||
|
void Trace(TCHAR* lpszFormat, ...);
|
||||||
|
|
||||||
|
#define TRACE 0 ? (void)0 : Trace
|
||||||
|
|
||||||
|
|
||||||
|
#endif // !_DEBUG
|
||||||
|
|
||||||
|
#endif // __TRACE_H__
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|