-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmapp.cpp
More file actions
49 lines (43 loc) · 836 Bytes
/
mapp.cpp
File metadata and controls
49 lines (43 loc) · 836 Bytes
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
#include "mapp.hpp"
#include <wx/msgdlg.h>
#include "mframes.hpp"
#ifdef __WXGTK__
#endif
IMPLEMENT_APP(MApp)
bool MApp::OnInit()
{
try
{
setlocale(LC_ALL,"");
main_frame = new MainFrame();
SetTopWindow(main_frame);
main_frame->Show();
return true;
}
catch(const std::exception& e)
{
wxMessageBox(wxString(e.what(), wxConvLocal), GetAppName());
return true;
}
catch(...)
{
wxMessageBox("Nieznany wyjatek", GetAppName());
return true;
}
}
int MApp::OnExit()
{
try
{
main_frame->Destroy();
}
catch(const std::exception& e)
{
wxMessageBox(wxString(e.what(), wxConvLocal), GetAppName());
}
catch(...)
{
wxMessageBox("Nieznany wyjatek", GetAppName());
}
return wxApp::OnExit();
}