// wx_pch.h
#ifndef WX_PCH_H
#define WX_PCH_H
#if ( defined(USE_PCH) && !defined(WX_PRECOMP) )
#define WX_PRECOMP
#endif // USE_PCH
// basic wxWidgets headers
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#ifdef USE_PCH
// put here all your rarely-changing header files
#endif // USE_PCH
#endif // WX_PCH_H
/******************************************************************/
// main.cpp
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#include "wx/xrc/xmlres.h"
#include "mainframe.h"
class MyApp : public wxApp
{
public:
virtual bool OnInit();
};
IMPLEMENT_APP(MyApp);
bool MyApp::OnInit()
{
yuv2rgb_c_init();
wxImage::AddHandler(new wxGIFHandler);
wxImage::AddHandler(new wxJPEGHandler);
wxXmlResource::Get()->InitAllHandlers();
wxXmlResource::Get()->Load(L"rc/frame.xrc");
wxXmlResource::Get()->Load(L"rc/menu.xrc");
mainFrame* frame = new mainFrame();
frame->Show();
return true;
}
/******************************************************************/
// mainframe.h
#ifndef MAINFRAME_H
#define MAINFRAME_H
class MainFrame : public wxFrame
{
public:
MainFrame(wxWindow* parent=(wxWindow *)NULL);
virtual ~MainFrame();
protected:
private:
DECLARE_EVENT_TABLE();
};
#endif // MAINFRAME_H
/******************************************************************/
// mainframe.cpp
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#include <wx/xrc/xmlres.h>
BEGIN_EVENT_TABLE(MainFrame, wxFrame)
//EVT_BUTTON(XRCID("button_test"), MainFrame::OnButtonTest)
END_EVENT_TABLE()
MainFrame::MainFrame(wxWindow* parent)
{
wxXmlResource::Get()->LoadFrame(this, parent, _("frame"));
}
MainFrame::~MainFrame()
{
}


