Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Aggiunto supporto per docking panes ed outlook bars Aggiunto supporto per esecuzione all'interno di una finestra invece che a tutto schermo Migliorata gestione font delle status bar git-svn-id: svn://10.65.10.50/trunk@16065 c028cbd2-c16b-5b4b-a496-9718f37d4682
64 lines
1.2 KiB
C++
Executable File
64 lines
1.2 KiB
C++
Executable File
#include "../xvaga/wxinc.h"
|
|
|
|
#if wxCHECK_VERSION(2,8,7)
|
|
#include <wx/filename.h>
|
|
#include <wx/snglinst.h>
|
|
#endif
|
|
|
|
extern int xvt_main(int argc, char** argv);
|
|
|
|
class TMainApp : public wxApp
|
|
{
|
|
wxLocale m_Locale;
|
|
#if wxCHECK_VERSION(2,8,7)
|
|
wxSingleInstanceChecker* m_sic;
|
|
#endif
|
|
|
|
protected:
|
|
virtual bool OnInit();
|
|
virtual int OnExit();
|
|
virtual void OnTimer(wxTimerEvent& event);
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
DECLARE_DYNAMIC_CLASS(TMainApp);
|
|
};
|
|
|
|
IMPLEMENT_DYNAMIC_CLASS(TMainApp, wxApp)
|
|
|
|
DECLARE_APP(TMainApp)
|
|
IMPLEMENT_APP(TMainApp)
|
|
|
|
#define TIMER_ID 883
|
|
|
|
BEGIN_EVENT_TABLE(TMainApp, wxApp)
|
|
EVT_TIMER(TIMER_ID, TMainApp::OnTimer)
|
|
END_EVENT_TABLE()
|
|
|
|
void TMainApp::OnTimer(wxTimerEvent& event)
|
|
{
|
|
xvt_main(argc, argv);
|
|
}
|
|
|
|
bool TMainApp::OnInit()
|
|
{
|
|
#if wxCHECK_VERSION(2,8,7)
|
|
wxFileName strWrk = argv[0];
|
|
const wxString strApp = strWrk.GetName().Lower();
|
|
m_sic = new wxSingleInstanceChecker(strApp);
|
|
#endif
|
|
m_Locale.Init(wxLocale::GetSystemLanguage()); // wxLANGUAGE_ITALIAN
|
|
|
|
wxTimerEvent evt(TIMER_ID);
|
|
AddPendingEvent(evt);
|
|
return true;
|
|
}
|
|
|
|
int TMainApp::OnExit()
|
|
{
|
|
#if wxCHECK_VERSION(2,8,7)
|
|
delete m_sic;
|
|
m_sic = NULL;
|
|
#endif
|
|
return wxApp::OnExit();
|
|
}
|