class2group9Word文档格式.docx

上传人:b****1 文档编号:3624958 上传时间:2023-05-02 格式:DOCX 页数:35 大小:223.37KB
下载 相关 举报
class2group9Word文档格式.docx_第1页
第1页 / 共35页
class2group9Word文档格式.docx_第2页
第2页 / 共35页
class2group9Word文档格式.docx_第3页
第3页 / 共35页
class2group9Word文档格式.docx_第4页
第4页 / 共35页
class2group9Word文档格式.docx_第5页
第5页 / 共35页
class2group9Word文档格式.docx_第6页
第6页 / 共35页
class2group9Word文档格式.docx_第7页
第7页 / 共35页
class2group9Word文档格式.docx_第8页
第8页 / 共35页
class2group9Word文档格式.docx_第9页
第9页 / 共35页
class2group9Word文档格式.docx_第10页
第10页 / 共35页
class2group9Word文档格式.docx_第11页
第11页 / 共35页
class2group9Word文档格式.docx_第12页
第12页 / 共35页
class2group9Word文档格式.docx_第13页
第13页 / 共35页
class2group9Word文档格式.docx_第14页
第14页 / 共35页
class2group9Word文档格式.docx_第15页
第15页 / 共35页
class2group9Word文档格式.docx_第16页
第16页 / 共35页
class2group9Word文档格式.docx_第17页
第17页 / 共35页
class2group9Word文档格式.docx_第18页
第18页 / 共35页
class2group9Word文档格式.docx_第19页
第19页 / 共35页
class2group9Word文档格式.docx_第20页
第20页 / 共35页
亲,该文档总共35页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

class2group9Word文档格式.docx

《class2group9Word文档格式.docx》由会员分享,可在线阅读,更多相关《class2group9Word文档格式.docx(35页珍藏版)》请在冰点文库上搜索。

class2group9Word文档格式.docx

2.HardwareandSoftwareRequiredto

DevelopProject------------------------------------------6

3.HardwareandSoftwareRequiredtodeveloptheproject

4.RunProject-----------------------------------------------7

5.Sourcecode------------------------------------------------11

-aboutdialog.cpp--------------------------------------------------------------9

aboutdialog.h----------------------------------------------------------------10

myapp.cpp---------------------------------------------------11

myapp.h----------------------------------------------------------------12

myedit.cpp-------------------------------------------------------------12

myedit.h-------------------------------------------------------------13

myframe.cpp----------------------------------------------------------------14

myframe.h-------------------------------------------------------------------29

resource.h-----------------------------------------------------------------30

6.References-------------------------------------------29

1.Systemstudy

ThisprojectisbasedonvisualC++6.0todevelop.Asweallknow,VCdependsonC,C++language.ThemaincomponentisdrivenMFCsystem.whichishighlygreatedprogrammingtool.Itisattractwithadvanced,reasonable,powerful,flexible,efficientenvironment,almostsayVCinwindowsplatformsisomnipotent.Whatisthemostimportantisthattheefficiencyofdevelopingissohigh.Thefollowisourproject.

Whenweclickthe“Find/ReplaceDialogBox“dialogbox,andinputsomewordsinit.Ifweclick”Find/ReplaceDialogBox“dialogbox,itappearsthe”Replace“dialogbox.Wheninput“Mr”inthedialog,thedialogboxwillappearwith“Mr”inthewords.Andifclickthe“FindNext”,thenext“Mr”willappear.Ifit’sreplacedwith“Miss”byclickingthe“ReplaceCurrent“,thedialogboxwillappearwith“Miss”.Ifweclickthebuttonof“ReplaceAll”,thedialogboxwillappearallthe“Miss”insteadof“Mr”inthedialogweinput.Screenshotisgivenbelow.

2.HardwareandSoftwareRequiredtoDeveloptheProject

Processor:

IntelPentium®

Dual-CoreCPUT4200@2.00GHz

BIOS:

Lenovo

Memory:

3GB(Kingston1066mhz)

Displayadapter:

IntelMobile4SeriesExpressChipestFamily(256MBofLenovo)

Systemtype:

64-bitoperatingsystem

Monitorsize:

20

Keyboard:

108keys

Software

Operatingsystem:

MicrosoftWindows7Ultimate(64-bit)

Database:

Accesesversio

ProgrammingLanguage:

VisualC++

IDE:

Visualstudio

3.HardwareandSoftwareRequiredtoRunProject

Accessversio

4.Runtheproject

运用计算器计算:

78*80

在计算器上输入:

78*

输出结果:

6240

5.Sourcecode

aboutdialog.cpp

#include<

afxwin.h>

#include"

aboutdialog.h"

mmsystem.h>

resource.h"

aboutdialog:

:

aboutdialog():

CDialog(IDD_DIALOG1)

{

}

intaboutdialog:

OnInitDialog()

:

PlaySound("

music.wav"

NULL,SND_FILENAME|SND_ASYNC|SND_LOOP);

return1;

voidaboutdialog:

OnOK()

PlaySound(NULL,NULL,NULL);

CDialog:

OnOK();

OnCancel()

OnCancel();

l

aboutdialog.h

classaboutdialog:

publicCDialog

public:

aboutdialog();

intOnInitDialog();

voidOnOK();

voidOnCancel();

};

myapp.cpp

myapp.h"

myedit.h"

myframe.h"

myappa;

intmyapp:

InitInstance()

myframe*p;

p=newmyframe;

p->

ShowWindow

(1);

m_pMainWnd=p;

myapp.h

classmyapp:

publicCWinApp

intInitInstance();

};

myedit.cpp

BEGIN_MESSAGE_MAP(myedit,CEdit)

ON_WM_CREATE()

ON_WM_LBUTTONDOWN()

ON_WM_MOUSEMOVE()

END_MESSAGE_MAP()

intmyedit:

OnCreate(LPCREATESTRUCTl)

CEdit:

OnCreate(l);

m_cur=AfxGetApp()->

LoadStandardCursor(IDC_ARROW);

return0;

voidmyedit:

OnLButtonDown(UINTflags,CPointpt)

OnMouseMove(UINTflags,CPointpt)

SetCursor(m_cur);

myedit.h

classmyedit:

publicCEdit

private:

HCURSORm_cur;

intOnCreate(LPCREATESTRUCTl);

voidOnLButtonDown(UINTflags,CPointpt);

voidOnMouseMove(UINTflags,CPointpt);

DECLARE_MESSAGE_MAP()

myframe.cpp

math.h>

BEGIN_MESSAGE_MAP(myframe,CFrameWnd)

ON_COMMAND(1001,myabout)

ON_COMMAND_RANGE(1,10,numbers0to9)

ON_COMMAND(101,back)

ON_COMMAND(102,ce)

ON_COMMAND(103,c)

ON_COMMAND(106,memorycancel)

ON_COMMAND(107,divide)

ON_COMMAND(108,squareroot)

ON_COMMAND(109,memoryrecall)

ON_COMMAND(110,multiply)

ON_COMMAND(111,percentage)

ON_COMMAND(112,memorystore)

ON_COMMAND(113,minus)

ON_COMMAND(114,onebyx)

ON_COMMAND(115,memoryplus)

ON_COMMAND(117,plusminus)

ON_COMMAND(118,point)

ON_COMMAND(119,plus)

ON_COMMAND(120,equalto)

ON_WM_PARENTNOTIFY()

ON_WM_KEYDOWN()

END_MESSAGE_MAP()

CStringmyframe:

m_helpstrings[]={

"

Nohelptopicisassociatedwiththisitem."

Deletethelastdigitofthedisplayednumber."

Clearsthedisplayednumber."

Clearsthecurrentcalculation."

"

Clearsanynumberstoredinmemory."

Putsthisnumberinthecalculatordisplay."

Divdes."

Calculatesthesquarerootofthedisplayednumber."

Recallsthenumberstoredinmemory.Thenumberremainsinthememory."

Multiplies."

Displaystheresultofthemultiplicationaspercentage."

Storesthedisplayednumberinthememory."

Subracts."

Calculatesthereciprocalofthedisplayednumber."

Addsthedisplayednumbertoanynumberalreadyinmemory."

Changesthesignofthedisplayednumber."

Insertsadecimalpoint."

Adds."

Performsanyoperationontheprevioustwonumbers.Torepeathelastoperationclickagain."

};

myframe:

myframe()

CStringmywindowclass;

CBrushmybrush;

mybrush.CreateStockObject(LTGRAY_BRUSH);

mywindowclass=AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW,

AfxGetApp()->

LoadStandardCursor(IDC_ARROW),

mybrush,

LoadIcon(IDI_ICON1));

Create(mywindowclass,"

Calculator"

WS_SYSMENU|WS_MINIMIZEBOX,CRect(100,100,400,400),0,MAKEINTRESOURCE(IDR_MENU1));

BOOLmyframe:

PreCreateWindow(CREATESTRUCT&

cs)

CFrameWnd:

PreCreateWindow(cs);

cs.dwExStyle&

=~WS_EX_CLIENTEDGE;

returnTRUE;

intmyframe:

OnCreate(LPCREATESTRUCTl)

structbuttoninfo

{

charm_str[5];

intid;

};

buttoninfom[30]=

{

"

100,

Back"

101,

CE"

102,

C"

103,

104,

105,

MC"

106,

7"

8,

8"

9,

9"

10,

/"

107,

Sqrt"

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

当前位置:首页 > 自然科学 > 物理

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2