|
|
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 Embarcadero, 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:
- Animation
- Browser
- BrowserATL
- CommonDialogs
- Console
- ContextHelp
- CustomControl
-
CustomPrintDlg
-
DarkModeFrame
- DateTime
- DDXDemo
- Dialog
- DialogBars
- DialogDemo
- DialogResizing
- DialogTab
- DialogTemplate
- Direct2D
- DirectX9
- DirectX11
- DLL
- Dock
- DockContainer
- DockTabbedMDI
- DoubleBuffer
- EdgeBrowser
-
EdgeBrowserEx
- Explorer
- Fast GDI
- FilePrintPreview
- FormDocView
- Frame
- FrameEx
- GDIPlus
- INIFrame
- ListView
- MDI Dock Frame
- MDI Frame
- MDI Frame Demo
- MDI Frame Splitter
- MetaFile
- MovieShow
- NetClient
- NetServer
- NetSimple
- Notepad
- Performance
- Picture
- PropertySheet
- RebarDemo
- RibbonDockFrame
- RibbonFrame
- RibbonMDIFrame
- RibbonSimple
- RoundWindow
- ScintillaDemo
- Scribble
- Simple Window
- Splitter
- StatusBar
- TabDemo
- TaskDialog
- TextFileReader
- Themes
- Threads Demo
- Time Demo
- Titlebar
- TitlebarFrame
- ToolBar Demo
- ToolTips
- Tray Demo
- WinPlot
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 11 and Server 2022. 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:
- Implemented as a header-only library to simplify the build process.
- Support for both 32 bit and 64 bit Windows. It supports all
Win32 operating systems, from Windows 95 through to Windows 11.
- Supports a wide range of C++ compilers, including those from
Embacadero and
Microsoft, as well as the GNU compiler used in Code::Blocks.
- 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 splitter windows, 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.
- Provides CString for convenient character string handling. A
set of text conversion classes is also provided to conveniently convert
between ASCII and unicode strings.
- 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.
- Supports dark mode applications.
- Supports applications with per-monitor DPI aware version 2.
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
- Documentation for the Windows API.
The documentation for the Windows API ships as part of Micrsoft's free Visual
Studio community. It is contained in the Microsoft Windows
SDK for Windows Vista and above, or the Microsoft Platform SDK for Windows XP
and below.
You will find links to these, 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 2015 Community, Visual Studio 2019 Community,
Visual Studio 2022 Community, CodeBlocks, Embarcadero Dev-C++ and Embarcadero
RAD Studio 11. 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 Studio Community. I found this compiler to
be the easiest free compiler to set up and use. Visual Studio Community
includes the Windows 7 and DirectX11 SDKs, as well as the C++ and Windows API
documentation.
To compile the DirectX9 sample you will need to install the DirectX
SDK9. Users of
the Express versions of Visual Studio will also need to download the Windows 7
SDK to compile the Ribbon and TaskDialog samples.
|