summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2005-01-10 08:32:56 +0000
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2005-01-10 08:32:56 +0000
commit38baa3a3916cce4225f8838b6871d8c96261d9b0 (patch)
tree066bc3eb6d63bf5e538ac3e3959e41e51fa794ed
parentff170ab8977961f0752ad2781e0c46a261f569e1 (diff)
downloadtigervnc-38baa3a3916cce4225f8838b6871d8c96261d9b0.tar.gz
tigervnc-38baa3a3916cce4225f8838b6871d8c96261d9b0.zip
Added new methods to ToolBar class:
ToolBar(); ~ToolBar(); getHandle(); git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@89 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r--rfbplayer/ToolBar.cxx16
-rw-r--r--rfbplayer/ToolBar.h16
2 files changed, 30 insertions, 2 deletions
diff --git a/rfbplayer/ToolBar.cxx b/rfbplayer/ToolBar.cxx
index c12d8a2a..a1b20d37 100644
--- a/rfbplayer/ToolBar.cxx
+++ b/rfbplayer/ToolBar.cxx
@@ -18,4 +18,18 @@
// -=- ToolBar control class.
-#include "ToolBar.h" \ No newline at end of file
+#include "ToolBar.h"
+
+ToolBar::ToolBar() : hwndToolBar(0), tbID(-1) {
+ INITCOMMONCONTROLSEX icex;
+
+ // Ensure that the common control DLL is loaded
+ icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
+ icex.dwICC = ICC_BAR_CLASSES;
+ InitCommonControlsEx(&icex);
+}
+
+ToolBar::~ToolBar() {
+ DestroyWindow(getHandle());
+}
+
diff --git a/rfbplayer/ToolBar.h b/rfbplayer/ToolBar.h
index 20c952e1..aa59533a 100644
--- a/rfbplayer/ToolBar.h
+++ b/rfbplayer/ToolBar.h
@@ -19,4 +19,18 @@
// -=- ToolBar.h
#include <windows.h>
-#include <commctrl.h> \ No newline at end of file
+#include <commctrl.h>
+
+class ToolBar {
+public:
+ ToolBar();
+ virtual ~ToolBar();
+
+ // getHandle() returns handle to a toolbar window.
+ HWND getHandle() { return hwndToolBar; }
+
+protected:
+ HWND hwndToolBar;
+ int tbID;
+
+}; \ No newline at end of file