VisualC++课程设计报告.docx

上传人:b****4 文档编号:4682628 上传时间:2022-12-07 格式:DOCX 页数:12 大小:294.98KB
下载 相关 举报
VisualC++课程设计报告.docx_第1页
第1页 / 共12页
VisualC++课程设计报告.docx_第2页
第2页 / 共12页
VisualC++课程设计报告.docx_第3页
第3页 / 共12页
VisualC++课程设计报告.docx_第4页
第4页 / 共12页
VisualC++课程设计报告.docx_第5页
第5页 / 共12页
点击查看更多>>
下载资源
资源描述

VisualC++课程设计报告.docx

《VisualC++课程设计报告.docx》由会员分享,可在线阅读,更多相关《VisualC++课程设计报告.docx(12页珍藏版)》请在冰豆网上搜索。

VisualC++课程设计报告.docx

VisualC++课程设计报告

VisualC++课程设计报告

1.软件名称:

职员信息输入程序

2.软件功能:

输入一个人的职业,工作地点,兴趣爱好以及薪资,然后显示。

3.编码实施

//Prop2.cpp:

implementationfile

//

#include"stdafx.h"

#include"Prop.h"

#include"Prop2.h"

#ifdef_DEBUG

#definenewDEBUG_NEW

#undefTHIS_FILE

staticcharTHIS_FILE[]=__FILE__;

#endif

/////////////////////////////////////////////////////////////////////////////

//CProp2propertypage

IMPLEMENT_DYNCREATE(CProp2,CPropertyPage)

CProp2:

:

CProp2():

CPropertyPage(CProp2:

:

IDD)

{

//{{AFX_DATA_INIT(CProp2)

m_football=FALSE;

m_basketball=FALSE;

m_volleyball=FALSE;

m_swim=FALSE;

//}}AFX_DATA_INIT

}

CProp2:

:

~CProp2()

{

}

voidCProp2:

:

DoDataExchange(CDataExchange*pDX)

{

CPropertyPage:

:

DoDataExchange(pDX);

//{{AFX_DATA_MAP(CProp2)

DDX_Check(pDX,IDC_CHECK1,m_football);

DDX_Check(pDX,IDC_CHECK2,m_basketball);

DDX_Check(pDX,IDC_CHECK3,m_volleyball);

DDX_Check(pDX,IDC_CHECK4,m_swim);

//}}AFX_DATA_MAP

}

BEGIN_MESSAGE_MAP(CProp2,CPropertyPage)

//{{AFX_MSG_MAP(CProp2)

//}}AFX_MSG_MAP

END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////

//CProp2messagehandlers

BOOLCProp2:

:

OnSetActive()

{

//TODO:

Addyourspecializedcodehereand/orcallthebaseclass

((CPropertySheet*)GetParent())->SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT);

returnCPropertyPage:

:

OnSetActive();

}

//DELBOOLCProp2:

:

OnInitDialog()

//DEL{

//DELCPropertyPage:

:

OnInitDialog();

//DEL

//DEL//TODO:

Addextrainitializationhere

//DEL((CListBox*)GetDlgItem(IDC_LIST1))->AddString("北京");

//DEL((CListBox*)GetDlgItem(IDC_LIST1))->AddString("天津");

//DEL((CListBox*)GetDlgItem(IDC_LIST1))->AddString("上海");

//DELreturnTRUE;//returnTRUEunlessyousetthefocustoacontrol

//DEL//EXCEPTION:

OCXPropertyPagesshouldreturnFALSE

//DEL}

LRESULTCProp2:

:

OnWizardNext()

{

//TODO:

Addyourspecializedcodehereand/orcallthebaseclass

UpdateData();

if(m_football||m_basketball||m_volleyball||m_swim)

returnCPropertyPage:

:

OnWizardNext();

else

{

MessageBox("请选择你的兴趣爱好!

");

return-1;

}

}

#if!

defined(AFX_PROP1_H__978F2F2C_DDCA_4EF6_AB94_94508ED6470B__INCLUDED_)

#defineAFX_PROP1_H__978F2F2C_DDCA_4EF6_AB94_94508ED6470B__INCLUDED_

#if_MSC_VER>1000

#pragmaonce

#endif//_MSC_VER>1000

//Prop1.h:

headerfile

//

/////////////////////////////////////////////////////////////////////////////

//CProp1dialog

classCProp1:

publicCPropertyPage

{

DECLARE_DYNCREATE(CProp1)

//Construction

public:

CProp1();

~CProp1();

//DialogData

//{{AFX_DATA(CProp1)

enum{IDD=IDD_PROP1};

intm_occupation;

CStringm_workAddr;

//}}AFX_DATA

//Overrides

//ClassWizardgeneratevirtualfunctionoverrides

//{{AFX_VIRTUAL(CProp1)

public:

virtualBOOLOnSetActive();

virtualLRESULTOnWizardNext();

protected:

virtualvoidDoDataExchange(CDataExchange*pDX);//DDX/DDVsupport

//}}AFX_VIRTUAL

//Implementation

protected:

//Generatedmessagemapfunctions

//{{AFX_MSG(CProp1)

virtualBOOLOnInitDialog();

//}}AFX_MSG

DECLARE_MESSAGE_MAP()

};

//{{AFX_INSERT_LOCATION}}

//MicrosoftVisualC++willinsertadditionaldeclarationsimmediatelybeforethepreviousline.

#endif//!

defined(AFX_PROP1_H__978F2F2C_DDCA_4EF6_AB94_94508ED6470B__INCLUDED_)

#if!

defined(AFX_PROP1_H__978F2F2C_DDCA_4EF6_AB94_94508ED6470B__INCLUDED_)

#defineAFX_PROP1_H__978F2F2C_DDCA_4EF6_AB94_94508ED6470B__INCLUDED_

#if_MSC_VER>1000

#pragmaonce

#endif//_MSC_VER>1000

//Prop1.h:

headerfile

//

/////////////////////////////////////////////////////////////////////////////

//CProp1dialog

classCProp1:

publicCPropertyPage

{

DECLARE_DYNCREATE(CProp1)

//Construction

public:

CProp1();

~CProp1();

//DialogData

//{{AFX_DATA(CProp1)

enum{IDD=IDD_PROP1};

intm_occupation;

CStringm_workAddr;

//}}AFX_DATA

//Overrides

//ClassWizardgeneratevirtualfunctionoverrides

//{{AFX_VIRTUAL(CProp1)

public:

virtualBOOLOnSetActive();

virtualLRESULTOnWizardNext();

protected:

virtualvoidDoDataExchange(CDataExchange*pDX);//DDX/DDVsupport

//}}AFX_VIRTUAL

//Implementation

protected:

//Generatedmessagemapfunctions

//{{AFX_MSG(CProp1)

virtualBOOLOnInitDialog();

//}}AFX_MSG

DECLARE_MESSAGE_MAP()

};

//{{AFX_INSERT_LOCATION}}

//MicrosoftVisualC++willinsertadditionaldeclarationsimmediatelybeforethepreviousline.

#endif//!

defined(AFX_PROP1_H__978F2F2C_DDCA_4EF6_AB94_94508ED6470B__INCLUDED_)

#if!

defined(AFX_PROP1_H__978F2F2C_DDCA_4EF6_AB94_94508ED6470B__INCLUDED_)

#defineAFX_PROP1_H__978F2F2C_DDCA_4EF6_AB94_94508ED6470B__INCLUDED_

#if_MSC_VER>1000

#pragmaonce

#endif//_MSC_VER>1000

//Prop1.h:

headerfile

//

/////////////////////////////////////////////////////////////////////////////

//CProp1dialog

classCProp1:

publicCPropertyPage

{

DECLARE_DYNCREATE(CProp1)

//Construction

public:

CProp1();

~CProp1();

//DialogData

//{{AFX_DATA(CProp1)

enum{IDD=IDD_PROP1};

intm_occupation;

CStringm_workAddr;

//}}AFX_DATA

//Overrides

//ClassWizardgeneratevirtualfunctionoverrides

//{{AFX_VIRTUAL(CProp1)

public:

virtualBOOLOnSetActive();

virtualLRESULTOnWizardNext();

protected:

virtualvoidDoDataExchange(CDataExchange*pDX);//DDX/DDVsupport

//}}AFX_VIRTUAL

//Implementation

protected:

//Generatedmessagemapfunctions

//{{AFX_MSG(CProp1)

virtualBOOLOnInitDialog();

//}}AFX_MSG

DECLARE_MESSAGE_MAP()

};

//{{AFX_INSERT_LOCATION}}

//MicrosoftVisualC++willinsertadditionaldeclarationsimmediatelybeforethepreviousline.

#endif//!

defined(AFX_PROP1_H__978F2F2C_DDCA_4EF6_AB94_94508ED6470B__INCLUDED_)

//PropView.h:

interfaceoftheCPropViewclass

//

/////////////////////////////////////////////////////////////////////////////

#if!

defined(AFX_PROPVIEW_H__4078ADBA_CDF5_4CB5_8354_BD7C70BEE5DB__INCLUDED_)

#defineAFX_PROPVIEW_H__4078ADBA_CDF5_4CB5_8354_BD7C70BEE5DB__INCLUDED_

#if_MSC_VER>1000

#pragmaonce

#endif//_MSC_VER>1000

classCPropView:

publicCView

{

protected:

//createfromserializationonly

CPropView();

DECLARE_DYNCREATE(CPropView)

//Attributes

public:

CPropDoc*GetDocument();

//Operations

public:

//Overrides

//ClassWizardgeneratedvirtualfunctionoverrides

//{{AFX_VIRTUAL(CPropView)

public:

virtualvoidOnDraw(CDC*pDC);//overriddentodrawthisview

virtualBOOLPreCreateWindow(CREATESTRUCT&cs);

protected:

//}}AFX_VIRTUAL

//Implementation

public:

virtual~CPropView();

#ifdef_DEBUG

virtualvoidAssertValid()const;

virtualvoidDump(CDumpContext&dc)const;

#endif

protected:

//Generatedmessagemapfunctions

protected:

//{{AFX_MSG(CPropView)

afx_msgvoidOnPropertysheet();

//}}AFX_MSG

DECLARE_MESSAGE_MAP()

private:

intm_iOccupation;

CStringm_strWorkAddr;

BOOLm_bLike[4];

CStringm_strSalary;

};

#ifndef_DEBUG//debugversioninPropView.cpp

inlineCPropDoc*CPropView:

:

GetDocument()

{return(CPropDoc*)m_pDocument;}

#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}

//MicrosoftVisualC++willinsertadditionaldeclarationsimmediatelybeforethepreviousline.

#endif//!

defined(AFX_PROPVIEW_H__4078ADBA_CDF5_4CB5_8354_BD7C70BEE5DB__INCLUDED_)

5.软件截图

201010492吴桐

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 初中教育 > 语文

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1