Added button images operations to the ToolBar class:
addBitmap(), addSysBitmap(), setBitmapSize().
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@92 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/rfbplayer/ToolBar.h b/rfbplayer/ToolBar.h
index e08bd0b..aed4214 100644
--- a/rfbplayer/ToolBar.h
+++ b/rfbplayer/ToolBar.h
@@ -20,6 +20,7 @@
#include <windows.h>
#include <commctrl.h>
+#include <assert.h>
class ToolBar {
public:
@@ -31,6 +32,23 @@
// or FALSE otherwise.
bool create(int tbID, HWND parentHwnd, DWORD dwStyle = WS_CHILD | WS_VISIBLE | TBSTYLE_FLAT);
+ // -=- Button images operations
+
+ // addBitmap() adds one or more images from resources to the list of button
+ // images available for a toolbar. Returns the index of the first new image
+ // if successful, or -1 otherwise.
+ int addBitmap(int nButtons, UINT bitmapID);
+
+ // addSystemBitmap() adds the system-defined button bitmaps to the list
+ // of the toolbar button specifying by stdBitmapID. Returns the index of
+ // the first new image if successful, or -1 otherwise.
+ int addSystemBitmap(UINT stdBitmapID);
+
+ // setBitmapSize() sets the size of the bitmapped images to be added
+ // to a toolbar. It returns TRUE if successful, or FALSE otherwise.
+ // You must call it before addBitmap().
+ bool setBitmapSize(int width, int height);
+
// getHandle() returns handle to a toolbar window.
HWND getHandle() { return hwndToolBar; }