From 38baa3a3916cce4225f8838b6871d8c96261d9b0 Mon Sep 17 00:00:00 2001 From: george82 Date: Mon, 10 Jan 2005 08:32:56 +0000 Subject: 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 --- rfbplayer/ToolBar.cxx | 16 +++++++++++++++- rfbplayer/ToolBar.h | 16 +++++++++++++++- 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 -#include \ No newline at end of file +#include + +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 -- cgit v1.2.3