view main.cpp @ 0:ebc42d7a0010

First Release.
author pyon@macmini
date Fri, 24 Jan 2014 20:35:59 +0900
parents
children 3fadcf124bb4
line wrap: on
line source

// Filename   : main.cpp
// Last Change: 21-Jan-2014.
//
#include "main.h"
#include "myframe.h"

IMPLEMENT_APP(MyApp)

IMPLEMENT_CLASS( MyApp, wxApp )

MyApp::MyApp()
{
}
MyApp::~MyApp()
{
}

bool MyApp::OnInit()
{
    if ( !wxApp::OnInit() ) return false;

    wxImage::AddHandler( new wxJPEGHandler );
    wxImage::AddHandler( new wxPNGHandler  );
    wxImage::AddHandler( new wxXPMHandler  );
    wxImage::AddHandler( new wxGIFHandler  );
    wxImage::AddHandler( new wxICOHandler  );
    wxImage::AddHandler( new wxBMPHandler  );
    wxImage::AddHandler( new wxTIFFHandler );

    long style = wxDEFAULT_FRAME_STYLE;
    style = style & ~( wxMAXIMIZE_BOX );
    MyFrame *mainframe = new MyFrame( NULL, wxID_ANY, wxT("IMCV - ImageConverter -"), wxDefaultPosition, wxSize( 450, 200 ), style );
    mainframe->Show(true);

    return true;
}

int MyApp::OnExit()
{
    return 0;
}