int LgiMain(OsAppArguments &Args) { GApp *App = new GApp("application/x-MyProgram", Args); if (App && App->IsOk()) { App->AppWnd = new MyWindow; App->Run(); delete App; } return 0; }
class MyWindow : public GWindow { public: MyWindow() { GRect r(0, 0, 700, 600); SetPos(r); MoveToCenter(); SetQuitOnClose(true); Name("My Application"); #ifdef WIN32 CreateClass("MyApp"); #endif if (Attach(0)) { // Put code to create a menu, toolbar and splitter here Visible(true); } } };
GSplitter *s = new GSplitter; if (s) { s->Value(200); s->Attach(this); s->SetViewA(new MyChildWindow1, false); s->SetViewB(new MyChildWindow2, false); }