MFC的考试题英文.docx

上传人:b****5 文档编号:7552959 上传时间:2023-01-24 格式:DOCX 页数:24 大小:31.38KB
下载 相关 举报
MFC的考试题英文.docx_第1页
第1页 / 共24页
MFC的考试题英文.docx_第2页
第2页 / 共24页
MFC的考试题英文.docx_第3页
第3页 / 共24页
MFC的考试题英文.docx_第4页
第4页 / 共24页
MFC的考试题英文.docx_第5页
第5页 / 共24页
点击查看更多>>
下载资源
资源描述

MFC的考试题英文.docx

《MFC的考试题英文.docx》由会员分享,可在线阅读,更多相关《MFC的考试题英文.docx(24页珍藏版)》请在冰豆网上搜索。

MFC的考试题英文.docx

MFC的考试题英文

MFC的考试题

2001Answer

MasteringMFCFundamentalsTestsName:

_________Number:

__________

FirstSection:

Readthefollowingstatementscarefully,pleasewrite"T"or"F"intheplaceoftheanwersheettoshowitistrueorfalse(10%):

1.Anapplicationisastaticsequenceofinstructionsthatmakesupanexecutablefile.Aprocessisusuallydefinedasaninstanceofarunningapplication.(T)

2.Accelerator、Bitmap、Menu、Toolbar、StatusbararealsostandardWin32GUIresourcetypes.(F)

3.MFCcompletelyencapsulatestheWindowsAPI,freeingthedeveloperfromallSDKdependence.(F)

4.Theapplicationframeworkimplementsthemessagemapdatastructure,whichprovidesthelinkbetweenthemessageIDandthefunctionthatwillhandlethemessage.(T)

5.Althoughthereleaseversionofaprojectismoreefficientthanit'sdebugversion,theyusethesamesetofDLLs.(F)

6.ThereismoreflexibilityinroutingacommandmessagethanaWindowsmessagesincecommandmessagescanbehandledbyawidevarietyofobjects.(T)

7.Pen,Brush,Font,RectangleareallGDIObjects.(F)

8.ThestatusbarcanbeeasilymanagedwiththestatusbareditorinDeveloperStudio.(F)

9.Mostoftheinitialworktocreateadialogboxisthesameformodalandmodelesstypes.Buttheuserneedtowriteadditionalcodeforamodelessdialogboxtoenablereciprocalcommunicationwithit’sapplication.(T)

10.CStringisadatatypesupportedbyMFC’sserializationoperators,thearchiveinsertion(<<),andextraction(>>)operators.(T)

SecondSection:

Inthissection,pleasechoosethecorrectanswerfromthefourstatementsineachofthefollowingquestions(36%):

1.Whichofthefollowingisarequiredfunctionforallwindows-basedapplications?

(A)

AWinMainBMyWndProcCWndMgrDGetMenu

2.CObjectisthebaseclassformostofMFC.Whichofthefollowingisnottheinformationandfoundationsthatprovides:

(C)

ARun-timeclassinformationBDiagnosticanddebuggingsupportCSomesimplevaluetypesDCompatibilitywithcollectionclasses

3.IfyouuseMFCtodevelopadocument/viewbasedproject,theDocument、View、FrameandApplicationclassusuallyarethedefaultfourelements,Whichoneofthefollowingisfalseabouttheirdeclarations:

(D)

ATheapplicationclassactsasabinderfortheframe,view,anddocumentobjectsandasetofGUIresourcesinaapplication.

BAdocumentisadataobjectwithwhichtheuserinteractsinaneditingsessionandaviewisawindowobjectthroughwhichtheuserinteractswiththedocument,CTheframeworkprovidesasetofstarterfilesforanapplicationandsuppliesstandarduser-interfacefeaturesthatyoucanimplementinyourapplication.

DSDIapplicationsallowonlyonedocumentframewindowatatime,butMDIapplicationshasawindowwithwhichtheusercanopenmultipleMDIchildwindowsandtheyshouldbethesametypes.

4.Whattooldoyounormallyusetoautomatesthecreationandeditingofclasses,andcreatesadditionalclassesbasedonMFC.(C)

AAppWizardBTheProjectWorkspaceCClassWizardDDeveloperStudioGallery

5.WhatisthepurposeoftheDECLARE_DYNCREATEmacro?

(A)

AToenableobjectsofCObject-derivedclassestobecreateddynamicallyatruntime.

BToenableobjectsofanyclasstobecreateddynamically

CTodynamicallycreatethedocuments

DTodynamicallycreatetheframesandviews.

6.InwhichcasewewillcallOnUpdatememberfunctionoftheCViewclass?

(B)

ACalledwhenaviewisfirstattachedtoadocument.

BCalledwhenthedocument'sdatahaschangedandtheviewneedstobeupdated.

CCalledwhentheapplication'sframehasbeenresized.

DCalledwhenyouwanttochangesomedocumentdata.

7.WhichoneofthefollowingstatementsisfalsewhenusingtheDeveloperStudiodebuggertosetandmanagebreakpoints?

(C)

ATosetabreakpointonasourcestatementextendingacrosstwoormorelines,youmustsetthebreakpointonthelastlineofthestatement.

BAnasterisk(*)intheBreakpointcheckboxindicatesthatthebreakpointisnotsupportedonthecurrentplatform.

CThebreakpointsyousetcannotbesavedaspartofyourprojects.

DYoucansetmorethanonelocationbreakpointonaline.

8.InaMFCapplication,whatisthemessagemapmacronameandhandlernameassociatedwiththeWM_MOUSEMOVEWindowsmessage?

AThemacroisWM_MOUSEMOVE_MESSAGEandthehandlerisOnMouseMoveMessage.

BThemacroisOnMouseMoveandthehandlerisON_MM_MOUSEMOVE.

CThemacroisON_WM_MOUSEMOVEandthehandlerisOnMouseMove.

DSincegeneralwindowmessagesarehandledbytheMFCframework,theyneverneedmessagemapentries.

9.Communicationbetweentheoperatingsystem,applications,andapplicationcomponentsisconductedthrough:

C

AWindowsmessages、Commandmessages

BWindowsmessages、Commandmessages、Event-notificationmessages.

CAlltypesofmessages.

DWindowsmessages、Commandmessages、System-registeredmessages.

10.WhichoneofthefollowingisnotaDC(DeviceContexts)doesinWindows:

BAGivespermissiontoanapplicationtouseanoutputdevice.BGivespermissiontoanapplicationtoredrawalloftheviews.CMaintainscurrentinformationabouthowtodraworpainttoawindow,suchasthecolors,brushorpenpatternsandsoon.DProvidesalinkbetweenaWindows-basedapplication,adevicedriver,andanoutputdevice,suchasamonitororprinter.

11.IfyouwanttodrawarectanglelikeG-1,whichoneofthefollowingcodescannotrealizeit,supposeyouhavethefollowingdefinition:

D

ApDC->Rectangle(0,0,100,100);

BpDC->MoveTo(0,0);pDC->LineTo(100,0);pDC->MoveTo(0,0);pDC->LineTo(0,100);pDC->MoveTo(100,100);pDC->LineTo(100,0);pDC->MoveTo(100,100);pDC->LineTo(0,100);

CCRectrect(0,0,100,100);pDC->Rectangle(&rect);

DpDC->Rectangle(CPoint(0,0),CPoint(100,100));

12Pleasereadthecodes,andselectthecorrectanswerabouttheoutputstring’scolorinsequence:

A

CPenpen1,pen2;

CPen*pOld;CPointpt(0,0);

pen1.CreatePen(PS_SOLID,1,RGB(255,0,0));

pen2.CreatePen(PS_SOLID,1,RGB(0,0,255));

pOld=pDC->SelectObject(&pen1);

pDC->TextOut(pt,”Thefirstline.”);

pDC->SelectObject(pOld);

pDC->TextOut(pt,”Thesecondeline.”);

pOld=pDC->SelectObject(&pen2);pDC->TextOut(pt,”ThethirdLine”);

ARED,BLACK,BLUEBBLACK,RED,BLACKCRED,BLUE,BLACKDRED,WHITE,BLUE

13Whenyouaredebuggingaprogram,youfindthatthereisadimmedmenuitem,whichoneofthefollowingmeasurescannotmakeitavailable:

D

Acheckifithasanassociatedcommandhandler.

Bcheckifyouhaveexecutedanoperationtomakeitunavailabletemporarily.

Ccheckifthereisnoobjectsthatcanbeused.

DcheckifithasacombinationwithanUpdatecommandhandler

14Whichoneofthefollowingisnottrueabouttoolbareditor:

C

AYoucannotdeletetheblankplaceholderbuttonontherightend.

BIntheToolbareditor,youcandragthebuttonoffthetoolbartodeleteabutton.

CIntheToolbareditor,youcandeleteabuttondirectlyandconvenientlybypressing“Delete”key.

DIfyouwanttocreateanewbutton,youcancopyabuttonandchangetheoriginalbitmaptothenewone.

15Inadialogboxclass,youwanttosavechangesofthedialogcontrolstoavariable,whatfunctionyouoftenaddintheprogram:

B

AInvalidate()BUpdateData()CUpdateData(false)DUpdate()

16WhichoneofthefollowingstatementsistrueabouttherelationshipofDDXandDDV?

D

ADDXandDDVoccurwhentheuserclicksOK.

BDDXandDDVaremutuallyexclusive;onlyonecanbeperformedforeachcontrol.

CThedevelopercannotextendDDXandDDV.

DInaDoDataExchangeroutine,ifaDDVroutineexists,itmustfollowimmediatelyafteritsassociatedDDXroutineinthedatamap.

17Templatesareusefulforgeneratingcollectionclassesbecause:

B

ATemplateshavebuilt-infunctionalityforcollections.

BTemplatesworkwitharbitrarydatatypes.

CAlltemplateshaveiterators,whichareusefulforcollectionclasses.

DTemplateshavebuilt-insupportforthemostcommondatatypes.

18Whichofthefollowingconditionsorstepsisnotrequiredtoaddsupportforserializationtoaclass?

D

ATheclassmustbepubliclyderivedfromCObjectoraclassderivedformCObject.

BTheclassdeclarationmustdeclarebothanoverriddenversionofCObject:

:

SerializeandinvocationoftheDECLARE_SERIALmacro.

CTheclassimplementationfilemustcontaintheimplementationforSerializeandaninvocationoftheIMPLEMENT_SERIALmacro.

DEachclassinanapplicationmusthavedifferent,sequentiallynumberedschema.

ThirdSection:

PleaseuseyourbriefwordsinEnglishtoexplainthefollowingphrases(14%):

1.Whatis"Event-drivenprogramming"?

2.PleaseexplainWhatis“Mappingmodes”andillustrateitwithsomedetailexamples.

2002Answer

MasteringMFCFundamentalsTests

Name:

_________      Number:

__________

Section  A(26%):

    Inthissection,pleasechoosethecorrectanswerfromthefourstatementsineachofthefollowingquestions:

(C)1.  CObjectisthebaseclassformostof  MFC.Whichoneofthefollowingisnottheinformationandfoundationsthatprovides:

  

    A  Run-timeclassinformation

    B Diagnosticanddebuggingsupport

    C  Somesimplevaluetypes

    D  Compatibilitywithcollectionclasses

(D)2.  IfyouuseMFCtodevelop  a  document/view  basedproject,theDocument、View、FrameandApplicationclassusuallyarethedefaultfourelements,Whichoneofthefollowingstatementsisfalseabouttheirdeclarations:

  

    A  Theapplicationclassactsasabinderfortheframe,view,anddocumentobjectsandasetofGUIresourcesinaapplication.

    B Adocumentisadataobjectwithwhichtheuserinter

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

当前位置:首页 >

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

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