mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 00:40:26 +08:00
[JOY] Use APPLET_PROC instead of a custom CPLAPPLET_PROC and simpify the code
This commit is contained in:
@@ -30,9 +30,8 @@
|
||||
|
||||
#define NUM_APPLETS (1)
|
||||
|
||||
LONG CALLBACK SystemApplet(VOID);
|
||||
LONG CALLBACK SystemApplet(HWND hwnd, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
|
||||
HINSTANCE hApplet = 0;
|
||||
HWND MainDlg;
|
||||
|
||||
/* Applets */
|
||||
|
||||
@@ -262,11 +261,15 @@ MainPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
/* First Applet */
|
||||
LONG CALLBACK
|
||||
SystemApplet(VOID)
|
||||
SystemApplet(HWND hwnd, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(uMsg);
|
||||
UNREFERENCED_PARAMETER(lParam1);
|
||||
UNREFERENCED_PARAMETER(lParam2);
|
||||
|
||||
DialogBox(hApplet,
|
||||
MAKEINTRESOURCE(IDD_PROPPAGEMAIN),
|
||||
MainDlg,
|
||||
hwnd,
|
||||
MainPageProc);
|
||||
|
||||
return (LONG)TRUE;
|
||||
@@ -299,10 +302,7 @@ CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
|
||||
break;
|
||||
|
||||
case CPL_DBLCLK:
|
||||
{
|
||||
MainDlg = hwndCPl;
|
||||
Applets[i].AppletProc();
|
||||
}
|
||||
Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,14 +12,12 @@
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
typedef LONG (CALLBACK *CPLAPPLET_PROC)(VOID);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int idIcon;
|
||||
int idName;
|
||||
int idDescription;
|
||||
CPLAPPLET_PROC AppletProc;
|
||||
APPLET_PROC AppletProc;
|
||||
} APPLET, *PAPPLET;
|
||||
|
||||
typedef struct
|
||||
@@ -28,7 +26,7 @@ typedef struct
|
||||
WCHAR szWorkingDirectory[MAX_PATH];
|
||||
WCHAR szDescription[MAX_PATH];
|
||||
WCHAR szLinkName[MAX_PATH];
|
||||
}CREATE_LINK_CONTEXT, *PCREATE_LINK_CONTEXT;
|
||||
} CREATE_LINK_CONTEXT, *PCREATE_LINK_CONTEXT;
|
||||
|
||||
|
||||
extern HINSTANCE hApplet;
|
||||
|
||||
Reference in New Issue
Block a user