-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKVIApp.cpp
61 lines (52 loc) · 1.23 KB
/
PKVIApp.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/***************************************************************
* Name: PKVIApp.cpp
* Purpose: Code for Application Class
* Author: ()
* Created: 2010-03-22
* Copyright: ()
* License:
**************************************************************/
#include "wx_pch.h"
#include "PKVIApp.h"
//(*AppHeaders
#include "PKVIMain.h"
#include <wx/image.h>
//*)
IMPLEMENT_APP(PKVIApp);
BEGIN_EVENT_TABLE(PKVIApp,wxApp)
EVT_END_SESSION(PKVIApp::OnEndSession)
END_EVENT_TABLE()
bool PKVIApp::OnInit()
{
// signal(SIGPIPE,SIG_IGN);
// struct sigaction sa;
// sa.sa_handler=SIG_IGN;
// sigaction(SIGINT,&sa,0);
//(*AppInitialize
bool wxsOK = true;
wxInitAllImageHandlers();
if ( wxsOK )
{
PKVIFrame* Frame = new PKVIFrame(0);
Frame->Show();
SetTopWindow(Frame);
}
//*)
return wxsOK;
}
int PKVIApp::OnExit()
{
// wxString s=wxStandardPaths::Get().GetUserConfigDir()+"/OnExit.bin";
//
// wxFile f(s,wxFile::write);
// GetTopWindow()->Close();
return wxApp::OnExit();
}
void PKVIApp::OnEndSession(wxCloseEvent& event)
{
// wxString s=wxStandardPaths::Get().GetUserConfigDir()+"/OnEndSess.bin";
//
// wxFile f(s,wxFile::write);
//
// int a=0;
}