class GApp

Inherit your main application object from GApp to store global data and respond to initialization parameters and application level events.

class GApp {
public:
	GdcTtf *SystemFont;
	GAppWindow *AppWnd;

	GApp(...);
	virtual ~GApp();

	virtual void OnCmdLine(char *Cmd);
	virtual void OnArgs(int Args, char **Arg);
	virtual void Run(bool Loop = TRUE);
	virtual void Exit(int Code = 0);
};
The GApp object inherits from the BApplication object


GdcTtf *SystemFont

This font is a generic system font that you can use anywhere. It can be accessed through the use of the macro SysFont

GAppWindow *AppWnd

This variable should contain a pointer to the applications main window. This allows the GApp object to close the window on exit gracefully.

GApp(...)

GApp(char *MimeSig, char *lpCmdLine);

MimeSig The MIME signature of the application:
application/x-AppName
lpCmdLine Command line passed into main(...)

GApp(HINSTANCE hInst, char *lpCmdLine, int nShow);

hInst The instance of the application.
lpCmdLine Command line passed into WinMain(...)
nShow The show command passed into WinMain(...)


virtual void OnCmdLine(char *Cmd)

Parses the command line and passes the results on to OnArgs

virtual void OnArgs(int Args, char **Arg)

Override to process the command line arguments.

virtual void Run(bool Loop = TRUE)

Runs the applications message loop. This doesn't return until the application exits.

virtual void Exit(int Code = 0)

Call this to fall out of the application message and exit.
© 1999 Matthew Allen