X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae500232a4e961a567a5fb375fcf4f4a23216bd2..6afa47d63d56094958ed4d2528bf45ad67340954:/src/common/cmndata.cpp diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 08e3e0cf09..0595eacc27 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "cmndata.h" #endif @@ -48,13 +48,12 @@ #endif // wxUSE_PRINTING_ARCHITECTURE #ifdef __WXMSW__ - #include + #include #include "wx/msw/private.h" - #if !defined(__WIN32__) - #include + #if defined(__WXWINCE__) && !wxUSE_SMARTPHONE #include - #endif // Win16 + #endif #if defined(__WATCOMC__) || defined(__SYMANTEC__) || defined(__SALFORDC__) #include @@ -327,7 +326,11 @@ void wxPrintData::ConvertToNative() pd.lStructSize = 66; #else memset(&pd, 0, sizeof(PRINTDLG)); +#ifdef __WXWINCE__ + pd.cbStruct = sizeof(PRINTDLG); +#else pd.lStructSize = sizeof(PRINTDLG); +#endif #endif pd.hwndOwner = (HWND)NULL; @@ -773,10 +776,10 @@ wxPrintDialogData::wxPrintDialogData(const wxPrintData& printData) #ifdef __WXMSW__ m_printDlgData = NULL; #endif - m_printFromPage = 0; + m_printFromPage = 1; m_printToPage = 0; - m_printMinPage = 0; - m_printMaxPage = 0; + m_printMinPage = 1; + m_printMaxPage = 9999; m_printNoCopies = 1; m_printAllPages = FALSE; m_printCollate = FALSE; @@ -894,7 +897,7 @@ void wxPrintDialogData::ConvertToNative() pd->Flags |= PD_NOSELECTION; if ( !m_printEnablePageNumbers ) pd->Flags |= PD_NOPAGENUMS; - else if ( (!m_printAllPages) && (!m_printSelection) ) + else if ( (!m_printAllPages) && (!m_printSelection) && (m_printFromPage != 0) && (m_printToPage != 0)) pd->Flags |= PD_PAGENUMS; if ( m_printEnableHelp ) pd->Flags |= PD_SHOWHELP;