18.9 An Application Layer 843
and has exactly the same purpose as that of ConsoleApplication::Run.
The mechanism to hook up your application to be run is supported by the macro
#define WM4_WINDOW_APPLICATION(classname) \
WM4_IMPLEMENT_INITIALIZE(classname); \
\
void classname::Initialize () \
{\
Application::Run = &WindowApplication::Run; \
TheApplication = new classname; \
}
The macro is structured exactly the same as the WM4_CONSOLE_APPLICATION macro.
Unlike the console applications, an additional layer occurs between your application
and the
WindowApplication class. The derived class WindowApplication2 supports 2D
applications; the derived class
WindowApplication3 supports 3D applications.
An example to illustrate setting up a 3D application uses a hypothetical ...