- printData.ConvertToNative();
-
- bool ret = (PrintDlg( (PRINTDLG *)printData.printData ) != 0);
- if ( ret != FALSE && ((PRINTDLG *)printData.printData)->hDC)
- {
- wxPrinterDC *pdc = new wxPrinterDC((WXHDC) ((PRINTDLG *)printData.printData)->hDC);
- printerDC = pdc;
- printData.ConvertFromNative();
- return wxID_OK;
- }
- else
- {
-/*
- char buf[256];
- DWORD exError = CommDlgExtendedError();
- sprintf(buf, "ret = %d, ex error = %d", (int) ret, (int) exError);
- wxMessageBox(buf);
-*/
- return wxID_CANCEL;
- }
+ m_printDialogData.ConvertToNative();
+
+ bool ret = (PrintDlg( (PRINTDLG *)m_printDialogData.GetNativeData() ) != 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;
+ }