ToolBar();
~ToolBar();
getHandle();
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@89
3789f03b-4d11-0410-bbf8-
ca57d06f2519
// -=- 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());
+}
+
// -=- 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