|
/////////////////////////////////////////////////////////////////////////////
// File: MatrixDlg.cpp
// Version: 1.0.0.0
// Created: 03-april-2002
//
// Author: Thorsten Wack
// E-mail: wt@umsicht.fhg.de
//
//
// This code may be used in compiled form in any way you desire. This
// file may be redistributed unmodified by any means PROVIDING it is
// not sold for profit without the authors written consent, and
// providing that this notice and the authors name is included. If
// the source code in this file is used in any commercial application
// then a simple email would be nice.
//
// This file is provided "as is" with no expressed or implied warranty.
// The author accepts no liability if it causes any damage whatsoever.
//
/////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "resource.h"
#include "MatrixDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMatrixDlg dialog
CMatrixDlg::CMatrixDlg(CWnd* pParent /*=NULL*/)
: CDialog(CMatrixDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CMatrixDlg)
m_nColumnCount = 1;
m_nRowCount= 1;
//}}AFX_DATA_INIT
}
void CMatrixDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMatrixDlg)
DDX_Control(pDX, IDC_EDIT_ROW, m_EditRow);
DDX_Control(pDX, IDC_EDIT_COLUMN, m_EditColumn);
DDX_Text(pDX, IDC_EDIT_COLUMN, m_nColumnCount);
DDV_MinMaxInt(pDX, m_nColumnCount, 1, 10);
DDX_Text(pDX, IDC_EDIT_ROW, m_nRowCount);
DDV_MinMaxInt(pDX, m_nRowCount, 1, 10);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMatrixDlg, CDialog)
//{{AFX_MSG_MAP(CMatrixDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMatrixDlg message handlers
BOOL CMatrixDlg::OnInitDialog()
{
CDialog::OnInitDialog();
if (m_nRowCount == -1)
{
m_EditRow.EnableWindow(FALSE);
m_nRowCount =1;
}
if (m_nColumnCount == -1)
{
m_EditColumn.EnableWindow(FALSE);
m_nColumnCount =1;
}
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
|
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.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.