Sync to trunk revision 63857.
[reactos.git] / dll / cpl / liccpa / liccpa.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS License Manager
4 * FILE: dll/cpl/liccpa/liccpa.c
5 * PURPOSE: License Manager GUI
6 *
7 * PROGRAMMERS: Steven Edwards (steven_ed4153@yahoo.com)
8 *
9 * NOTES:
10 * This application does almost nothing and its really good at it.
11 */
12
13 #include <windows.h>
14 #include <commctrl.h>
15 #include <cpl.h>
16
17 #include "resource.h"
18 #include "liccpa.h"
19
20 HINSTANCE hApplet = 0;
21
22
23 INT_PTR CALLBACK
24 DlgMainProc(HWND hwndDlg,
25 UINT uMsg,
26 WPARAM wParam,
27 LPARAM lParam)
28 {
29 TCHAR szString[256];
30
31 switch (uMsg)
32 {
33 case WM_INITDIALOG:
34 break;
35
36 case WM_COMMAND:
37 switch (HIWORD(wParam))
38 {
39 case LBN_DBLCLK:
40 switch (LOWORD(wParam))
41 {
42 }
43 break;
44
45 default:
46 switch (LOWORD(wParam))
47 {
48 case IDC_OK:
49 break;
50
51 case IDC_CANCEL:
52 EndDialog(hwndDlg, IDC_CANCEL);
53 break;
54 }
55 break;
56 }
57 break;
58
59 case WM_CLOSE:
60 EndDialog(hwndDlg, IDC_CANCEL);
61 return TRUE;
62 }
63
64 return FALSE;
65 }
66
67
68 LONG CALLBACK
69 CPlApplet(HWND hwndCPl,
70 UINT uMsg,
71 LPARAM lParam1,
72 LPARAM lParam2)
73 {
74 switch (uMsg)
75 {
76 case CPL_INIT:
77 return TRUE;
78
79 case CPL_GETCOUNT:
80 return 1;
81
82 case CPL_INQUIRE:
83 {
84 CPLINFO *CPlInfo = (CPLINFO*)lParam2;
85 CPlInfo->lData = 0;
86 CPlInfo->idIcon = IDC_CPLICON_1;
87 CPlInfo->idName = IDS_CPLNAME_1;
88 CPlInfo->idInfo = IDS_CPLDESCRIPTION_1;
89 }
90 break;
91
92 case CPL_DBLCLK:
93 DialogBox(hApplet, MAKEINTRESOURCE(IDD_PROPPAGE1), NULL, DlgMainProc);
94 break;
95 }
96
97 return FALSE;
98 }
99
100
101 BOOL WINAPI
102 DllMain(HINSTANCE hinstDLL,
103 DWORD dwReason,
104 LPVOID lpvReserved)
105 {
106 switch (dwReason)
107 {
108 case DLL_PROCESS_ATTACH:
109 case DLL_THREAD_ATTACH:
110 hApplet = hinstDLL;
111 break;
112 }
113
114 return TRUE;
115 }