aswang  1.0
Aswang documentation


Aswang is a class framework meant to make windows development easier and faster. This is achieved by wrapping the windows API to make it object-oriented while not over-complicating the interface or obscuring the internal mechanisms.

Aswang intends to be extremely lightweight and flexible while integrating well with existing code using the raw windows API. Apps built using aswang are in fact the same as apps written using c-style API calls and therefore should not have any particular characteristic style or appearance.

Aswang is written in simple C++ utilizing the Standard Template Library (STL). This allows windows programs to be released without dependencies on huge bloated libraries. Aswang also allows developers to eliminate un-needed features and link only to code being used by the end product.

These features also make Aswang highly suitable for Windows Mobile development.


The usefulness of Aswang is best demonstrated with an example. Below is an Aswang implementation of a simple Hello World application. If you have developed a similar app from the Windows SDK examples, you will appreciate the simplicity of this approach.

Hello World

This example shows how little code is needed to create a small Hello World app.

In this classic "Hello World" example, a class named MainDialog is created which serves as the main program window. The class loads a Dialog from a resource template named IDD_HELLO. Upon closing, the class will terminate the program since it is the main window.

#include <Dialog.h>
#include "resource.h"

class MainDialog : public aswang::Dialog {
        MainDialog() : Dialog(IDD_HELLO) {}
        ~MainDialog() {}

        // This virtual function is triggered by WM_DESTROY
        // The effect is that the program exits when the window is closed.
        LRESULT OnDestroy(HWND win) {
                return TRUE;

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrev,LPSTR cmdLine,int nShow) {
        MainDialog md;
        // setting the instance only needs to be done once. 
        // we could also do it as a static function call.
        return md.Loop();

That's it! Wasn't that easy? Compare this to the code needed for a c-style windows application or an MFC application and you can see how simple yet powerful Aswang is.

For more examples please see the examples section.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines