MyFrame.h
#pragma  once
 
 #include  <wx/wx.h>
 #include  <wx/timer.h>
 
 class MyFrame:public wxFrame
 {
 private:
     wxTimer timer_;
 
 public:
     MyFrame(const wxString& title);
     ~MyFrame(void);
 
 private:
    void OnPaint(wxPaintEvent& event);
    void OnTimer(wxTimerEvent& event);
 
    void ScreenToDC(wxDC& dc);
 };
 
 
MyFrame.cpp
#include  "MyFrame.h"
 
 
 MyFrame::MyFrame(const wxString& title)
     :wxFrame(NULL, wxID_ANY, title)
 {
     Bind(wxEVT_PAINT, &MyFrame::OnPaint, this);
     timer_.Bind(wxEVT_TIMER, &MyFrame::OnTimer, this);
     timer_.Start(100);
 
 }
 
 
 MyFrame::~MyFrame(void)
 {
 }
 
 
 void
 MyFrame::OnPaint(wxPaintEvent& event){
     wxPaintDC dc(this);
     ScreenToDC(dc);
 
 }
 
 void
 MyFrame::OnTimer(wxTimerEvent& event){
     wxClientDC dc(this);
     ScreenToDC(dc);
 }
 
 void
 MyFrame::ScreenToDC(wxDC& dc){
     wxScreenDC sdc;
     dc.Blit(wxPoint(0,0), dc.GetSize(), &sdc, wxPoint(0,0));
 }
MyApp.h
#pragma  once
 
 #include  <wx/wx.h>
 
 class  MyApp:public  wxApp
 {
 public:
     MyApp(void);
     ~MyApp(void);
 
    virtual  bool OnInit();
 };
 
 DECLARE_APP(MyApp);
 
MyApp.cpp
#include  "MyApp.h"
 #include  "MyFrame.h"
 
 IMPLEMENT_APP(MyApp);
 
 MyApp::MyApp(void)
 {
 }
 
 
 MyApp::~MyApp(void)
 {
 }
 
 bool
 MyApp::OnInit(){
    wxFrame* m = new  MyFrame("Win1");
     m->Show(true);
    return  true;
 }