2 Copyright (C) 2000-2003 Kern Sibbald and John Walker
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of
7 the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public
15 License along with this program; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
19 This file is patterned after the VNC Win32 code by ATT
21 Copyright (2000) Kern E. Sibbald
25 /* Code for the Events dialogue */
27 #include "winbacula.h"
28 #include "winevents.h"
30 extern "C" void FillEventsBox(HWND hwnd, int id_list);
32 bacEvents::bacEvents()
37 bacEvents::~bacEvents()
41 /* Show the dialogue box */
43 bacEvents::Show(BOOL show)
45 if (show && !visible) {
46 DialogBoxParam(hAppInstance, MAKEINTRESOURCE(IDD_EVENTS), NULL,
47 (DLGPROC)DialogProc, (LONG)this);
53 bacEvents::DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
55 /* The dialog-box this pointer is in USERDATA */
56 bacEvents *_this = (bacEvents *)GetWindowLong(hwnd, GWL_USERDATA);
60 /* Retrieve the Dialog box parameter */
61 SetWindowLong(hwnd, GWL_USERDATA, lParam);
62 _this = (bacEvents *)lParam;
65 SetForegroundWindow(hwnd);
66 _this->visible = TRUE;
70 switch (LOWORD(wParam)) {
73 EndDialog(hwnd, TRUE);
74 _this->visible = FALSE;
80 EndDialog(hwnd, FALSE);
81 _this->visible = FALSE;