Dedicated to Alex.
I give to you "The ReactOS License Manager"
No its just a dummy dialog I wrote to learn how to make
Control Panel Applets. Please don't implement this.
Added: trunk/reactos/lib/cpl/liccpa/
Added: trunk/reactos/lib/cpl/liccpa/Makefile
Added: trunk/reactos/lib/cpl/liccpa/liccpa.c
Added: trunk/reactos/lib/cpl/liccpa/liccpa.def
Added: trunk/reactos/lib/cpl/liccpa/liccpa.h
Added: trunk/reactos/lib/cpl/liccpa/liccpa.rc
Added: trunk/reactos/lib/cpl/liccpa/resource.h
Added: trunk/reactos/lib/cpl/liccpa/resources/
Added: trunk/reactos/lib/cpl/liccpa/resources/cpl_icon1.ico
_____
Added: trunk/reactos/lib/cpl/liccpa/Makefile
--- trunk/reactos/lib/cpl/liccpa/Makefile 2005-03-17 18:51:20 UTC
(rev 14162)
+++ trunk/reactos/lib/cpl/liccpa/Makefile 2005-03-17 19:03:55 UTC
(rev 14163)
@@ -0,0 +1,49 @@
+# $Id: Makefile 12852 2005-01-06 13:58:04Z mf $
+
+PATH_TO_TOP = ../../..
+
+TARGET_TYPE = dynlink
+
+TARGET_EXTENSION = .cpl
+
+TARGET_NAME = liccpa
+
+TARGET_INSTALLDIR = system32
+
+TARGET_BASE = 0x75970000
+
+TARGET_CFLAGS = \
+ -D_WIN32_IE=0x0600 \
+ -D_WIN32_WINNT=0x0501 \
+ -D__USE_W32API \
+ -I./include \
+ -DUNICODE \
+ -D_UNICODE \
+ -D__REACTOS__ \
+ -Wall \
+ -fno-builtin
+
+TARGET_LFLAGS = -nostartfiles
+
+TARGET_SDKLIBS = kernel32.a user32.a comctl32.a
+
+TARGET_GCCLIBS = gcc
+
+TARGET_PCH =
+
+TARGET_CLEAN =
+
+TARGET_OBJECTS = liccpa.o
+
+DEP_OBJECTS = $(TARGET_OBJECTS)
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
+
+include $(TOOLS_PATH)/depend.mk
+
+%/TAGS:
+ etags -o $(@D)/TAGS $((a)D)/\*.c
+
+etags: ./TAGS
_____
Added: trunk/reactos/lib/cpl/liccpa/liccpa.c
--- trunk/reactos/lib/cpl/liccpa/liccpa.c 2005-03-17 18:51:20 UTC
(rev 14162)
+++ trunk/reactos/lib/cpl/liccpa/liccpa.c 2005-03-17 19:03:55 UTC
(rev 14163)
@@ -0,0 +1,141 @@
+/* $Id: appearance.c 13406 2005-02-04 20:39:10Z weiden $
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS License Manager
+ * FILE: lib/cpl/liccpa
+ * PURPOSE: License Manager GUI
+ *
+ * PROGRAMMERS: Steven Edwards (steven_ed4153(a)yahoo.com)
+ *
+ * NOTES:
+ * This application does almost nothing and its really good at it.
+ */
+
+#include <windows.h>
+#include <commctrl.h>
+#include <cpl.h>
+
+#include "resource.h"
+#include "liccpa.h"
+
+HINSTANCE hApplet = 0;
+
+INT_PTR CALLBACK
+DlgMainProc(
+ HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam
+)
+{
+ TCHAR szString[256];
+ HWND hPlacementCombo;
+
+ switch(uMsg)
+ {
+ case WM_INITDIALOG:
+ hPlacementCombo = GetDlgItem(hwndDlg, IDC_LICENSE);
+ LoadString(hApplet, IDS_REACTOS, szString, sizeof(szString) /
sizeof(TCHAR));
+ SendMessage(hPlacementCombo, CB_INSERTSTRING, 0,
(LPARAM)szString);
+ break;
+
+ case WM_COMMAND:
+ {
+ switch(HIWORD(wParam))
+ {
+ case LBN_DBLCLK:
+ {
+ switch(LOWORD(wParam))
+ {
+ }
+ break;
+ }
+ default:
+ {
+ switch(LOWORD(wParam))
+ {
+ case IDC_OK:
+ {
+ break;
+ }
+ case IDC_CANCEL:
+ {
+ EndDialog(hwndDlg, IDC_CANCEL);
+ break;
+ }
+ }
+ break;
+ }
+ }
+ break;
+ }
+
+
+
+
+
+
+
+
+
+
+ case WM_CLOSE:
+ {
+ EndDialog(hwndDlg, IDC_CANCEL);
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+LONG CALLBACK
+CPlApplet(
+ HWND hwndCPl,
+ UINT uMsg,
+ LPARAM lParam1,
+ LPARAM lParam2)
+{
+ switch(uMsg)
+ {
+ case CPL_INIT:
+ {
+ return TRUE;
+ }
+ case CPL_GETCOUNT:
+ {
+ return 1;
+ }
+ case CPL_INQUIRE:
+ {
+ CPLINFO *CPlInfo = (CPLINFO*)lParam2;
+ CPlInfo->lData = 0;
+ CPlInfo->idIcon = IDC_CPLICON_1;
+ CPlInfo->idName = IDS_CPLNAME_1;
+ CPlInfo->idInfo = IDS_CPLDESCRIPTION_1;
+ break;
+ }
+ case CPL_DBLCLK:
+ {
+ DialogBoxParam(hApplet, MAKEINTRESOURCE(IDD_PROPPAGE1), hwndCPl,
DlgMainProc, WM_INITDIALOG);
+ break;
+ }
+ }
+ return FALSE;
+}
+
+
+BOOL STDCALL
+DllMain(
+ HINSTANCE hinstDLL,
+ DWORD dwReason,
+ LPVOID lpvReserved)
+{
+ switch(dwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ case DLL_THREAD_ATTACH:
+ hApplet = hinstDLL;
+ break;
+ }
+ return TRUE;
+}
_____
Added: trunk/reactos/lib/cpl/liccpa/liccpa.def
--- trunk/reactos/lib/cpl/liccpa/liccpa.def 2005-03-17 18:51:20 UTC
(rev 14162)
+++ trunk/reactos/lib/cpl/liccpa/liccpa.def 2005-03-17 19:03:55 UTC
(rev 14163)
@@ -0,0 +1,6 @@
+LIBRARY liccpa.cpl
+
+EXPORTS
+CPlApplet@16
+
+; EOF
_____
Added: trunk/reactos/lib/cpl/liccpa/liccpa.h
--- trunk/reactos/lib/cpl/liccpa/liccpa.h 2005-03-17 18:51:20 UTC
(rev 14162)
+++ trunk/reactos/lib/cpl/liccpa/liccpa.h 2005-03-17 19:03:55 UTC
(rev 14163)
@@ -0,0 +1,16 @@
+#ifndef __CPL_SAMPLE_H
+#define __CPL_SAMPLE_H
+
+typedef struct
+{
+ int idIcon;
+ int idName;
+ int idDescription;
+ APPLET_PROC AppletProc;
+} APPLET, *PAPPLET;
+
+extern HINSTANCE hApplet;
+
+#endif /* __CPL_SAMPLE_H */
+
+/* EOF */
_____
Added: trunk/reactos/lib/cpl/liccpa/liccpa.rc
--- trunk/reactos/lib/cpl/liccpa/liccpa.rc 2005-03-17 18:51:20 UTC
(rev 14162)
+++ trunk/reactos/lib/cpl/liccpa/liccpa.rc 2005-03-17 19:03:55 UTC
(rev 14163)
@@ -0,0 +1,40 @@
+/* $Id: cplsample.rc 12852 2005-01-06 13:58:04Z mf $ */
+
+#include <defines.h>
+#include "resource.h"
+
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Sample Control Panel\0"
+#define REACTOS_STR_INTERNAL_NAME "cplsample\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "cplsample.cpl\0"
+#include <reactos/version.rc>
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+
+IDC_CPLICON_1 ICON "resources/cpl_icon1.ico"
+
+IDD_PROPPAGE1 DIALOG DISCARDABLE 20, 40, 315, 104
+STYLE DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE |
WS_SYSMENU
+CAPTION "Chose Licensing Mode"
+FONT 8, "Helv"
+BEGIN
+ CONTROL "Client Licensing Mode", 100,
"BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 4, 4, 239, 94
+ CONTROL "Per Device or Per User", 102,
"BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 79, 107, 12
+ CONTROL "Per Server. Number of concurrent connections:", 103,
"BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 38, 163, 9
+ CONTROL "Product:", 105,
"STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 13, 20, 31, 8
+ CONTROL "", 106,
"COMBOBOX", CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP, 49, 20, 171, 12
+ CONTROL "OK", 107,
"BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 261, 7,
47, 14
+ CONTROL "Cancel", 108,
"BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 27,
45, 14
+ CONTROL "Help", 109,
"BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 48,
47, 14
+ CONTROL "Replication...", 110,
"BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 68,
46, 14
+ CONTROL "Add Licenses", 111,
"BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 30, 56,
65, 15
+ CONTROL "Remove Licenses", 112,
"BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 112, 56,
61, 16
+ CONTROL "", 114,
"EDIT", ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER |
WS_TABSTOP, 187, 39, 32, 12
+END
+
+STRINGTABLE
+BEGIN
+ IDS_CPLNAME_1 "License Manager"
+ IDS_CPLDESCRIPTION_1 "License Manager"
+ IDS_REACTOS "ReactOS - FreeSoftware"
+END
_____
Added: trunk/reactos/lib/cpl/liccpa/resource.h
--- trunk/reactos/lib/cpl/liccpa/resource.h 2005-03-17 18:51:20 UTC
(rev 14162)
+++ trunk/reactos/lib/cpl/liccpa/resource.h 2005-03-17 19:03:55 UTC
(rev 14163)
@@ -0,0 +1,18 @@
+#ifndef __CPL_RESOURCE_H
+#define __CPL_RESOURCE_H
+
+/* ids */
+
+#define IDC_CPLICON_1 1
+#define IDD_PROPPAGE1 100
+#define IDS_CPLNAME_1 1001
+#define IDS_REACTOS 1002
+#define IDS_CPLDESCRIPTION_1 2001
+
+#define IDC_LICENSE 106
+#define IDC_OK 107
+#define IDC_CANCEL 108
+
+#endif /* __CPL_RESOURCE_H */
+
+/* EOF */
_____
Added: trunk/reactos/lib/cpl/liccpa/resources/cpl_icon1.ico
(Binary files differ)
Property changes on:
trunk/reactos/lib/cpl/liccpa/resources/cpl_icon1.ico
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream