- // Uses generic page setup dialog
- wxGenericPageSetupDialog *genericPageSetupDialog = new wxGenericPageSetupDialog(GetParent(), & m_pageSetupData);
- int ret = genericPageSetupDialog->ShowModal();
- m_pageSetupData = genericPageSetupDialog->GetPageSetupData();
- genericPageSetupDialog->Close(TRUE);
- return ret;
+ int result = wxID_CANCEL ;
+ OSErr err ;
+ wxString message ;
+ ::PrOpen() ;
+ err = PrError() ;
+
+ if ( !err )
+ {
+ m_pageSetupData.ConvertToNative() ;
+ if ( m_pageSetupData.m_macPageSetupInfo && ::PrStlDialog( m_pageSetupData.m_macPageSetupInfo ) )
+ {
+ m_pageSetupData.ConvertFromNative() ;
+ result = wxID_OK ;
+ }
+
+ }
+ else
+ {
+ message.Printf( "Print Error %d", err ) ;
+ wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
+ }
+ ::PrClose() ;
+
+ return result ;