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