-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCanadianExperienceApp.cpp
More file actions
47 lines (36 loc) · 975 Bytes
/
CanadianExperienceApp.cpp
File metadata and controls
47 lines (36 loc) · 975 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
/**
* @file CanadianExperienceApp.cpp
* @author Charles B. Owen
*/
#include "pch.h"
#include <wx/xrc/xmlres.h>
#include <wx/stdpaths.h>
#include "CanadianExperienceApp.h"
#include "MainFrame.h"
/**
* Initialize the application.
* @return True if successful
*/
bool CanadianExperienceApp::OnInit()
{
if (!wxApp::OnInit())
return false;
// Add image type handlers
wxInitAllImageHandlers();
// Do not remove this line...
wxSetWorkingDirectory(L"..");
// Get pointer to XML resource system
auto xmlResource = wxXmlResource::Get();
// Initialize XRC handlers
xmlResource->InitAllHandlers();
// Load all XRC resources from the program resources
auto standardPaths = wxStandardPaths::Get();
if (!wxXmlResource::Get()->LoadAllFiles(standardPaths.GetResourcesDir() + "/xrc"))
{
return false;
}
auto frame = new MainFrame();
frame->Initialize();
frame->Show(true);
return true;
}