0% found this document useful (0 votes)
59 views3 pages

Visual Programming (CS410) Assignment # 4

This document provides instructions for Assignment #4 in the Visual Programming (CS410) course. It outlines rules for marking, including requirements that the assignment be submitted by the deadline in .doc format and that copying from other students is strictly prohibited. It also provides important notes that no late assignments will be accepted and students should aim to submit at least two days before the deadline to avoid issues. The document then provides two questions for the assignment, asking students to explain modal dialog boxes and the process for their creation in the first question, and to explain single-selection and multiple-selection list boxes in the second question.

Uploaded by

Rana Jee
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views3 pages

Visual Programming (CS410) Assignment # 4

This document provides instructions for Assignment #4 in the Visual Programming (CS410) course. It outlines rules for marking, including requirements that the assignment be submitted by the deadline in .doc format and that copying from other students is strictly prohibited. It also provides important notes that no late assignments will be accepted and students should aim to submit at least two days before the deadline to avoid issues. The document then provides two questions for the assignment, asking students to explain modal dialog boxes and the process for their creation in the first question, and to explain single-selection and multiple-selection list boxes in the second question.

Uploaded by

Rana Jee
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 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 emergency
electric 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: CS410@vu.edu.pk


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 or


DialogBoxIndirect 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 and
DialogBoxIndirectParam functions also create modal dialog boxes; they are identical
to the previously mentioned functions but pass a specified parameter to the dialog
box procedure when the dialog box is created.

When creating the modal dialog box, the system makes it the active window. The
dialog 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 the
application 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 a
scroll 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 visual
appearance 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.
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. To
create 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 and
operation 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 an
application's resources.

To create a list box by using the CreateWindow or CreateWindowEx function, use the
LISTBOX class, appropriate window style constants, and the following style constants
to define the list box. After the control has been created, these styles cannot be
modified, except as noted.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy