// Options.cpp : implementation file // #include "stdafx.h" #include "PDFCompDemo.h" #include "PDFCompDemoDoc.h" #include "PdfOptions.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CPDFOptions dialog CPDFOptions::CPDFOptions(CWnd* pParent /*=NULL*/) : CDialog(CPDFOptions::IDD, pParent) { //{{AFX_DATA_INIT(CPDFOptions) m_n1Bit = 5; m_n2Bit = 0; m_nPict = 5; m_bCheckBackground = FALSE; m_nSeg = 0; //}}AFX_DATA_INIT m_nQFactor = 50; } void CPDFOptions::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CPDFOptions) DDX_Control(pDX, IDC_QFACTOR, m_QFactor); DDX_CBIndex(pDX, IDC_1BIT, m_n1Bit); DDX_CBIndex(pDX, IDC_2BIT, m_n2Bit); DDX_CBIndex(pDX, IDC_PICT, m_nPict); DDX_Check(pDX, IDC_BACKGROUND, m_bCheckBackground); DDX_CBIndex(pDX, IDC_SEGMENTATION, m_nSeg); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CPDFOptions, CDialog) //{{AFX_MSG_MAP(CPDFOptions) ON_CBN_SELCHANGE(IDC_PICT, OnSelchangePict) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CPDFOptions message handlers void CPDFOptions::OnSelchangePict() { UpdateData( ); GetDlgItem( IDC_QFACTOR )->EnableWindow( m_nPict < 6 ); GetDlgItem( IDC_BESTQUALITY )->EnableWindow( m_nPict < 6 ); GetDlgItem( IDC_BESTCOMP )->EnableWindow( m_nPict < 6 ); } void CPDFOptions::OnOK() { CDialog::OnOK(); } BOOL CPDFOptions::OnInitDialog() { CDialog::OnInitDialog(); OnSelchangePict(); m_QFactor.SetRange( 2, 255 ); m_QFactor.SetTicFreq( 25 ); m_QFactor.SetPos( m_nQFactor ); return TRUE; } BOOL CPDFOptions::DestroyWindow() { m_nQFactor = m_QFactor.GetPos( ); return CDialog::DestroyWindow(); } // PDFDPIOptions.cpp : implementation file // #include "stdafx.h" #include "pdfcompdemo.h" #ifdef _DEBUG #define new DEBUG_NEW #endif ///////////////////////////////////////////////////////////////////////////// // PDFDPIOptions dialog PDFDPIOptions::PDFDPIOptions(CWnd* pParent /*=NULL*/) : CDialog(PDFDPIOptions::IDD, pParent) { //{{AFX_DATA_INIT(PDFDPIOptions) m_edtPDFYRes = 600; m_edtPDFXRes = 600; //}}AFX_DATA_INIT } void PDFDPIOptions::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(PDFDPIOptions) DDX_Text(pDX, IDC_EDIT_YRES, m_edtPDFYRes); DDV_MinMaxInt(pDX, m_edtPDFYRes, 10, 1000); DDX_Text(pDX, IDC_EDIT_XRES, m_edtPDFXRes); DDV_MinMaxInt(pDX, m_edtPDFXRes, 10, 1000); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(PDFDPIOptions, CDialog) //{{AFX_MSG_MAP(PDFDPIOptions) // NOTE: the ClassWizard will add message map macros here //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // PDFDPIOptions message handlers