Commits

afiskon  committed 9a6b00b

hs_init(), hs_exit()

  • Participants
  • Parent commits e520c0b

Comments (0)

Files changed (2)

 
 IMPLEMENT_APP(SolverApp) 
 
-bool SolverApp::OnInit() 
-{ 
-    SolverFrame *frame = new SolverFrame(NULL); 
-    frame->Show(TRUE); 
-    this->SetTopWindow(frame); 
-    return TRUE; 
+bool SolverApp::OnInit() {
+  int argc = 1;
+  const char* prog_name = "main";
+  char** argv = const_cast<char**>(&prog_name);
+  hs_init(&argc, &argv); // does support unicode?
+
+  SolverFrame *frame = new SolverFrame(NULL); 
+  frame->Show(TRUE); 
+  this->SetTopWindow(frame); 
+  return TRUE; 
+}
+
+int SolverApp::OnExit() {
+  hs_exit();
+  return wxApp::OnExit();
 }
 
 #include <wx/wx.h> 
 
-class SolverApp : public wxApp 
-{ 
-    public: 
-        virtual bool OnInit(); 
+class SolverApp : public wxApp {
+  public: 
+    virtual bool OnInit(); 
+    virtual int OnExit();
 }; 
 
 #endif