⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newcolordepth.cpp

📁 主要介绍vc++6.0的编程过程
💻 CPP
字号:
// 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
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -