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/PollControls.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
// PollControls.h: interface for the PollControls class.
21
22
23
#ifndef POLLCONTROLS_H__
24
#define POLLCONTROLS_H__
25
26
#pragma once
27
28
#include "resource.h"
29
#include "vncServer.h"
30
31
class PollControls
32
{
33
public:
34
PollControls(HWND hwnd, vncServer *server);
35
void Validate();
36
void Apply();
37
38
private:
39
inline void Enable(int id, BOOL enable) {
40
EnableWindow(GetDlgItem(m_hwnd, id), enable);
41
}
42
inline void SetChecked(int id, BOOL checked) {
43
SendDlgItemMessage(m_hwnd, id, BM_SETCHECK, checked, 0);
44
}
45
inline BOOL IsChecked(int id) {
46
return (SendDlgItemMessage(m_hwnd, id, BM_GETCHECK, 0, 0) == BST_CHECKED);
47
}
48
49
HWND m_hwnd;
50
vncServer *m_server;
51
};
52
53
#endif
54
55