Code: Select all
#include "landingframe.h"
#include "optionframe.h"
#include <wx/wx.h>
landingFrame :: landingFrame(const wxString& title = "")
:wxFrame(nullptr, wxID_ANY,title, wxDefaultPosition, wxDefaultSize, wxMAXIMIZE){
wxImage::AddHandler(new wxPNGHandler);
wxStaticBitmap* logo = new wxStaticBitmap(this, wxID_ANY, wxBitmap("presplash.png"), wxDefaultPosition);
wxBoxSizer* logo_container = new wxBoxSizer(wxVERTICAL);
logo_container->AddStretchSpacer(1);
logo_container->Add(logo, 0, wxALIGN_CENTER | wxALIGN_CENTER_HORIZONTAL);
logo_container->AddStretchSpacer(1);
SetSizerAndFit(logo_container);
}
so I defined OnInit as
Code: Select all
bool myapp:: OnInit(){
landingFrame* frame = new landingFrame ("");
optionFrame* options = new optionFrame("");
frame->Show(true);
SetTopWindow(frame);
sleep(5);
delete frame;
options->Show(true);
SetTopWindow(options);
return true;
}