www.gusucode.com > VC++牛顿法解方程之混沌情况图形示例源代码源码程序 > VC++牛顿法解方程之混沌情况图形示例源代码源码程序\code\PicSize.cpp

    // PicSize.cpp : implementation file
// Download by http://www.NewXing.com

#include "stdafx.h"
#include "Global.h"
#include "Faction.h"
#include "PicSize.h"

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

/////////////////////////////////////////////////////////////////////////////
// CPicSize dialog


CPicSize::CPicSize(CWnd* pParent /*=NULL*/)
	: CDialog(CPicSize::IDD, pParent)
{
	//{{AFX_DATA_INIT(CPicSize)
	m_nRadio = 0;
//	m_dwHigh = 768;
//	m_dwWidth = 1024;
	//}}AFX_DATA_INIT
}


void CPicSize::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPicSize)
	DDX_Radio(pDX, IDC_RADIO_WINDOW, m_nRadio);
	DDX_Text(pDX, IDC_EDIT_HEIGHT, m_dwHeight);
	DDV_MinMaxDWord(pDX, m_dwHeight, 0, 1024);
	DDX_Text(pDX, IDC_EDIT_WIDTH, m_dwWidth);
	DDV_MinMaxDWord(pDX, m_dwWidth, 0, 1280);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CPicSize message handlers

BOOL CPicSize::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_nFullWidth = GetSystemMetrics(SM_CXSCREEN);
	m_nFullHeight = GetSystemMetrics(SM_CYSCREEN);
	m_dwWidth = m_nFullWidth;
	m_dwHeight = m_nFullHeight;
	UpdateData(FALSE);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CPicSize::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData();
	G.m_dwWidth = m_dwWidth;
	G.m_dwHeight = m_dwHeight;
	
	CDialog::OnOK();
}