home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
3D Graphics Programming for Windows 95
/
3D_Graphics_Programming_for_Windows_95_Microsoft_1996.iso
/
samples
/
blobs
/
indevdlg.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1996-02-11
|
2KB
|
119 lines
// InDevDlg.cpp : implementation file
//
#include "stdafx.h"
#include "Stage.h"
#include "InDevDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CInpDevDlg dialog
CInpDevDlg::CInpDevDlg(CWnd* pParent /*=NULL*/)
: CDialog(CInpDevDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CInpDevDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_iDevice = 0;
m_iObject = 0;
m_iType = 0;
}
void CInpDevDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CInpDevDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CInpDevDlg, CDialog)
//{{AFX_MSG_MAP(CInpDevDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CInpDevDlg message handlers
BOOL CInpDevDlg::OnInitDialog()
{
CDialog::OnInitDialog();
switch (m_iObject) {
default:
m_iObject = 0;
// fall through
case 0:
CheckRadioButton(IDC_RADIO4, IDC_RADIO5, IDC_RADIO4);
break;
case 1:
CheckRadioButton(IDC_RADIO4, IDC_RADIO5, IDC_RADIO5);
break;
}
switch (m_iType) {
default:
m_iType = 0;
// fall through
case 0:
CheckRadioButton(IDC_RADIO6, IDC_RADIO7, IDC_RADIO6);
break;
case 1:
CheckRadioButton(IDC_RADIO6, IDC_RADIO7, IDC_RADIO7);
break;
}
switch (m_iDevice) {
default:
m_iDevice = 0;
// fall through
case 0:
CheckRadioButton(IDC_RADIO1, IDC_RADIO3, IDC_RADIO1);
break;
case 1:
CheckRadioButton(IDC_RADIO1, IDC_RADIO3, IDC_RADIO2);
break;
case 2:
CheckRadioButton(IDC_RADIO1, IDC_RADIO3, IDC_RADIO3);
break;
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CInpDevDlg::OnOK()
{
if (IsDlgButtonChecked(IDC_RADIO5)) {
m_iObject = 1;
} else {
m_iObject = 0;
}
if (IsDlgButtonChecked(IDC_RADIO7)) {
m_iType = 1;
} else {
m_iType = 0;
}
if (IsDlgButtonChecked(IDC_RADIO3)) {
m_iDevice = 2;
} else if (IsDlgButtonChecked(IDC_RADIO2)) {
m_iDevice = 1;
} else {
m_iDevice = 0;
}
CDialog::OnOK();
}