Visual Application Components Abstraction



Vaca library is an experiment to wrap Win32 API, we do not encourage you to use Vaca in production environments. The API is likely to be changed in the future.

News - TN011 Deprecated — Monday, September 22, 2008

You have to know that Technical Note 11 (TN011) is completelly deprecated. The behavior of Widget::setLayout and Widget::setConstraint was modified in Vaca 0.0.7 but that Technical Note wasn't updated. See the documentation of Widget::setLayout for more information, and ignore TN011. Sorry for the inconvenience.

News - Vaca 0.0.7 — Saturday, September 20, 2008

New Vaca release with important changes in the API. Mainly the addition of SmartPtrs to make the management of GDI objects more easy. Changes:

  • More documentation (see Documentation section).
  • Added MenuPopup.
  • Added RefWrapper class and Ref() method to support references in Bind().
  • Added GraphicsPath.
  • Added HttpRequest class.
  • Added FontMetrics class.
  • Added StatusBar widget. Now Frame has an associated StatusBar.
  • Added Separator widget.
  • Added RadioGroup::onChange event/signal.
  • All methods that return Win32 handles (HWND, HDC, HBRUSH, HRGN, etc.) now are called getHandle().
  • Added GdiObject and SmartPtr.
  • Brush, Cursor, Font, Icon, Image, ImageList, Pen, and Region are SmartPtrs.
  • New Paths example.
  • Widget destructor deletes children.
  • Renamed MouseButtons to MouseButton.
  • Renamed Borders to Sides.
  • Fixed Bix::getPreferredSize when EvenX or EvenY flags are activated.
  • Now MenuItem::setEnabled/Checked can be used although the item isn't in a parent Menu.
  • Removed SelfDestruction class (with SmartPtrs it isn't needed anymore).
Download Vaca 0.0.7

News - Vaca 0.0.6 — Saturday, August 16, 2008

New Vaca release. Changes:

  • Removed dependencies with Boost library.
    • Added Slot/Signal and Bind (placeholders aren't available, sorry).
    • Added ConditionVariable (from William E. Kempf code, Boost.Threads).
    • Added TimePoint.
  • New classes: WidgetClassName, WidgetHitTestEnum.
  • Changed all enumerations to Enum and EnumSet.
  • Renamed CreateHWNDException to CreateWidgetException.
  • Now String::getFile* methods use reverse_iterator.
  • Added Command stuff (Command, CommandSignal, CommandsClient), MenuItem and ToolBar uses commands now.
  • Renamed Widget::acquireFocus to requestFocus.
  • Renamed Widget::acquireCapture to captureMouse.
  • Renamed Widget::releaseCapture to releaseMouse.
  • Renamed Widget::onIdAction to Widget::onCommand.
  • Thanks to Emil Kirichev:
    • Fixed String::fromInt to handle negative numbers.
    • Fixed a problem with mouse coordinates in all mouse events. Now we use MAKEPOINTS to get negative coordinates when we capture the mouse.
    • Added Graphics::drawPolyline(const vector<Point>& points).
  • Added more signals for Widget: See LikeScript example (idea of Przemyslaw Szurmak).
  • New Bix layout manager (also for Java Swing). Next release will have something more useful like SWT's GridLayout or XUL.
  • Removed all utilities (they were too big to include inside the main Vaca distribution).
  • Fixed a lot of bugs.

What is Vaca?

Visual Application Components Abstraction
A library to program applications for MS-Windows using C++ language and classes, with a simple OOP approach (plus STL, Signal/Slot, etc.). It's a wrapper for the Win32 API, but with additional functionality like dockable tool bars and layout managers.
Note: Vaca doesn't depend on Boost libraries anymore.

Minimal Example

#include <Vaca/Vaca.h>

using namespace Vaca;

class MainFrame : public Frame
  Label label;
  MainFrame() : Frame("Vaca Example")
              , label("Hello World!", this) {
    setLayout(new ClientLayout);

  Application app;
  MainFrame frm;
  return 0;

Alternative Example

#include <Vaca/Vaca.h>

using namespace Vaca;

  Application app;
  Frame frm("Vaca Example");
  Label label("Hello World!", &frm);
  frm.setLayout(new ClientLayout);
  return 0;