NEWCOLORDEPTH.CPP
上传用户:alisonmail
上传日期:2013-02-28
资源大小:500k
文件大小:2k
- // NewColorDepth.cpp : implementation file
- //
- #include "stdafx.h"
- #include "ImageView.h"
- #include "NewColorDepth.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CNewColorDepth dialog
- CNewColorDepth::CNewColorDepth(CWnd* pParent /*=NULL*/)
- : CDialog(CNewColorDepth::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CNewColorDepth)
- m_nNewColorDepth = -1;
- //}}AFX_DATA_INIT
- m_nCurrentColorDepth = -1;
- }
- void CNewColorDepth::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CNewColorDepth)
- DDX_Radio(pDX, IDC_RADIO1, m_nNewColorDepth);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CNewColorDepth, CDialog)
- //{{AFX_MSG_MAP(CNewColorDepth)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CNewColorDepth message handlers
- BOOL CNewColorDepth::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- CenterWindow();
- if( m_nCurrentColorDepth != -1 ){
- if( m_nCurrentColorDepth < 0 ) m_nCurrentColorDepth = 0;
- else if( m_nCurrentColorDepth > 3 ) m_nCurrentColorDepth = 3;
- static int cd[] = { IDC_RADIO1, IDC_RADIO2, IDC_RADIO3, IDC_RADIO4 };
- CWnd *pWnd = GetDlgItem( cd[m_nCurrentColorDepth] );
- if( pWnd != NULL ) pWnd->EnableWindow( FALSE );
- }
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }