git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35265
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Define a new application type
class MyApp: public wxApp
// Define a new application type
class MyApp: public wxApp
public:
bool OnInit(void);
};
// Define a new frame type
class MyFrame: public wxFrame
public:
bool OnInit(void);
};
// Define a new frame type
class MyFrame: public wxFrame
public:
MyFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h);
public:
MyFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h);
void OnQuit(wxCommandEvent& event);
void OnTest(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnQuit(wxCommandEvent& event);
void OnTest(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
protected:
wxShadowObject m_shadow;
};
// Define another new frame type
class MySecondFrame: public MyFrame
protected:
wxShadowObject m_shadow;
};
// Define another new frame type
class MySecondFrame: public MyFrame
public:
MySecondFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h);
};
public:
MySecondFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h);
};
// Show the frame
frame->Show(true);
// Show the frame
frame->Show(true);
// Create the main frame window
MySecondFrame *frame2 = new MySecondFrame(NULL, _T("Dynamic wxWidgets App"), 150, 150, 450, 340);
// Create the main frame window
MySecondFrame *frame2 = new MySecondFrame(NULL, _T("Dynamic wxWidgets App"), 150, 150, 450, 340);
// Show the frame
frame2->Show(true);
// Show the frame
frame2->Show(true);
// Callback from wxShadowObject
// Callback from wxShadowObject
-int cb_MyFrame_InitStatusbar( void* window, void* param )
+int cb_MyFrame_InitStatusbar( void* window, void* WXUNUSED(param) )
{
MyFrame *frame = (MyFrame*) window;
frame->SetStatusText( wxT("Hello from MyFrame"), 0 );
{
MyFrame *frame = (MyFrame*) window;
frame->SetStatusText( wxT("Hello from MyFrame"), 0 );
wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MyFrame::OnTest) );
Connect( DYNAMIC_ABOUT, wxID_ANY,
wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MyFrame::OnAbout) );
wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MyFrame::OnTest) );
Connect( DYNAMIC_ABOUT, wxID_ANY,
wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MyFrame::OnAbout) );
CreateStatusBar();
m_shadow.AddMethod( wxT("OnTest"), &cb_MyFrame_InitStatusbar );
}
CreateStatusBar();
m_shadow.AddMethod( wxT("OnTest"), &cb_MyFrame_InitStatusbar );
}
// Callback from wxShadowObject
// Callback from wxShadowObject
-int cb_MySecondFrame_InitStatusbar( void* window, void* param )
+int cb_MySecondFrame_InitStatusbar( void* window, void* WXUNUSED(param) )
{
MySecondFrame *frame = (MySecondFrame*) window;
frame->SetStatusText( wxT("Hello from MySecondFrame"), 0 );
{
MySecondFrame *frame = (MySecondFrame*) window;
frame->SetStatusText( wxT("Hello from MySecondFrame"), 0 );
{
m_shadow.AddMethod( wxT("OnTest"), &cb_MySecondFrame_InitStatusbar );
}
{
m_shadow.AddMethod( wxT("OnTest"), &cb_MySecondFrame_InitStatusbar );
}