* Preview frame
*/
+BEGIN_EVENT_TABLE(wxPreviewFrame, wxFrame)
+ EVT_CLOSE(wxPreviewFrame::OnCloseWindow)
+END_EVENT_TABLE()
+
wxPreviewFrame::wxPreviewFrame(wxPrintPreviewBase *preview, wxFrame *parent, const wxString& title,
const wxPoint& pos, const wxSize& size, long style, const wxString& name):
wxFrame(parent, -1, title, pos, size, style, name)
{
}
-bool wxPreviewFrame::OnClose()
+void wxPreviewFrame::OnCloseWindow(wxCloseEvent& event)
{
MakeModal(FALSE);
m_printPreview->SetFrame(NULL);
}
delete m_printPreview;
- return TRUE;
+
+ Destroy();
}
void wxPreviewFrame::Initialize()