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

📄 optionvideodlg.cpp

📁 一个简单的视频会议VC++MFC工程文件
💻 CPP
字号:
// OptionVideoDlg.cpp : implementation file
//

#include "stdafx.h"
#include "VISMCU.h"
#include "OptionVideoDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// COptionVideoDlg dialog


COptionVideoDlg::COptionVideoDlg(CWnd* pParent /*=NULL*/)
	: CDialog(COptionVideoDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(COptionVideoDlg)
	m_format = -1;
	m_fps = 0;
	m_h263 = _T("");
	m_quality = 0;
	m_sendVideo = FALSE;
	//}}AFX_DATA_INIT
}


void COptionVideoDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(COptionVideoDlg)
	DDX_Control(pDX, IDC_FORMAT, m_ctlFormat);
	DDX_CBIndex(pDX, IDC_FORMAT, m_format);
	DDX_Text(pDX, IDC_FPS, m_fps);
	DDV_MinMaxDWord(pDX, m_fps, 10, 30);
	DDX_Text(pDX, IDC_H263, m_h263);
	DDX_Text(pDX, IDC_QUALITY, m_quality);
	DDV_MinMaxDWord(pDX, m_quality, 0, 100);
	DDX_Check(pDX, IDC_SENDVIDEO, m_sendVideo);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(COptionVideoDlg, CDialog)
	//{{AFX_MSG_MAP(COptionVideoDlg)
	ON_WM_CTLCOLOR()
	ON_BN_CLICKED(IDC_COLOR, OnColor)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// COptionVideoDlg message handlers

BOOL COptionVideoDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_ctlFormat.AddString("QCIF (176*144)");
	m_ctlFormat.AddString("CIF  (352*288)");
	
	m_brush.CreateSolidBrush(m_color);
	UpdateData(FALSE);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

HBRUSH COptionVideoDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
	HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
	
	// TODO: Change any attributes of the DC here
	if(pWnd->GetDlgCtrlID()==IDC_COLOR)
	{
		return m_brush;
	}
	// TODO: Return a different brush if the default is not desired
	return hbr;
}

void COptionVideoDlg::OnColor() 
{
	// TODO: Add your control notification handler code here
	CColorDialog dlg(m_color,0,this);
	if(dlg.DoModal()==IDOK)
	{
		m_color=dlg.GetColor();
		m_brush.DeleteObject();
		m_brush.CreateSolidBrush(m_color);
		GetDlgItem(IDC_COLOR)->RedrawWindow();
	}
}

⌨️ 快捷键说明

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