b80210d9832ed99e68e9f91eae4b088b2f008ee4
[reactos.git] / reactos / base / applications / rapps / installdlg.cpp
1 /*
2 * PROJECT: ReactOS Applications Manager
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: base/applications/rapps/installdlg.cpp
5 * PURPOSE: "Download and Install" Dialog
6 * PROGRAMMERS: Dmitry Chapyshev (dmitry@reactos.org)
7 */
8 #include "defines.h"
9
10 #include "dialogs.h"
11 #include "available.h"
12
13 static PAPPLICATION_INFO AppInfo;
14
15 static
16 INT_PTR CALLBACK
17 InstallDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
18 {
19 switch (Msg)
20 {
21 case WM_INITDIALOG:
22 {
23 }
24 break;
25
26 case WM_COMMAND:
27 {
28 switch (LOWORD(wParam))
29 {
30 case IDOK:
31 case IDCANCEL:
32 EndDialog(hDlg, LOWORD(wParam));
33 break;
34 }
35 }
36 break;
37 }
38
39 return FALSE;
40 }
41
42 BOOL
43 InstallApplication(INT Index)
44 {
45 if (!IS_AVAILABLE_ENUM(SelectedEnumType))
46 return FALSE;
47
48 AppInfo = (PAPPLICATION_INFO) ListViewGetlParam(Index);
49 if (!AppInfo) return FALSE;
50
51 DialogBoxW(hInst,
52 MAKEINTRESOURCEW(IDD_INSTALL_DIALOG),
53 hMainWnd,
54 InstallDlgProc);
55
56 return TRUE;
57 }