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