Here are two examples of cadview clients running on Windows. The first is simply the earlier gladeui sample built on Windows using MSVC. Headers and libraries for GTK+ (http://www.gtk.org/download/win32.php) need to be installed. A VC++ project [1] was created to refer to the gladeui source files. The project is located at /src/msvc/gladeui. No significant changes were made to the gladeui source.
The second example is called winui and talks directly to the Windows API and GDI+. When handling paint events we require an object using which to perform graphics output. In the GTK+ case, I could simply create the cairo_t
object within the handler. In case of the Windows API, the output must be performed via an HDC
which is passed as a parameter with the WM_PAINT
event. In order to accommodate this, cad_gui_view::paint
was modified to take a cad_gui_view::graphics_type&
as a parameter. winui is located at /src/msvc/winui in the repo.
- ^ I had to fall back on a handcrafted MSVC build since CMake failed to find GTK+ and Boost on Windows. The MSVC solution can be found at /src/msvc/msvc.sln within the repository.
boost::regex
(http://www.boostpro.com/download/) headers and libraries need to be installed for both examples.