metasploit-framework/external/source/vncdll/winvnc/PollControls.h

54 lines
1.5 KiB
C++

// Copyright (C) 2004 TightVNC Development Team. All Rights Reserved.
//
// TightVNC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
//
// TightVNC homepage on the Web: http://www.tightvnc.com/
// PollControls.h: interface for the PollControls class.
#ifndef POLLCONTROLS_H__
#define POLLCONTROLS_H__
#pragma once
#include "resource.h"
#include "vncServer.h"
class PollControls
{
public:
PollControls(HWND hwnd, vncServer *server);
void Validate();
void Apply();
private:
inline void Enable(int id, BOOL enable) {
EnableWindow(GetDlgItem(m_hwnd, id), enable);
}
inline void SetChecked(int id, BOOL checked) {
SendDlgItemMessage(m_hwnd, id, BM_SETCHECK, checked, 0);
}
inline BOOL IsChecked(int id) {
return (SendDlgItemMessage(m_hwnd, id, BM_GETCHECK, 0, 0) == BST_CHECKED);
}
HWND m_hwnd;
vncServer *m_server;
};
#endif