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

📄 colorsplitdlg.cpp

📁 影像采集卡开发源程序
💻 CPP
字号:
// ColorSplitDlg.cpp : implementation file
//

#include "stdafx.h"
#include "VCShow.h"
#include "ColorSplitDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CColorSplitDlg dialog


CColorSplitDlg::CColorSplitDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CColorSplitDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CColorSplitDlg)
	//}}AFX_DATA_INIT
}


void CColorSplitDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CColorSplitDlg)
	DDX_Control(pDX, IDC_COLOR_SPLIT_R3, m_colorB);
	DDX_Control(pDX, IDC_COLOR_SPLIT_R2, m_colorG);
	DDX_Control(pDX, IDC_COLOR_SPLIT_R, m_colorR);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CColorSplitDlg, CDialog)
	//{{AFX_MSG_MAP(CColorSplitDlg)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CColorSplitDlg message handlers

BOOL CColorSplitDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
//	newr = new CxImage();
//	newg = new CxImage();
//	newb = new CxImage();
	// TODO: Add extra initialization here
	
	
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}



void CColorSplitDlg::OnPaint() 
{

	CPaintDC dc(this); // device context for painting
	CRect r,r2,r3,r4;			
	CWnd *p = (CWnd*) GetDlgItem(IDC_COLOR_SPLIT_R);
	CDC *pDC = p->GetDC();
	p->GetWindowRect(&r);
		
	CWnd *p2 = (CWnd*) GetDlgItem(IDC_COLOR_SPLIT_R2);
	CDC *pDC2 = p2->GetDC();
	p2->GetWindowRect(&r2);

	CWnd *p3 = (CWnd*) GetDlgItem(IDC_COLOR_SPLIT_R3);
	CDC *pDC3 = p3->GetDC();
	p3->GetWindowRect(&r3);

	CWnd *p4 = (CWnd*) GetDlgItem(IDC_COLOR_SPLIT_COM);
	CDC *pDC4 = p4->GetDC();
	p3->GetWindowRect(&r4);
	
		//m_img->Stretch(pDC->m_hDC, 0, 0, r.Width(), r.Height());//360, 300
	newr->Draw(pDC->m_hDC,0, 0, 320, 240);
		p->ReleaseDC(pDC);
	newg->Draw(pDC2->m_hDC,0, 0, 320, 240);
		p2->ReleaseDC(pDC2);
	newb->Draw(pDC3->m_hDC,0, 0, 320, 240);
		p3->ReleaseDC(pDC3);
	mix->Draw(pDC4->m_hDC,0, 0, 320, 240);
		p4->ReleaseDC(pDC3);

	
	// Do not call CDialog::OnPaint() for painting messages
}

⌨️ 快捷键说明

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