Mercurial > mercurial > hgweb_madnm.cgi
comparison src/main.cpp @ 0:2f5584f0d127
first commit.
author | pyon@macmini |
---|---|
date | Sat, 08 Jun 2019 16:21:40 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:2f5584f0d127 |
---|---|
1 // Filename : main.cpp | |
2 // Last Change: 2019-06-05 水 12:53:55. | |
3 // | |
4 | |
5 #include "id.h" | |
6 #include "main.h" | |
7 #include "appconf.h" | |
8 #include "util.h" | |
9 #include "mainframe.h" | |
10 | |
11 IMPLEMENT_APP( MyApp ) | |
12 | |
13 IMPLEMENT_CLASS( MyApp, wxApp ) | |
14 | |
15 MyApp::MyApp() | |
16 { | |
17 } | |
18 MyApp::~MyApp() | |
19 { | |
20 } | |
21 | |
22 bool MyApp::OnInit() | |
23 { | |
24 if ( !wxApp::OnInit() ) return false; | |
25 | |
26 wxImage::AddHandler( new wxJPEGHandler ); | |
27 wxImage::AddHandler( new wxPNGHandler ); | |
28 | |
29 AppConf appconf; | |
30 wxRect rect = appconf.LoadRect(); | |
31 // Main Window | |
32 MainFrame *mainframe = new MainFrame( NULL, wxID_ANY, "MadnM", wxPoint( rect.x, rect.y ), rect.GetSize(), wxDEFAULT_FRAME_STYLE ); | |
33 mainframe->Show( true ); | |
34 mainframe->Raise(); | |
35 | |
36 return true; | |
37 } | |
38 | |
39 int MyApp::OnExit() | |
40 { | |
41 return 0; | |
42 } | |
43 |