45
|
1 // Filename : main.cpp
|
65
|
2 // Last Change: 2021-05-07 金 17:21:40.
|
45
|
3 //
|
|
4 #include "main.h"
|
|
5 #include "alloc.h"
|
|
6
|
|
7 IMPLEMENT_APP(MyApp)
|
|
8
|
|
9 IMPLEMENT_CLASS(MyApp, wxApp)
|
|
10
|
|
11 MyApp::MyApp()
|
|
12 {
|
|
13 }
|
|
14
|
|
15 MyApp::~MyApp()
|
|
16 {
|
|
17 }
|
|
18
|
|
19 bool MyApp::OnInit()
|
|
20 {
|
|
21 if (!wxApp::OnInit()) return false;
|
|
22
|
65
|
23 wxImage::AddHandler(new wxJPEGHandler);
|
|
24 wxImage::AddHandler(new wxTIFFHandler);
|
|
25
|
|
26 AllocFrame *frame = new AllocFrame(NULL, wxID_ANY, wxT("ALLOC"), wxDefaultPosition, wxSize(420, 260), wxCAPTION|wxCLOSE_BOX);
|
45
|
27 frame->Show(true);
|
|
28 frame->Raise();
|
|
29
|
|
30 return true;
|
|
31 }
|
|
32
|
|
33 int MyApp::OnExit()
|
|
34 {
|
|
35 return 0;
|
|
36 }
|
|
37
|