Constantin Kaplinsky | 729598c | 2006-05-25 05:12:25 +0000 | [diff] [blame^] | 1 | // ControlPanel.h: interface for the ControlPanel class. |
| 2 | // |
| 3 | ////////////////////////////////////////////////////////////////////// |
| 4 | |
| 5 | #ifndef AFX_CONTROLPANEL_H__ |
| 6 | #define AFX_CONTROLPANEL_H__ |
| 7 | |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | |
| 12 | #include <list> |
| 13 | #include <winvnc/resource.h> |
| 14 | #include <rfb_win32/Dialog.h> |
| 15 | #include <rfb_win32/ListViewControl.h> |
| 16 | #include <rfb_win32/Win32Util.h> |
| 17 | #include <rfb/ListConnInfo.h> |
| 18 | |
| 19 | namespace winvnc { |
| 20 | |
| 21 | class ControlPanel : rfb::win32::Dialog, rfb::win32::ListViewControl { |
| 22 | public: |
| 23 | ControlPanel(HWND hSTIcon) : Dialog(GetModuleHandle(0)), ListViewControl(){ |
| 24 | m_hSTIcon = hSTIcon; |
| 25 | stop_updating = false; |
| 26 | }; |
| 27 | virtual bool showDialog(); |
| 28 | virtual void initDialog(); |
| 29 | virtual bool onCommand(int cmd); |
| 30 | void UpdateListView(rfb::ListConnInfo* LCInfo); |
| 31 | HWND GetHandle() {return handle;}; |
| 32 | void SendCommand(DWORD command, int data); |
| 33 | ~ControlPanel(); |
| 34 | rfb::ListConnInfo ListConnStatus; |
| 35 | protected: |
| 36 | virtual BOOL dialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); |
| 37 | void getSelConnInfo(); |
| 38 | HWND m_hSTIcon; |
| 39 | rfb::ListConnInfo ListConn; |
| 40 | rfb::ListConnInfo ListSelConn; |
| 41 | bool stop_updating; |
| 42 | }; |
| 43 | }; |
| 44 | |
| 45 | #endif |