|
|
|
Introduction
Win32++ consists of a small C++ library used to create window
applications. 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
Downloads section. The generic downloads provide
a starting point for applications of the following type:
- Simple Window
- Dialog Application
- Form Application
- Frame Application
- MDI Frame Application
The Downloads section also provides a number of
sample applications which use Win32++, including:
- Browser demo
- Dialog Subclassing demo
- DirectX sample
- Explorer sample
- MDI demo
- Multithreaded demo
- Network Demo
- Notepad sample
- Picture demo
- Property Sheet demo
- Scribble sample
- Splitter demo
- Superclassing demo
- Tab Dialog demo
- Themes sample
This project is also hosted on
here, and
Code Project here. 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 XP and Vista. 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
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 Vista. 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.
- 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.
- Exceptions. When attempts to use the Windows API functions fail, an
exception is thrown to notify the programmer of the problem. When the
project is compiled in debug mode, an error messages is also displayed
which includes the information from GetLastError. Exceptions are thrown
but no error messages are displayed when the project is compiled in
release mode.
- 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.
- Docking support.
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 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 generic downloads provided. They each include an
identical
copy Win32++. The samples also include the project
files for Visual Studio 6, Visual Studio.Net 2003,
Visual C++ 2005 Express Edition, Visual C++ 2008 Express Edition, 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 either Dev-C++ or Microsoft's Visual C++ 2008 Express Edition. I found
these the easiest free compilers to set up and use.
If you wish to compile the Browser sample you will need
a Microsoft compiler, and will also need to install and incorporate the Platform SDK. Information on how to do this
is provided by Microsoft
here.
|