// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit() {
#ifdef __WXMAC__
ProcessSerialNumber PSN;
GetCurrentProcess(&PSN);
TransformProcessType(&PSN,kProcessTransformToForegroundApplication);
#endif
wxXmlResource::Get()->InitAllHandlers();
wxXmlResource::Get()->Load(_T("gui.xrc"));
Collection* library = new Collection;
MovieDB* database = new MovieDB("db.txt");
database->loadDB(*library);
MainWindow* frame = new MainWindow(wxString(_T("XML resources demo")), wxPoint(50, 50), wxSize(800, 600), library, database);
fillGrid(*frame->grid_, *library);
frame->Show(true);
return true;
}