Overview

Win32++

Win32++ Overview

Introduction

Win32++ consists of a C++ library used to create window applications. It is a free alternative to MFC, and can be used on a larger range of compilers including those from Borland, Microsoft and MinGW. The library can be used to create a variety of programs, including simple windows, dialogs, property sheets, as well as frame and MDI frame applications.  Information on how to use these classes to build your own Win32 applications is available in the Tutorial section.

Frame based applications usually have an outer frame window which looks after the menu, toolbar and status bar, and a separate window (sometimes referred to as a view window) over the client area.  Many of the windows applications you are familiar with are likely to be frame based applications.  You can use this library to produce not just simple windows and dialogs, but also professional looking frame based applications, complete with a menu, toolbar, status bar, and tooltips. 

About the Downloads

To download a copy of  Win32++ proceed to the Download section of the projects listing at SourceForge. The Downloads section provides a number of sample applications which use Win32++, including:

  • Browser
  • CustomControl
  • DateTime
  • Dialog
  • DialogBars
  • DialogDemo
  • DialogResizing
  • DialogTab
  • DirectX
  • DLL
  • Dock
  • DockContainer
  • DockTabbedMDI
  • Explorer
  • Fast GDI
  • FormDocView
  • Frame
  • GDIPlus
  • MDI Frame
  • MDI Frame Demo
  • MDI Frame Splitter
  • Networking
  • Notepad
  • Performance
  • Picture
  • PropertySheet
  • RebarDemo
  • RibbonFrame
  • RibbonSimple
  • Scribble
  • Simple Window
  • Splitter
  • StatusBar
  • Tab Demo
  • TaskDialog
  • Themes
  • Threads Demo
  • ToolBar Demo
  • Tray Demo

Features

Win32++ provides a library for developing applications, using the Windows API directly. It supports all MS operating systems which run 32bit and 64bit Windows, from Windows 95 through to Windows 10 and Server 2012.  Win32++ is designed to produce programs with a similar look and feel to those created using MFC. This library can develop applications based on simple windows, dialogs, frames and MDI frames.  The frames produced by Win32++ have the following features:

  • Rebar control
  • MenuBar  (a menu housed inside the rebar control).
  • ToolBar
  • Status bar
  • Tool tips
  • Docking 

Win32++ also brings an object oriented approach to programming directly with the Windows API. Each window created is a C++ class object capable of having its own window procedure for routing messages.

A summary of the features of Win32++ are as follows:

  • Support for both Win32 and Windows CE operating systems. It supports all Win32 operating systems, from Windows 95 through to Windows 10. The Windows CE operating systems supported range from WCE400 (Windows mobile 2003) to WCE600 (Windows mobile 6).
  • Supports a wide range of C++ compilers, including those from Borland and Microsoft, as well as the GNU compiler used in Dev-C++.
  • Supports applications based on simple windows, dialogs, forms, property sheets, SDI frames and MDI frames. The SDI and MDI frames include rebars, status bars, menu bars, toolbars and tooltips. The frames use a separate window, often referred to as a view window, for the frame's client area.
  • Support for docking, tabbed containers and TabbedMDIs.
  • Message routing. The messages for each window are routed to the WndProc function of the associated CWnd object. All messages are passed to the WndProc function, including all those associated with window creation. 
  • Automatic Subclassing. When creating a window using a predefined class type, Win32++ automatically subclasses the window so that messages can be routed via WndProc. Predefined class types include all the common controls, such as the toolbar, status bar, tree-view etc.
  • Existing windows can be attached to CWnd objects. This is particularly useful for controls in dialogs. These can be attached to to CWnd objects with the AttachDlgItem function.
  • Notification reflection. When a notification (WM_NOTIFY message) is received from a child window, OnNotifyReflect is called for the CWnd object associated with the child window.
  • Message reflection. Older common controls pass messages other than WM_NOTIFY to notify the parent window of events. The OnMessageReflect is called to pass these messages back to the CWnd object associated with the child window.
  • Network support. Win32++ provides a CSocket class which is a thin wrapper for much of the Winsock SPI. This class also provides notification of network events. Supports IPv4 and IPv6.
  • Tracing. Trace output is sent to the Output pane of the IDE when the program is compiled with debugging enabled.
  • Multi-Thread support. Win32++ is thread safe, and windows can be created in separate threads.
  • 64 bit support. Win32++ can be used to create 64bit applications.
  • Multilingual support. SetResourceHandle can be used to load resources from a resource dll to provide support for different languages.
  • Support for Task Dialogs available on the Windows Vista and later operating systems. 
  • Support for the Ribbon Framework available on Windows 7.

Requirements for using the Win32++

In order to use Win32++, you will need the following:

  • A C++ compiler.
  • Some knowledge of C++, including how to use classes
  • Some knowledge of the Windows API

You should also have a copy of the Microsoft Platform Software Development Kit, as this includes the documentation for programming with the Windows API. You will find this, as well as a selection of free C+ compilers and Windows API tutorials on the links page.

Getting Started

The library itself can be downloaded here. Simply start with one of the samples provided. The samples include the project files for Visual Studio 6, Visual Studio.Net 2003, VS2005 Express, VS2008 Express, VS2010 Express, VS2013 Express, Dev-C++ and CodeBlocks.  If you're using one of these, the samples are pre-configured, and ready to compile.

If you're new to C++ programming and looking for a free compiler to use, I recommend Microsoft's Visual C++ Express. I found this compiler to be the easiest free compiler to set up and use. If you are using an older Microsoft's Visual Studio 6.0 compiler you may also need to install and incorporate the Platform SDK. Information on how to do this is provided by Microsoft here. To compile the DirectX sample you will need to install the DirectX SDK.