#include "TAppWin.cpp" // // Application class // class TWinApp : public TApplication { public: TWinApp() : TApplication() { } void InitMainWindow() { //TWindow* appWindow = new TAppWindow(); TDecoratedFrame* frame = new TDecoratedFrame(0, "Example Database Project", new TAppWindow(0) ); frame->SetStyle( WS_DLGFRAME ); frame->Attr.X =10; frame->Attr.Y =10; frame->Attr.W =600; frame->Attr.H =400; // construct status bar sb = new TStatusBar(frame); // status gadget sg = new TTextGadget(0, TGadget::Recessed, TTextGadget::Left, 15); sg->SetText("Idle"); // file gadget fg = new TTextGadget(0, TGadget::Recessed, TTextGadget::Left, 8); fg->SetText("Closed"); sb->Insert(*fg); sb->Insert(*new TSeparatorGadget); sb->Insert(*sg); sb->Insert(*new TSeparatorGadget); #if !defined(BI_PLAT_WIN32) sb->Insert(*new TTimeGadget); #endif #if defined(BI_PLAT_WIN32) sb->Insert(*new TTimeGadget(&TTimeGadget::GetSystemTime)); #endif frame->Insert(*sb, TDecoratedFrame::Bottom); SetMainWindow(frame); GetMainWindow()->AssignMenu("COMMANDS"); GetMainWindow()->GetClientWindow()->SetBkgndColor(TColor::LtGray); } }; int OwlMain(int /*argc*/, char* /*argv*/ []) { // try .. catch block return TWinApp().Run(); }