www.pudn.com > vc5ͼÏñ²É¼¯ code.rar > SetCSizeBox.cpp


// 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(); 
}