Fall_2010_CS410_4

3
Visual Programming (CS410) Assignment # 4  Total marks = 20 Deadline Date = 13-01-2011 Please carefully read the following instructions before attempting the assignment. Rules for Marking It should be clear that your assignment would not get any credit if: The assignment is submitted after due date. The submitted assignment does not open or file is corrupt. The as sig nment is cop ie d. Note tha t st ric t ac tio n woul d be taken if the submitted assignment is copied from any other student. Both students will be punished severely. 1) You shoul d concern r ecomme nded books t o clari fy your co ncepts as handou ts are not sufficient. 2) You ar e supp osed to s ubmit your assig nment in .doc format. Any other formats like scan images, PDF, Zip, rar, bmp, docx etc will not be accepted 3) You are advised to upload your assignment at least two days before Due date. 4) Thi s ass ign ment fil e comp ris es of Two (2) pages. 5) Do not send the CPP file of your code, but paste the complete code in same document (.DOC) file in which you will solve other questions. Important Note: Assignment comprises of 20 Marks. Note that no assignment will be accepted after due date via email in any case (whether it is the case of load shedding or emergency electric failure or inte rnet malf unct ioni ng etc.). Hen ce, refrain from uploading assignment in the last hour of the deadline, and try to upload Solutions at least 02 days before the deadline to avoid inconvenience later on. For any query please contact: [email protected] 

Transcript of Fall_2010_CS410_4

Page 1: Fall_2010_CS410_4

8/8/2019 Fall_2010_CS410_4

http://slidepdf.com/reader/full/fall2010cs4104 1/3

Visual Programming (CS410)

Assignment # 4  Total marks = 20

Deadline Date = 13-01-2011

Please carefully read the following instructions before attempting the

assignment.

Rules for Marking

It should be clear that your assignment would not get any credit if:

The assignment is submitted after due date.

The submitted assignment does not open or file is corrupt.

The assignment is copied. Note that strict action would be taken if the

submitted assignment is copied from any other student. Both students will be

punished severely.

1) You should concern recommended books to clarify your concepts as handouts are not

sufficient.

2) You are supposed to submit your assignment in .doc format. Any other formats like

scan images, PDF, Zip, rar, bmp, docx etc will not be accepted

3) You are advised to upload your assignment at least two days before Due date.4) This assignment file comprises of Two (2) pages.

5) Do not send the CPP file of your code, but paste the complete code in same

document (.DOC) file in which you will solve other questions.

Important Note:

Assignment comprises of 20 Marks. Note that no assignment will be accepted after

due date via email in any case (whether it is the case of load shedding or emergencyelectric failure or internet malfunctioning etc.). Hence, refrain from uploading

assignment in the last hour of the deadline, and try to upload Solutions at least 02

days before the deadline to avoid inconvenience later on.

For any query please contact: [email protected] 

Page 2: Fall_2010_CS410_4

8/8/2019 Fall_2010_CS410_4

http://slidepdf.com/reader/full/fall2010cs4104 2/3

Q1 [ Marks: 3+7]

What is meant by Modal Dialog Box? Briefly explain the process of its creation.

ANSWER:

A modal dialog box should be a pop-up window having a window menu, a title bar,and a thick border; that is, the dialog box template should specify the WS_POPUP,

WS_SYSMENU, WS_CAPTION, and DS_MODALFRAME styles.

An application creates a modal dialog box by using either the DialogBox orDialogBoxIndirect function. DialogBox requires the name or identifier of a resource

containing a dialog box template; DialogBoxIndirect requires a handle to a

memory object containing a dialog box template. The DialogBoxParam andDialogBoxIndirectParam functions also create modal dialog boxes; they are identical

to the previously mentioned functions but pass a specified parameter to the dialogbox procedure when the dialog box is created.

When creating the modal dialog box, the system makes it the active window. Thedialog box remains active until the dialog box procedure calls the EndDialog function

or the system activates a window in another application. Neither the user nor theapplication can make the owner window active until the modal dialog box is

destroyed.

Q2 [Marks: 3+7]

What is a List Box? Explain single-selection and multiple-selection list boxes.

ANSWER:

List box items can be represented by text strings, bitmaps, or both. If the list box is

not large enough to display all the list box items at once, the list box provides ascroll bar. The user scrolls through the list box items, and applies or removes

selection status as necessary. Selection style of a list box item or its visualappearance can be changed in Operating system metrics. When the user selects or

deselects an item, the system sends a notification message to the parent window of the list box.

Page 3: Fall_2010_CS410_4

8/8/2019 Fall_2010_CS410_4

http://slidepdf.com/reader/full/fall2010cs4104 3/3

There are two types of list boxes: single-selection (the default) and multiple-selection. In a single-selection list box , the user can select only one item at a time.

In a multiple-selection list box , the user can select more than one item at a time. Tocreate a multiple-selection list box, specify the LBS_MULTIPLESEL or the

LBS_EXTENDEDSEL style.

There are many list box styles and window styles that control the appearance andoperation of a list box. These styles indicate whether list box items are sorted,arranged in multiple columns, drawn by the application, and so on. The dimensions

and styles of a list box are typically defined in a dialog box template included in anapplication's resources.

To create a list box by using the CreateWindow or CreateWindowEx function, use theLISTBOX class, appropriate window style constants, and the following style constants

to define the list box. After the control has been created, these styles cannot bemodified, except as noted.