Quiz

  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Quiz as PDF for free.

More details

  • Words: 382
  • Pages: 1
2ND Quiz of CP II 4th Semester

Quiz A Q1: Ans:

HOW MANY WAYS ARE THERE IN MS VC++6 TO CREATE A PEN FOR THE GRAPHICAL DEVICE? Three ways.

Q2: Ans:

LIST NAMES OF THE FIELDS OF THE LOGPEN STRUCTURE AND THEIR USE WITH REFERENCE TO GD PEN. lognstyle (for line style), lopnwidth.x (for line width along x-direction), lopnwidth.y (for line width along y-direction) and lopncolor (for line color specified by RGB function).

Q3:

WRITE CODE THAT CAN BE ADDED IN ONDRAW (CDC* PDC) FUNCTION TO DISPLAY A LINE BETWEEN TWO POINTS ON THE CLIENT AREA OF THE SCREEN NAMELY (20, 30) AND (100, 140) IN BLUE DOTTED LINE. CPen bluepen (PS_SOLID, 1, RGB (0, 0, 255)); pDC->MoveTo(20, 30); pDC->LineTo(100, 140);

Ans:

Quiz B Q1: Ans: Q2: Ans: Q3: Ans:

WHAT CLASS OF THE MFC .EXE PROJECT IS RESPONSIBLE TO MANAGE THE STORAGE OF THE DOCUMENT MODEL OF THE USER'S WORK? C………Doc Class WHICH FUNCTION OF THE ABOVE-ASKED CLASS HOLDS CODE TO MANAGE THE TASK OF SAVING AND LOADING THE PREVIOUS WORK OF THE USER OF THE MFC .EXE PROJECT SOFTWARE? Serialize Function i.e. void C…….Doc::Serialize(Archive&ar); WRITE CODE THAT CAN BE ADDED IN ONDRAW (CDC* PDC) FUNCTION TO DISPLAY A LINE BETWEEN TWO POINTS ON THE CLIENT AREA OF THE SCREEN NAMELY (60, 70) AND (110, 300) IN RED DASHED LINE. CPen redpen (PS_DASH, 1, RGB (255, 0, 0)); pDC->MoveTo(60, 70); pDC->LineTo(110, 300);

Quiz C Q1:

HOW CAN WE ACCESS THE DATA MEMBERS OF THE DOCUMENT CLASS IN FUNCTION OTHER THAN ONDRAW (.......)? WRITE REQUIRED ONE LINE CODE AND EXPLAIN THE ITEMS OF THE CODE.

Ans: Q2: Ans:

Q3: Ans:

HOW CAN WE MAKE AN MFC .EXE PROJECT SOFTWARE TO ASK FOR SAVING OF THE USER'S WORK BEFORE THE SOFTWARE COMPLETELY CLOSES. WRITE ONE LINE OF CODE. By using a built in function, SetModifiedFlag(). As it a member function of C…….Doc class so for calling that function we require Pointer of Document class. i.e. PDoc->SetModifiedFlag(); WRITE CODE THAT CAN BE ADDED IN ONDRAW (CDC* PDC) FUNCTION TO DISPLAY A LINE BETWEEN TWO POINTS ON THE CLIENT AREA OF THE SCREEN NAMELY (61, 71) AND (111, 301) IN BLUE COLOR SOLID LINE THICKNESS OF TWO PIXELS. CPen bluepen (PS_SOLID, 2, RGB (0, 0, 255)); pDC->MoveTo(61, 71); pDC->LineTo(111, 301); For more detail consult notes.

Related Documents

Quiz
November 2019 39
Quiz
May 2020 34
Quiz
November 2019 35
Quiz
May 2020 33
Quiz
October 2019 45
Quiz
November 2019 39