It doesn't make sense to wrap it
http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk/src/common/prntbase.cpp
It Seems to work, but the main frame, to which it is returned, is disabled (in my version of the code). Can I just enable it, or is that too easy?IMPLEMENT_CLASS(wxPreviewFrame, wxFrame) BEGIN_EVENT_TABLE(wxPreviewFrame, wxFrame) EVT_CLOSE(wxPreviewFrame::OnCloseWindow) END_EVENT_TABLE() ... void wxPreviewFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) { if (m_windowDisabler) delete m_windowDisabler; // Need to delete the printout and the print preview wxPrintout *printout = m_printPreview->GetPrintout(); if (printout) { delete printout; m_printPreview->SetPrintout(NULL); m_printPreview->SetCanvas(NULL); m_printPreview->SetFrame(NULL); } delete m_printPreview; Destroy(); }
You could do that, but as you can see above the wxWindowDisabler is deleted, which re-enables the previously disabled windows, so it should work already :)
In reply to Re^3: wxPreviewFrame error on closing
by Anonymous Monk
in thread wxPreviewFrame error on closing
by Steve_BZ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |