xref: /reactos/dll/cpl/liccpa/liccpa.c (revision 23373acb)
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 "liccpa.h"
14 
15 HINSTANCE hApplet = 0;
16 
17 
18 INT_PTR CALLBACK
19 DlgMainProc(HWND hwndDlg,
20             UINT uMsg,
21             WPARAM wParam,
22             LPARAM lParam)
23 {
24 //    TCHAR szString[256];
25 
26     switch (uMsg)
27     {
28         case WM_INITDIALOG:
29             return TRUE;
30 
31         case WM_COMMAND:
32             switch (HIWORD(wParam))
33             {
34                 case LBN_DBLCLK:
35                     switch (LOWORD(wParam))
36                     {
37                     }
38                     break;
39 
40                 default:
41                     switch (LOWORD(wParam))
42                     {
43                         case IDC_OK:
44                             break;
45 
46                         case IDC_CANCEL:
47                             EndDialog(hwndDlg, IDC_CANCEL);
48                             break;
49                     }
50                     break;
51             }
52             break;
53 
54         case WM_CLOSE:
55             EndDialog(hwndDlg, IDC_CANCEL);
56             return TRUE;
57     }
58 
59     return FALSE;
60 }
61 
62 
63 LONG CALLBACK
64 CPlApplet(HWND hwndCPl,
65           UINT uMsg,
66           LPARAM lParam1,
67           LPARAM lParam2)
68 {
69     switch (uMsg)
70     {
71         case CPL_INIT:
72             return TRUE;
73 
74         case CPL_GETCOUNT:
75             return 1;
76 
77         case CPL_INQUIRE:
78             {
79                 CPLINFO *CPlInfo = (CPLINFO*)lParam2;
80                 CPlInfo->lData = 0;
81                 CPlInfo->idIcon = IDC_CPLICON_1;
82                 CPlInfo->idName = IDS_CPLNAME_1;
83                 CPlInfo->idInfo = IDS_CPLDESCRIPTION_1;
84             }
85             break;
86 
87         case CPL_DBLCLK:
88             DialogBox(hApplet, MAKEINTRESOURCE(IDD_PROPPAGE1), NULL, DlgMainProc);
89             break;
90     }
91 
92     return FALSE;
93 }
94 
95 
96 BOOL WINAPI
97 DllMain(HINSTANCE hinstDLL,
98         DWORD dwReason,
99         LPVOID lpvReserved)
100 {
101     switch (dwReason)
102     {
103         case DLL_PROCESS_ATTACH:
104         case DLL_THREAD_ATTACH:
105             hApplet = hinstDLL;
106             break;
107     }
108 
109     return TRUE;
110 }
111