Class ListViewControlCon is added in library rfb_win32.
Class ControlPanel is added in the project winvnc.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@298 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/winvnc/ControlPanel.cxx b/winvnc/ControlPanel.cxx
new file mode 100644
index 0000000..8162068
--- /dev/null
+++ b/winvnc/ControlPanel.cxx
@@ -0,0 +1,93 @@
+// ControlPanel.cxx: implementation of the ControlPanel class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include "ControlPanel.h"
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+//using namespace rfb_win32;
+using namespace winvnc;
+
+bool ControlPanel::showDialog()
+{
+ return Dialog::showDialog(MAKEINTRESOURCE(IDD_CONTROL_PANEL), NULL);
+}
+
+void ControlPanel::initDialog()
+{
+ TCHAR *ColumnsStrings[] = {
+ "IP address",
+ "Time connected",
+ "Status"
+ };
+ InitLVColumns(IDC_LIST_CONNECTIONS, handle, 120, 3, ColumnsStrings,
+ LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM,
+ LVS_EX_FULLROWSELECT, LVCFMT_LEFT);
+}
+
+bool ControlPanel::onCommand(int cmd)
+{
+ switch (cmd) {
+ case IDC_PROPERTIES:
+ SendMessage(m_hSTIcon, WM_COMMAND, ID_OPTIONS, 0);
+ return false;
+ case IDC_ADD_CLIENT:
+ SendMessage(m_hSTIcon, WM_COMMAND, ID_CONNECT, 0);
+ return false;
+ case IDC_KILL_SEL_CLIENT:
+ {
+
+ return false;
+ }
+ case IDC_KILL_ALL:
+ {
+ m_server->disconnectClients();
+ return false;
+ }
+ case IDC_DISABLE_CLIENTS:
+ {
+
+ return false;
+ }
+ }
+ return false;
+
+}
+
+void ControlPanel::UpdateListView()
+{
+
+}
+
+BOOL ControlPanel::dialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch (msg) {
+ case WM_INITDIALOG:
+ handle = hwnd;
+ initDialog();
+ return TRUE;
+ case WM_COMMAND:
+ switch (LOWORD(wParam)) {
+ case IDCANCEL:
+ handle = NULL;
+ EndDialog(hwnd, 0);
+ return TRUE;
+ default:
+ return onCommand(LOWORD(wParam));
+ }
+ }
+ return FALSE;
+}
+
+void ControlPanel::getSelectedConn(std::list<network::Socket*>* selsockets)
+{
+
+}
+
+ControlPanel::~ControlPanel()
+{
+
+}