]> source.dussan.org Git - tigervnc.git/commitdiff
Added new methods to ToolBar class:
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 10 Jan 2005 08:32:56 +0000 (08:32 +0000)
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 10 Jan 2005 08:32:56 +0000 (08:32 +0000)
ToolBar();
~ToolBar();
getHandle();

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@89 3789f03b-4d11-0410-bbf8-ca57d06f2519

rfbplayer/ToolBar.cxx
rfbplayer/ToolBar.h

index c12d8a2a86682c9797647169d318084de95495ee..a1b20d374b36e2dd30c0f8bc9e63c371d4aebe5f 100644 (file)
 
 // -=- 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());
+}
+
index 20c952e179badf7f249bd7172fa83d1d2a9325de..aa59533afb880cdaec1977c0869e4693fc8b117b 100644 (file)
 // -=- 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