setcsizebox.cpp

来自「OK视频采集卡VC源代码」· C++ 代码 · 共 67 行

CPP
67
字号
// SetCSizeBox.cpp : implementation file
//

#include "stdafx.h"
#include "okmfc.h"
#include "SetCSizeBox.h"

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

extern	int			iClientWidth;
extern	int			iClientHeight;

/////////////////////////////////////////////////////////////////////////////
// CSetCSizeBox dialog


CSetCSizeBox::CSetCSizeBox(CWnd* pParent /*=NULL*/)
	: CDialog(CSetCSizeBox::IDD, pParent)
{
	//{{AFX_DATA_INIT(CSetCSizeBox)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CSetCSizeBox::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSetCSizeBox)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CSetCSizeBox, CDialog)
	//{{AFX_MSG_MAP(CSetCSizeBox)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSetCSizeBox message handlers

BOOL CSetCSizeBox::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	
	SetDlgItemInt(IDC_CLIENTWIDTH,iClientWidth,TRUE);
	SetDlgItemInt(IDC_CLIENTHEIGHT,iClientHeight,TRUE);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CSetCSizeBox::OnOK() 
{
	// TODO: Add extra validation here
	
	iClientWidth=GetDlgItemInt(IDC_CLIENTWIDTH,NULL,TRUE);
	iClientHeight=GetDlgItemInt(IDC_CLIENTHEIGHT,NULL,TRUE);
	CDialog::OnOK();
}

⌨️ 快捷键说明

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