Fix indentation, no code changes.

svn path=/trunk/; revision=26615
This commit is contained in:
Eric Kohl 2007-05-01 13:55:11 +00:00
parent 4e78c81b3c
commit 219c4c8eb7
7 changed files with 229 additions and 248 deletions

View file

@ -20,11 +20,6 @@
#define NUM_APPLETS (1) #define NUM_APPLETS (1)
LONG CALLBACK SystemApplet(VOID); LONG CALLBACK SystemApplet(VOID);
INT_PTR CALLBACK DisplayPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK KeyboardPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK MousePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK SoundPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
HINSTANCE hApplet = 0; HINSTANCE hApplet = 0;
/* Applets */ /* Applets */
@ -33,7 +28,7 @@ APPLET Applets[NUM_APPLETS] =
{IDI_CPLACCESS, IDS_CPLSYSTEMNAME, IDS_CPLSYSTEMDESCRIPTION, SystemApplet} {IDI_CPLACCESS, IDS_CPLSYSTEMNAME, IDS_CPLSYSTEMDESCRIPTION, SystemApplet}
}; };
static void static VOID
InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc) InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc)
{ {
ZeroMemory(psp, sizeof(PROPSHEETPAGE)); ZeroMemory(psp, sizeof(PROPSHEETPAGE));
@ -67,36 +62,34 @@ SystemApplet(VOID)
psh.nStartPage = 0; psh.nStartPage = 0;
psh.ppsp = psp; psh.ppsp = psp;
InitPropSheetPage(&psp[0], IDD_PROPPAGEKEYBOARD, (DLGPROC) KeyboardPageProc); InitPropSheetPage(&psp[0], IDD_PROPPAGEKEYBOARD, (DLGPROC)KeyboardPageProc);
InitPropSheetPage(&psp[1], IDD_PROPPAGESOUND, (DLGPROC) SoundPageProc); InitPropSheetPage(&psp[1], IDD_PROPPAGESOUND, (DLGPROC)SoundPageProc);
InitPropSheetPage(&psp[2], IDD_PROPPAGEDISPLAY, (DLGPROC) DisplayPageProc); InitPropSheetPage(&psp[2], IDD_PROPPAGEDISPLAY, (DLGPROC)DisplayPageProc);
InitPropSheetPage(&psp[3], IDD_PROPPAGEMOUSE, (DLGPROC) MousePageProc); InitPropSheetPage(&psp[3], IDD_PROPPAGEMOUSE, (DLGPROC)MousePageProc);
InitPropSheetPage(&psp[4], IDD_PROPPAGEGENERAL, (DLGPROC) GeneralPageProc); InitPropSheetPage(&psp[4], IDD_PROPPAGEGENERAL, (DLGPROC)GeneralPageProc);
return (LONG)(PropertySheet(&psh) != -1); return (LONG)(PropertySheet(&psh) != -1);
} }
/* Control Panel Callback */ /* Control Panel Callback */
LONG CALLBACK LONG CALLBACK
CPlApplet( CPlApplet(HWND hwndCPl,
HWND hwndCPl,
UINT uMsg, UINT uMsg,
LPARAM lParam1, LPARAM lParam1,
LPARAM lParam2) LPARAM lParam2)
{ {
int i = (int)lParam1; INT i = (INT)lParam1;
UNREFERENCED_PARAMETER(hwndCPl); UNREFERENCED_PARAMETER(hwndCPl);
switch(uMsg) switch (uMsg)
{ {
case CPL_INIT: case CPL_INIT:
{
return TRUE; return TRUE;
}
case CPL_GETCOUNT: case CPL_GETCOUNT:
{
return NUM_APPLETS; return NUM_APPLETS;
}
case CPL_INQUIRE: case CPL_INQUIRE:
{ {
CPLINFO *CPlInfo = (CPLINFO*)lParam2; CPLINFO *CPlInfo = (CPLINFO*)lParam2;
@ -104,32 +97,33 @@ CPlApplet(
CPlInfo->idIcon = Applets[i].idIcon; CPlInfo->idIcon = Applets[i].idIcon;
CPlInfo->idName = Applets[i].idName; CPlInfo->idName = Applets[i].idName;
CPlInfo->idInfo = Applets[i].idDescription; CPlInfo->idInfo = Applets[i].idDescription;
break;
} }
break;
case CPL_DBLCLK: case CPL_DBLCLK:
{
Applets[i].AppletProc(); Applets[i].AppletProc();
break; break;
} }
}
return FALSE; return FALSE;
} }
BOOL STDCALL BOOL STDCALL
DllMain( DllMain(HINSTANCE hinstDLL,
HINSTANCE hinstDLL,
DWORD dwReason, DWORD dwReason,
LPVOID lpvReserved) LPVOID lpvReserved)
{ {
UNREFERENCED_PARAMETER(lpvReserved); UNREFERENCED_PARAMETER(lpvReserved);
switch(dwReason)
switch (dwReason)
{ {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH: case DLL_THREAD_ATTACH:
hApplet = hinstDLL; hApplet = hinstDLL;
break; break;
} }
return TRUE; return TRUE;
} }

View file

@ -3,11 +3,11 @@
typedef LONG (CALLBACK *APPLET_INITPROC)(VOID); typedef LONG (CALLBACK *APPLET_INITPROC)(VOID);
typedef struct typedef struct _APPLET
{ {
int idIcon; INT idIcon;
int idName; INT idName;
int idDescription; INT idDescription;
APPLET_INITPROC AppletProc; APPLET_INITPROC AppletProc;
} APPLET, *PAPPLET; } APPLET, *PAPPLET;
@ -15,6 +15,12 @@ extern HINSTANCE hApplet;
void ShowLastWin32Error(HWND hWndOwner); void ShowLastWin32Error(HWND hWndOwner);
INT_PTR CALLBACK DisplayPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK KeyboardPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK MousePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK SoundPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
#endif /* __CPL_SYSDM_H */ #endif /* __CPL_SYSDM_H */
/* EOF */ /* EOF */

View file

@ -15,35 +15,33 @@
/* Property page dialog callback */ /* Property page dialog callback */
INT_PTR CALLBACK INT_PTR CALLBACK
DisplayPageProc( DisplayPageProc(HWND hwndDlg,
HWND hwndDlg,
UINT uMsg, UINT uMsg,
WPARAM wParam, WPARAM wParam,
LPARAM lParam LPARAM lParam)
)
{ {
UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(hwndDlg); UNREFERENCED_PARAMETER(hwndDlg);
switch(uMsg)
switch (uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
break; break;
case WM_COMMAND: case WM_COMMAND:
{ switch (LOWORD(wParam))
switch(LOWORD(wParam))
{ {
case IDC_CONTRAST_BOX: case IDC_CONTRAST_BOX:
{
break; break;
}
case IDC_CONTRAST_BUTTON: case IDC_CONTRAST_BUTTON:
{
break; break;
}
default: default:
break; break;
} }
break;
} }
}
return FALSE; return FALSE;
} }

View file

@ -15,55 +15,48 @@
/* Property page dialog callback */ /* Property page dialog callback */
INT_PTR CALLBACK INT_PTR CALLBACK
GeneralPageProc( GeneralPageProc(HWND hwndDlg,
HWND hwndDlg,
UINT uMsg, UINT uMsg,
WPARAM wParam, WPARAM wParam,
LPARAM lParam LPARAM lParam)
)
{ {
UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(hwndDlg); UNREFERENCED_PARAMETER(hwndDlg);
switch(uMsg)
switch (uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
break; break;
case WM_COMMAND: case WM_COMMAND:
{ switch (LOWORD(wParam))
switch(LOWORD(wParam))
{ {
case IDC_RESET_BOX: case IDC_RESET_BOX:
{
break; break;
}
case IDC_NOTIFICATION_MESSAGE: case IDC_NOTIFICATION_MESSAGE:
{
break; break;
}
case IDC_NOTIFICATION_SOUND: case IDC_NOTIFICATION_SOUND:
{
break; break;
}
case IDC_SERIAL_BOX: case IDC_SERIAL_BOX:
{
break; break;
}
case IDC_SERIAL_BUTTON: case IDC_SERIAL_BUTTON:
{
break; break;
}
case IDC_ADMIN_LOGON_BOX: case IDC_ADMIN_LOGON_BOX:
{
break; break;
}
case IDC_ADMIN_USERS_BOX: case IDC_ADMIN_USERS_BOX:
{
break; break;
}
default: default:
break; break;
} }
break;
} }
}
return FALSE; return FALSE;
} }

View file

@ -25,22 +25,18 @@ typedef struct _GLOBAL_DATA
/* Property page dialog callback */ /* Property page dialog callback */
INT_PTR CALLBACK INT_PTR CALLBACK
StickyKeysDlgProc( StickyKeysDlgProc(HWND hwndDlg,
HWND hwndDlg,
UINT uMsg, UINT uMsg,
WPARAM wParam, WPARAM wParam,
LPARAM lParam LPARAM lParam)
)
{ {
UNREFERENCED_PARAMETER(lParam); switch (uMsg)
UNREFERENCED_PARAMETER(hwndDlg);
switch(uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
break; break;
case WM_COMMAND: case WM_COMMAND:
{ switch (LOWORD(wParam))
switch(LOWORD(wParam))
{ {
case IDOK: case IDOK:
EndDialog(hwndDlg, TRUE); EndDialog(hwndDlg, TRUE);
@ -53,8 +49,9 @@ StickyKeysDlgProc(
default: default:
break; break;
} }
break;
} }
}
return FALSE; return FALSE;
} }

View file

@ -15,35 +15,32 @@
/* Property page dialog callback */ /* Property page dialog callback */
INT_PTR CALLBACK INT_PTR CALLBACK
MousePageProc( MousePageProc(HWND hwndDlg,
HWND hwndDlg,
UINT uMsg, UINT uMsg,
WPARAM wParam, WPARAM wParam,
LPARAM lParam LPARAM lParam)
)
{ {
UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(hwndDlg); UNREFERENCED_PARAMETER(hwndDlg);
switch(uMsg)
switch (uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
break; break;
case WM_COMMAND: case WM_COMMAND:
{ switch (LOWORD(wParam))
switch(LOWORD(wParam))
{ {
case IDC_MOUSE_BOX: case IDC_MOUSE_BOX:
{
break; break;
}
case IDC_MOUSE_BUTTON: case IDC_MOUSE_BUTTON:
{
break; break;
}
default: default:
break; break;
} }
break;
} }
}
return FALSE; return FALSE;
} }

View file

@ -15,39 +15,35 @@
/* Property page dialog callback */ /* Property page dialog callback */
INT_PTR CALLBACK INT_PTR CALLBACK
SoundPageProc( SoundPageProc(HWND hwndDlg,
HWND hwndDlg,
UINT uMsg, UINT uMsg,
WPARAM wParam, WPARAM wParam,
LPARAM lParam LPARAM lParam)
)
{ {
UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(hwndDlg); UNREFERENCED_PARAMETER(hwndDlg);
switch(uMsg)
switch (uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
break; break;
case WM_COMMAND: case WM_COMMAND:
{ switch (LOWORD(wParam))
switch(LOWORD(wParam))
{ {
case IDC_SENTRY_BOX: case IDC_SENTRY_BOX:
{
break; break;
}
case IDC_SENTRY_BUTTON: case IDC_SENTRY_BUTTON:
{
break; break;
}
case IDC_SSHOW_BOX: case IDC_SSHOW_BOX:
{
break; break;
}
default: default:
break; break;
} }
break;
} }
}
return FALSE; return FALSE;
} }