CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/vncdll/winvnc/AdministrationControls.h
Views: 11780
1
// Copyright (C) 2004 TightVNC Development Team. All Rights Reserved.
2
//
3
// TightVNC is free software; you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation; either version 2 of the License, or
6
// (at your option) any later version.
7
//
8
// This program is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
// GNU General Public License for more details.
12
//
13
// You should have received a copy of the GNU General Public License
14
// along with this program; if not, write to the Free Software
15
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16
// USA.
17
//
18
// TightVNC homepage on the Web: http://www.tightvnc.com/
19
20
// AdministrationControls.h: interface for the AdministrationControls class.
21
22
#ifndef _WINVNC_ADMINISTRATIONCONTROLS_H
23
#define _WINVNC_ADMINISTRATIONCONTROLS_H
24
#pragma once
25
26
#include "resource.h"
27
#include "vncServer.h"
28
29
class AdministrationControls
30
{
31
public:
32
AdministrationControls(HWND hwnd, vncServer * server);
33
void Validate();
34
void Apply();
35
void Init();
36
virtual ~AdministrationControls();
37
private:
38
inline void Enable(int id, BOOL enable) {
39
EnableWindow(GetDlgItem(m_hwnd, id), enable);
40
}
41
inline void SetChecked(int id, BOOL checked) {
42
SendDlgItemMessage(m_hwnd, id, BM_SETCHECK, checked, 0);
43
}
44
inline BOOL IsChecked(int id) {
45
return (SendDlgItemMessage(m_hwnd, id, BM_GETCHECK, 0, 0) == BST_CHECKED);
46
}
47
vncServer * m_server;
48
HWND m_hwnd;
49
};
50
51
#endif
52
53