|
// SetupDlg.cpp : implementation file
//
#include "stdafx.h"
#include "speedtest.h"
#include "SetupDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSetupDlg dialog
CSetupDlg::CSetupDlg(CWnd* pParent /*=NULL*/)
: CDialog(CSetupDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CSetupDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_interval = 1;
m_redrawDelay = 100;
m_cols = 10;
m_rows = 200;
}
void CSetupDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSetupDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSetupDlg, CDialog)
//{{AFX_MSG_MAP(CSetupDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSetupDlg message handlers
int CSetupDlg::GetInterval()
{
return m_interval;
}
int CSetupDlg::GetRedrawDelay()
{
return m_redrawDelay;
}
int CSetupDlg::GetNumberRows()
{
return m_rows;
}
int CSetupDlg::GetNumberCols()
{
return m_cols;
}
BOOL CSetupDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
GetDlgItem( IDC_COLS )->SetWindowText( "10" );
GetDlgItem( IDC_ROWS )->SetWindowText( "200" );
GetDlgItem( IDC_INTERVAL )->SetWindowText( "1" );
GetDlgItem( IDC_REDRAW_DELAY )->SetWindowText( "100" );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CSetupDlg::OnOK()
{
// TODO: Add extra validation here
m_interval = GetDlgItemInt( IDC_INTERVAL );
m_redrawDelay = GetDlgItemInt( IDC_REDRAW_DELAY );
m_rows = GetDlgItemInt( IDC_ROWS );
m_cols = GetDlgItemInt( IDC_COLS );
CDialog::OnOK();
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
In January 2005, David Cunningham and Chris Maunder created TheUltimateToolbox.com, a new group dedicated to the continued development, support and growth of Dundas Software’s award winning line of MFC, C++ and ActiveX control products.
Ultimate Grid for MFC, Ultimate Toolbox for MFC, and Ultimate TCP/IP have been stalwarts of C++/MFC development for a decade. Thousands of developers have used these products to speed their time to market, improve the quality of their finished products, and enhance the reliability and flexibility of their software.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.