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.
28 #include "winbacula.h"
32 extern void FillStatusBox(HWND hwnd, int id_list);
34 bacStatus::bacStatus()
39 bacStatus::~bacStatus()
44 /* Dialog box handling functions */
46 bacStatus::Show(BOOL show)
48 if (show && !visible) {
49 DialogBoxParam(hAppInstance, MAKEINTRESOURCE(IDD_STATUS), NULL,
50 (DLGPROC)DialogProc, (LONG)this);
55 bacStatus::DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
57 /* Get class pointer from user data */
58 bacStatus *_this = (bacStatus *)GetWindowLong(hwnd, GWL_USERDATA);
62 /* Set class pointer in user data */
63 SetWindowLong(hwnd, GWL_USERDATA, lParam);
64 _this = (bacStatus *)lParam;
67 SetForegroundWindow(hwnd);
69 /* Update every 5 seconds */
70 SetTimer(hwnd, 1, 5000, NULL);
71 _this->visible = TRUE;
72 FillStatusBox(hwnd, IDC_LIST);
76 FillStatusBox(hwnd, IDC_LIST);
80 switch (LOWORD(wParam)) {
84 EndDialog(hwnd, TRUE);
85 _this->visible = FALSE;
92 EndDialog(hwnd, FALSE);
93 _this->visible = FALSE;