1. Attempt all questions. Marks are written adjacent to each
question.
2. Do not ask any questions about the contents of this
examination from anyone.
a. If you think that there is something wrong with any of the
questions, attempt it to the best of your understanding.
b. If you believe that some essential piece of information is
missing, make an appropriate assumption and use it to solve
the problem.
c. Write all steps, missing steps may lead to deduction of
marks.
3. You can consult your handouts while solving the paper.
**WARNING: Please note that
means. Anyone found involved in cheating will get an `F` grade in this course.
Question No. 1 Marks : 5
Explain briefly how can an application perform more than one task at a time in windows
environment?
Question No. 2 Marks : 10
(a) Write down the steps involved in registering a window class mentioning the function names
involved in each step. [5 Marks]
(b) Write down the steps involved in creating a window of a particular class (not a system
class) and dispatching messages from application message queue to window message queue
mentioning the function names involved in each step. The window has been already registered
by us. [5 Marks]
Question No. 3 Marks : 2
Message loop ends when the GetMessage() function removes the following message from the
message queue:
WM_SETFOCUS
WM_PAINT
WM_SYSCOMMAND
WM_QUIT
All of the given options
Question No. 4 Marks : 10
Write down the WinMain function of an application that creates a window of a pre-registered
(system) window class.
Question No. 5 Marks : 10
Write the WinMain and RegisterWindow functions of an application that creates a simple
overlapped window with white background.
Question No. 6 Marks : 2
Which one of the following messages has lowest priority?
WM_SYSCOMMAND
WM_PAINT
WM_QUIT
WM_COMMAND
All have same priority
Question No. 7 Marks : 5
Explain briefly how we can invoke WM_PAINT message when no region of the window has
become invalid.
Question No. 8 Marks : 2
We can display symbolic constants instead of numeric values using:
Structures
Enumeration
Unions
Typedef
Typecasting
Question No. 9 Marks : 2
We want to declare a variable in a function such that whenever the function is called, the
variable is not reinitialized. The storage class of the variable must be:
Auto
Static
Extern
All of the given options
None of the given options
Question No. 10 Marks : 2
Which one of the following is not a nonqueued message?
WM_ACTIVATE
WM_SETFOCUS
WM_SETCURSOR
WM_WINDOWPOSCHANGED
None of the given options