Removed lots of OnClose functions; doc'ed OnCloseWindow better;
MM_... -> wxMM_... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -131,6 +131,12 @@ bool MyApp::OnInit(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int MyApp::OnExit()
|
||||
{
|
||||
delete wxGetApp().m_testFont;
|
||||
return 1;
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU(WXPRINT_QUIT, MyFrame::OnExit)
|
||||
EVT_MENU(WXPRINT_PRINT, MyFrame::OnPrint)
|
||||
@@ -317,14 +323,6 @@ void MyCanvas::OnEvent(wxMouseEvent& WXUNUSED(event))
|
||||
{
|
||||
}
|
||||
|
||||
bool MyFrame::OnClose(void)
|
||||
{
|
||||
Show(FALSE);
|
||||
delete wxGetApp().m_testFont;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool MyPrintout::OnPrintPage(int page)
|
||||
{
|
||||
wxDC *dc = GetDC();
|
||||
|
@@ -17,8 +17,9 @@
|
||||
class MyApp: public wxApp
|
||||
{
|
||||
public:
|
||||
MyApp(void) ;
|
||||
bool OnInit(void);
|
||||
MyApp() ;
|
||||
bool OnInit();
|
||||
int OnExit();
|
||||
|
||||
wxFont* m_testFont;
|
||||
};
|
||||
@@ -34,8 +35,6 @@ class MyFrame: public wxFrame
|
||||
MyCanvas *canvas;
|
||||
MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||
|
||||
bool OnClose(void);
|
||||
|
||||
void Draw(wxDC& dc);
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
Reference in New Issue
Block a user