#include #include #include class myApp : public wxApp { public: bool OnInit(void); int OnExit(void); }; IMPLEMENT_APP(myApp) bool myApp :: OnInit(){ wxFrame* frame = new wxFrame(NULL, wxID_ANY, wxT("blah blah")); wxBoxSizer* sizer = new wxBoxSizer( wxHORIZONTAL ); wxWindow* window = new wxWindow(frame, wxID_ANY); wxPaintDC paintMe(window); wxMemoryDC memoryDC; wxBitmap* bitmap = new wxBitmap(wxT("wxResizeToBitmap.png"), wxBITMAP_TYPE_PNG); memoryDC.SelectObject(*bitmap); window->SetClientSize(bitmap->GetWidth(), bitmap->GetHeight()); paintMe.Blit(0, 0, bitmap->GetWidth(), bitmap->GetHeight(), &memoryDC, 0, 0); sizer->Add(window, 1, wxEXPAND | wxALL); frame->SetSizer(sizer); frame->Show(); this->SetTopWindow(frame); return true; } int myApp :: OnExit(){ return 0; }