/////////////////////////////////////////////////////////////////////////////
// CMainFrame
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
//{{AFX_MSG_MAP(CMainFrame)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code !
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
static UINT indicators[] =
{
ID_SEPARATOR, // status line indicator
ID_INDICATOR_CAPS,
ID_INDICATOR_NUM,
ID_INDICATOR_SCRL,
};
/////////////////////////////////////////////////////////////////////////////
// CMainFrame construction/destruction
CMainFrame::CMainFrame()
{
// TODO: add member initialization code here
}
CMainFrame::~CMainFrame()
{
}
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators,
sizeof(indicators)/sizeof(UINT)))
{
TRACE0("Failed to create status bar\n");
return -1; // fail to create
}
// TODO: Delete these three lines if you don't want the toolbar to
// be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
return 0;
}
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CMainFrame diagnostics
#ifdef _DEBUG
void CMainFrame::AssertValid() const
{
CFrameWnd::AssertValid();
}
void CMainFrame::Dump(CDumpContext& dc) const
{
CFrameWnd::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMainFrame message handlers
// Prop1.cpp : implementation file
//
#include "stdafx.h"
#include "Test.h"
#include "Prop1.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CProp1 property page
IMPLEMENT_DYNCREATE(CProp1, CPropertyPage)
CProp1::CProp1() : CPropertyPage(CProp1::IDD)
{
//{{AFX_DATA_INIT(CProp1)
m_question1 = -1;
m_question2 = -1;
//}}AFX_DATA_INIT
}
CProp1::~CProp1()
{
}
void CProp1::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CProp1)
DDX_Radio(pDX, IDC_RADIO1, m_question1);
DDX_Radio(pDX, IDC_RADIO4, m_question2);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CProp1, CPropertyPage)
//{{AFX_MSG_MAP(CProp1)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CProp1 message handlers
BOOL CProp1::OnSetActive()
{
// TODO: Add your specialized code here and/or call the base class
((CPropertySheet*)GetParent())->SetWizardButtons(PSWIZB_NEXT);
return CPropertyPage::OnSetActive();
}
LRESULT CProp1::OnWizardNext()
{
UpdateData();
// TODO: Add your specialized code here and/or call the base class
if(m_question1 == -1)
{
MessageBox("请选择第一道题目!");
return -1;
}
if(m_question2 == -1)
{
MessageBox("请选择第二道题目!");
return -1;
}
return CPropertyPage::OnWizardNext();
}
// Prop2.cpp : implementation file
//
#include "stdafx.h"
#include "Test.h"
#include "Prop2.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CProp2 property page
IMPLEMENT_DYNCREATE(CProp2, CPropertyPage)
CProp2::CProp2() : CPropertyPage(CProp2::IDD)
{
//{{AFX_DATA_INIT(CProp2)
m_question3 = -1;
m_question4 = -1;
//}}AFX_DATA_INIT
}
CProp2::~CProp2()
{
}
void CProp2::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CProp2)
DDX_Radio(pDX, IDC_RADIO1, m_question3);
DDX_Radio(pDX, IDC_RADIO4, m_question4);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CProp2, CPropertyPage)
//{{AFX_MSG_MAP(CProp2)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CProp2 message handlers
BOOL CProp2::OnSetActive()
{
// TODO: Add your specialized code here and/or call the base class
((CPropertySheet*)GetParent())->SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT);
return CPropertyPage::OnSetActive();
}
LRESULT CProp2::OnWizardNext()
{
// TODO: Add your specialized code here and/or call the base class
UpdateData();
if(m_question3 == -1)
{
MessageBox("请选择第三道题目!");
return -1;
}
if(m_question4 == -1)
{
MessageBox("请选择第四道题目!");
return -1;
}
return CPropertyPage::OnWizardNext();
}
// Prop3.cpp : implementation file
//
#include "stdafx.h"
#include "Test.h"
#include "Prop3.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CProp3 property page
IMPLEMENT_DYNCREATE(CProp3, CPropertyPage)
CProp3::CProp3() : CPropertyPage(CProp3::IDD)
{
//{{AFX_DATA_INIT(CProp3)
m_question5 = -1;
m_question6 = -1;
//}}AFX_DATA_INIT
}
CProp3::~CProp3()
{
}
void CProp3::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CProp3)
DDX_Radio(pDX, IDC_RADIO1, m_question5);
DDX_Radio(pDX, IDC_RADIO4, m_question6);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CProp3, CPropertyPage)
//{{AFX_MSG_MAP(CProp3)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CProp3 message handlers
BOOL CProp3::OnSetActive()
{
// TODO: Add your specialized code here and/or call the base class
((CPropertySheet*)GetParent())->SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT);
return CPropertyPage::OnSetActive();
}
LRESULT CProp3::OnWizardNext()
{
// TODO: Add your specialized code here and/or call the base class
UpdateData();
if(m_question5 == -1)
{
MessageBox("请选择第五道题目!");
return -1;
}
if(m_question6 == -1)
{
MessageBox("请选择第六道题目!");
return -1;
}
return CPropertyPage::OnWizardNext();
}
// Prop4.cpp : implementation file
//
#include "stdafx.h"
#include "Test.h"
#include "Prop4.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CProp4 property page
IMPLEMENT_DYNCREATE(CProp4, CPropertyPage)
CProp4::CProp4() : CPropertyPage(CProp4::IDD)
{
//{{AFX_DATA_INIT(CProp4)
m_question7 = -1;
m_question8 = -1;
//}}AFX_DATA_INIT
}
CProp4::~CProp4()
{
}
void CProp4::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CProp4)
DDX_Radio(pDX, IDC_RADIO1, m_question7);
DDX_Radio(pDX, IDC_RADIO4, m_question8);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CProp4, CPropertyPage)
//{{AFX_MSG_MAP(CProp4)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CProp4 message handlers
BOOL CProp4::OnSetActive()
{
// TODO: Add your specialized code here and/or call the base class
((CPropertySheet*)GetParent())->SetWizardButtons(PSWIZB_BACK|PSWIZB_FINISH);
return CPropertyPage::OnSetActive();
}
BOOL CProp4::OnWizardFinish()
{
// TODO: Add your specialized code here and/or call the base class
// int index;
// index=((CComboBox*)GetDlgItem(IDC_COMBO1))->GetCurSel();//GetCurSel()函数是用来获得一个索引值
// ((CComboBox*)GetDlgItem(IDC_COMBO1))->GetLBText(index,m_strSalary);
UpdateData();
if(m_question7 == -1)
{
MessageBox("请选择第七道题目!");
return -1;
}
if(m_question8 == -1)
{
MessageBox("请选择第八道题目!");
return -1;
}
return CPropertyPage::OnWizardFinish();
}
目前暂无任何回答
- 0 回答
- 0 关注
- 829 浏览
添加回答
举报
0/150
提交
取消