2 * Bacula File daemon Status Dialog box
4 * Inspired from the VNC code by ATT.
6 * Copyright (2000) Kern E. Sibbald
10 Copyright (C) 2000-2003 Kern Sibbald and John Walker
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License
14 as published by the Free Software Foundation; either version 2
15 of the License, or (at your option) any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 #include "winbacula.h"
30 extern void FillStatusBox(HWND hwnd, int id_list);
32 bacStatus::bacStatus()
37 bacStatus::~bacStatus()
42 /* Dialog box handling functions */
44 bacStatus::Show(BOOL show)
46 if (show && !visible) {
47 DialogBoxParam(hAppInstance, MAKEINTRESOURCE(IDD_STATUS), NULL,
48 (DLGPROC)DialogProc, (LONG)this);
53 bacStatus::DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
55 /* Get class pointer from user data */
56 bacStatus *_this = (bacStatus *)GetWindowLong(hwnd, GWL_USERDATA);
60 /* Set class pointer in user data */
61 SetWindowLong(hwnd, GWL_USERDATA, lParam);
62 _this = (bacStatus *)lParam;
65 SetForegroundWindow(hwnd);
67 /* Update every 5 seconds */
68 SetTimer(hwnd, 1, 5000, NULL);
69 _this->visible = TRUE;
70 FillStatusBox(hwnd, IDC_LIST);
74 FillStatusBox(hwnd, IDC_LIST);
78 switch (LOWORD(wParam)) {
82 EndDialog(hwnd, TRUE);
83 _this->visible = FALSE;
90 EndDialog(hwnd, FALSE);
91 _this->visible = FALSE;