source: nscp/modules/SysTray/TrayIcon.h @ b5ef837

0.4.00.4.10.4.2stable
Last change on this file since b5ef837 was b5ef837, checked in by Michael Medin <michael@…>, 5 years ago

+ Added an internal log windows that displays log in realtime.

+ Fixed some issues with the dialog procs (should work smoother now, especially Termination)

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**************************************************************************
2*   Copyright (C) 2004-2007 by Michael Medin <michael@medin.name>         *
3*                                                                         *
4*   This code is part of NSClient++ - http://trac.nakednuns.org/nscp      *
5*                                                                         *
6*   This program is free software; you can redistribute it and/or modify  *
7*   it under the terms of the GNU General Public License as published by  *
8*   the Free Software Foundation; either version 2 of the License, or     *
9*   (at your option) any later version.                                   *
10*                                                                         *
11*   This program is distributed in the hope that it will be useful,       *
12*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
13*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
14*   GNU General Public License for more details.                          *
15*                                                                         *
16*   You should have received a copy of the GNU General Public License     *
17*   along with this program; if not, write to the                         *
18*   Free Software Foundation, Inc.,                                       *
19*   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
20***************************************************************************/
21#pragma once
22
23#include <thread.h>
24
25#define WM_ICON_NOTIFY  WM_USER+1
26#define WM_MY_CLOSE     WM_USER+2
27
28class IconWidget_ {
29public:
30        unsigned threadProc(LPVOID lpParameter);
31        void exitThread(void);
32
33private:
34        void createDialog(void);
35        void destroyDialog(void);
36
37private:
38        HWND hDlgWnd;
39
40};
41
42typedef Thread<IconWidget_> IconWidget;
43
44
45namespace TrayIcon
46{
47        INT_PTR CALLBACK DialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam);
48        INT_PTR CALLBACK InjectDialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam);
49        INT_PTR CALLBACK LogDialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam);
50       
51        void removeIcon(HWND hWnd);
52        void addIcon(HWND hWnd);
53}
Note: See TracBrowser for help on using the repository browser.