The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
// Windows/Control/CommandBar.h
  
#ifndef __WINDOWS_CONTROL_COMMANDBAR_H
#define __WINDOWS_CONTROL_COMMANDBAR_H

#ifdef UNDER_CE

#include "Windows/Window.h"

namespace NWindows {
namespace NControl {

class CCommandBar: public NWindows::CWindow
{
public:
  bool Create(HINSTANCE hInst, HWND hwndParent, int idCmdBar)
  {
    _window = ::CommandBar_Create(hInst, hwndParent, idCmdBar);
    return (_window != NULL);
  }
  
  // Macros
  // void Destroy() { CommandBar_Destroy(_window); }
  bool AddButtons(int iButton, UINT numButtons, LPTBBUTTON buttons) { return BOOLToBool(SendMessage(TB_ADDBUTTONS, (WPARAM)numButtons, (LPARAM)buttons)); }
  bool InsertButton(int iButton, LPTBBUTTON button) { return BOOLToBool(SendMessage(TB_INSERTBUTTON, (WPARAM)iButton, (LPARAM)button)); }
  BOOL AddToolTips(UINT numToolTips, LPTSTR toolTips) { return BOOLToBool(SendMessage(TB_SETTOOLTIPS, (WPARAM)numToolTips, (LPARAM)toolTips)); }
  void AutoSize() { SendMessage(TB_AUTOSIZE, 0, 0); }

  bool AddAdornments(DWORD dwFlags) { return BOOLToBool(::CommandBar_AddAdornments(_window, dwFlags, 0)); }
  int AddBitmap(HINSTANCE hInst, int idBitmap, int iNumImages, int iImageWidth, int iImageHeight) { return ::CommandBar_AddBitmap(_window, hInst, idBitmap, iNumImages, iImageWidth, iImageHeight); }
  bool DrawMenuBar(WORD iButton) { return BOOLToBool(::CommandBar_DrawMenuBar(_window, iButton)); }
  HMENU GetMenu(WORD iButton) { return ::CommandBar_GetMenu(_window, iButton); }
  int Height() { return CommandBar_Height(_window); }
  HWND InsertComboBox(HINSTANCE hInst, int iWidth, UINT dwStyle, WORD idComboBox, WORD iButton) { return ::CommandBar_InsertComboBox(_window, hInst, iWidth, dwStyle, idComboBox, iButton); }
  bool InsertMenubar(HINSTANCE hInst, WORD idMenu, WORD iButton) { return BOOLToBool(::CommandBar_InsertMenubar(_window, hInst, idMenu, iButton)); }
  bool InsertMenubarEx(HINSTANCE hInst, LPTSTR pszMenu, WORD iButton) { return BOOLToBool(::CommandBar_InsertMenubarEx(_window, hInst, pszMenu, iButton)); }
  bool Show(bool cmdShow) { return BOOLToBool(::CommandBar_Show(_window, BoolToBOOL(cmdShow))); }
  

  // CE 4.0
  void AlignAdornments() { CommandBar_AlignAdornments(_window); }
};

}}

#endif

#endif