+ m_printDialogData.ConvertToNative();
+
+ PRINTDLG* p = (PRINTDLG *)m_printDialogData.GetNativeData() ;
+ if (m_dialogParent)
+ p->hwndOwner = (HWND) m_dialogParent->GetHWND();
+ else if (wxTheApp->GetTopWindow())
+ p->hwndOwner = (HWND) wxTheApp->GetTopWindow()->GetHWND();
+ else
+ p->hwndOwner = 0;
+
+ bool ret = (PrintDlg( p ) != 0);
+
+ p->hwndOwner = 0;
+
+ if ( ret != FALSE && ((PRINTDLG *)m_printDialogData.GetNativeData())->hDC)
+ {
+ wxPrinterDC *pdc = new wxPrinterDC((WXHDC) ((PRINTDLG *)m_printDialogData.GetNativeData())->hDC);
+ m_printerDC = pdc;
+ m_printDialogData.ConvertFromNative();
+ return wxID_OK;
+ }
+ else
+ {
+ return wxID_CANCEL;
+ }