VUsolutions Transferred to AchiKhasi.com

From December 2011, this blog www.VUsolutions.blogspot.com is transferred to http://achikhasi.com/vu/ . So, you may visit http://achikhasi.com/vu/ for latest study related help.

Back to home VUsolutions

VUsolutions Fans Club [join us for MORE solutions]

VUsolutions on Facebook

CS410 VU Assignment Solution

Saturday, November 24, 2012 Edit This

Question # 2 Solution

Windows Messages

The system passes input to a window procedure in the form of messages. Messages are generated by both the system and applications. The system generates a message at each input event. The message to a window procedure with a set of four parameters:

Window handle system sends a
Message identifier
Two values called message parameters.

Message Types

This section describes the two types of messages:

System-Defined Messages
Application-Defined Messages

System-Defined Messages

The system sends or posts a system-defined message when it communicates with an application. It uses these messages to control the operations of applications and to provide input and other information for applications to process. An application can also send or post system-defined messages. Applications generally use these messages to control the operation of control windows created by using pre-registered window classes.

Each system-defined message has a unique message identifier and a corresponding symbolic constant (defined in the software development kit (SDK) header files) that states the purpose of the message. For example, the WM_PAINT constant requests that a window paint its contents.
Queued Messages

The system can display any number of windows at a time. To route mouse and keyboard input to the appropriate window, the system uses message queues.

The system maintains a single system message queue and one thread-specific message queue for each graphical user interface (GUI) thread. To avoid the overhead of creating a message queue for non–GUI threads, all threads are created initially without a message queue. The system creates a thread-specific message queue only when the thread makes its first call to one of the User or Windows Graphics Device Interface (GDI) functions.

Whenever the user moves the mouse, clicks the mouse buttons, or types on the keyboard, the device driver for the mouse or keyboard converts the input into messages and places them in the system message queue. The system removes the messages, one at a time, from the system message queue, examines them to determine the destination window, and then posts them to the message queue of the thread that created the destination window. A thread's message queue receives all mouse and keyboard messages for the windows created by the thread. The thread removes messages from its queue and directs the system to send them to the appropriate window procedure for processing.

With the exception of the WM_PAINT message, the system always posts messages at the end of a message queue. This ensures that a window receives its input messages in the proper first in, first out (FIFO) sequence. The WM_PAINT message, however, is kept in the queue and is forwarded to the window procedure only when the queue contains no other messages. Multiple WM_PAINT messages for the same window are combined into a single WM_PAINT message, consolidating all invalid parts of the client area into a single area. Combining WM_PAINT messages reduces the number of times a window must redraw the contents of its client area.

The system posts a message to a thread's message queue by filling an MSG structure and then copying it to the message queue.

A thread can post a message to its own message queue or to the queue of another thread by using the PostMessage or PostThreadMessage function.

An application can remove a message from its queue by using the GetMessage function.To examine a message without removing it from its queue, an application can use the PeekMessage function. This function fills MSG with information about the message.

After removing a message from its queue, an application can use the DispatchMessage function to direct the system to send the message to a window procedure for processing. DispatchMessage takes a pointer to MSG that was filled by a previous call to the GetMessage or PeekMessage function. DispatchMessage passes the window handle, the message identifier, and the two message parameters to the window procedure, but it does not pass the time the message was posted or mouse cursor position. An application can retrieve this information by calling the GetMessageTime and GetMessagePos functions while processing a message.

A thread can use the WaitMessage function to yield control to other threads when it has no messages in its message queue. The function suspends the thread and does not return until a new message is placed in the thread's message queue.

You can call the SetMessageExtraInfo function to associate a value with the current thread's message queue. Then call the GetMessageExtraInfo function to get the value associated with the last message retrieved by the GetMessage or PeekMessage function.
Nonqueued Messages

Nonqueued messages are sent immediately to the destination window procedure, bypassing the system message queue and thread message queue. The system typically sends nonqueued messages to notify a window of events that affect it. For example, when the user activates a new application window, the system sends the window a series of messages, including WM_ACTIVATE, WM_SETFOCUS, and WM_SETCURSOR. These messages notify the window that it has been activated, that keyboard input is being directed to the window, and that the mouse cursor has been moved within the borders of the window. Nonqueued messages can also result when an application calls certain system functions. For example, the system sends the WM_WINDOWPOSCHANGED message after an application uses the SetWindowPos function to move a window.

Some functions that send nonqueued messages are BroadcastSystemMessage, BroadcastSystemMessageEx, SendMessage, SendMessageTimeout, and SendNotifyMessage.



Question # 3

We will make window application in four steps:

In first step, we will register a windows class.
In second step, we will create a window
In third step, we will make a message loop and message handling procedure
In our fourth step, we will write WinMain function and will make the application running.

“Pointer is a kind of variable whose value is a memory address, typically of another variable”.

int *p;
int i = 3;
p = &i;
In this piece of code, we have taken a pointer to integer denoted by “*p”. In second statement, an integer is declared and initialized by ‘3’. The next step is the most important one. Here we are passing the “Address” of the integer “i” in the pointer. Since pointers hold the variable addresses; so now the pointer “p” contains the address of the integer “i” which has a value of 3.

Pointer Advantages

This allows a function to “return” more than a single value (we are not really returning more than a single variable, but we are able to directly modify the values that are in main, from within a function).
This allows us to refer to larger data structures with just a single pointer. This cuts back on creating multiple copies of a structure, which consumes both memory and time.
This also opens the door to dynamic memory allocation.
Use pointers when you want efficient results.


To develop plug-ins of existing software use pointers as much as you can.
Take extreme care while manipulating arrays with pointers.
Many bugs in large programmes arise due to pointers so only use pointers when necessary.
Make sure to initialize pointers with some valid value.
Don’t try to modify the contents of constant pointers.
Be sure that the data types of pointer variable and the pointed variable are same.
Do not assign system area addresses to pointer
Use function pointer only where it is required

MCM101 Assginemtn solution

Friday, November 23, 2012 Edit This

Sisters are supposed to be loving, caring and an epitome of kindness. Apart from the regular fights we all have, a sisterly bond is one which is enviable for all.

Sisters stealing their brothers-in-law and dying out of jealousy to ruin their siblings’ life was a concept I could never digest. “Maat,” “Yahan Pyar Nahin Hai,” and “Madiha Maliha” all have one thought process in common:
“Main usko kabhi khush nahin rehne dungi.”

(I will never let her stay happy.)

The wonderful portrayal of Haleema is one aspect of this drama . Where she used to be the timid, obedient wife who was secretly being abused, she is now a woman of self-respect, dignity, and success. She didn't show any signs of wanting to be with her husband again after all she went through, and she kept her head held high the entire time. Basically, she could care less about Saim at this point. Also, when it came to Shumaila, her feelings were indifferent. Well, not exactly indifferent, but more that she cared, but she couldn't forgive her for what she did to Haleema and . Normally, in the last episode everyone hugs and they're all a great big family again. Haleema however, may care for Shumaila, but she can never forget the betrayal she went through. loved how she asked Sabi if she should talk to her as a sister or a sautan. It's true and it was a very realistic approach to such a situation.

the finale was fantastically done! Shumaila is caught by Saim with her 'old boyfriend' and he suspects her true intentions. In reality, she was trying to get him to stay away from her, but she was caught by Saim, who was less than forgiving towards her. After the series of these events, she's landed in the hospital in a coma. Saim also, remaining heartless, divorces her there and tries to go back to Haleema, who keeps her head up and refuses. The simple question and highlight of the last episode:

"Agar maine yeh sub kiya hota, tou kya aap mujhe maaf kertay?"

said so much in a sentence. If the tables were turned, would Saim have forgiven Haleema? As Saim ashamedly shook his head, Haleema, dignified, replied with a smile and just one word: Khudahafiz.

ismain haleema aur shumaila main character hain,

haleema aur shumaila maamoon zad hain,haleema ko usko maamoo guardian hota hai,haleema ki shadi achay ghar m hoti hai hus dr,shumaila ko ghar sy bhaag jany aur pakrnay ki wajah sy maar parti hai tb haleema usko apny ghar laykr ati hai k wo isko parhai main help karyge,n woh yahan p sahe hojaeayge,lekin shumaila ny atay he uskay hus p doray dalna shrou kardiya kabhi sugar n blood pressure medicines khati aur apny hus ki collegue dr friend female the,uskay khilaf haleema k kaan bharti aur apny brother in law k bh.
//////////////////////////////////////

2. Suggest the possible maneuver that media can use to eliminate this stereotype from our society.

A stereotype is a thought that may be adopted[ about specific types of individuals or certain ways of doing things, but that belief may or may not accurately reflect reality,However, this is only a fundamental psychological definition of a stereotype. Within and across different psychology disciplines, there are different concepts and theories of stereotyping that provide their own expanded definition. Some of these definitions share commonalities, though each one may also harbor unique aspects that may complement or contradict the others.
If we assume that the media perpetuates stereotypes, what can be done to combat them, or has our society become numb to these stereotypes? What do the media messages say about women in society?

Mass media became on of the main sources of popular culture in modern capitalist society. Media, however, not only entertains and offers news to people, but also transfers the stereotypes, beliefs and values of the society to reproduce the existing order of social life. Louis Althusser in his theory of ideological state apparatuses, says that schools, families, religions play the role of the ideological state apparatuses. These institutions invisibly transfer and indoctrinate the dominant hegemonic ideology of the society into the minds of people in order to be able to control people. In the modern capitalist world, I would argue, media turned to be yet another althusserian ideological apparatus that control the mind of masses. It seems like media creates the unique pieces of art: movies, documentaries, magazines, music, TV shows and others. Theodor Adorno, however, would argue that all of these products of media contain zero level of uniqueness. According to him, what we see on TV screens or in newspapers is produced only with one purpose of being sold. Therefore, what is manufactured (popular culture) by media has to reflect the life of people, it needs to be on such level that people would understand and except. This reflection, however, is created through reproduction of stereotypes, which fill the life of society and, thus, are known to everyone.
The media has become responsible for the shaping and influencing of our identities, as the traditional sources of identity, such as family, social roles , have begun to disappear. Because we are constantly being surrounded by the media, we allow it to create stereotypes, and change the way we act and think.
Mainstream media creates images which, though almost impossible to imitate, young people strive to become. When a young girl sees a magazine with a model on the cover, she won't be thinking about the fact that the model has a make-up artist and photoshop, she'll be thinking why she doesn't look the same. Teenage girls have been brainwashed by the media to believe that they have to look thin and beautiful, wear expensive dresses, put on makeup and that they have to fit this idealised image, or they won't be happy or loved. This pressure to conform to such an image has a psychological effect on young girls, and will change the way they dress, eat, act and think, thus changing and influencing their identity.
Half of our identities today are completely based on what we see in the media. Although our names, cultures and religions are determined otherwise, our dress, behaviour, hobbies and interests are all determined by mainstream media. What we see in magazines and on television dictate the way we run our lives. They tell that we need this car, that dress, those games, because they're what's '"in", what everyone's getting. The media is the cause of our completely consumerist society, and is always telling us "what's hot and what's not". We're always wanting what's trendy and what's new, because the media tells us that we want it. This both destroys individualism, and influences our identity.

Through these ways, the media is influencing our identities. It tells us what to be, and because we are constantly surrounded by it, we listen.

media can remove sterotypes threats from society if they give the positive and negative aspects 
mairy hisab sy agr media sterotypes remove karyga to kaun unkay dramay dekhayga phir ye masala hee to sub kuch hain bus hamain sochna chaheay k waqti faiday k leay aisa na apna nuqsan karain na kisi aur ka,qk akhir hamesha acha nhn hota 


Educate children by teaching them about the negative and positive aspects of different cultures so that students get a clearer view of what people within certain cultures are like and believe. While exposing children to different cultures, confront stereotypes in a direct manner, giving students examples and reasons why the stereotypes are incorrect.
2Bring in guest speakers from different backgrounds to talk about their cultures and to answer questions students might have about their cultural groups.


Think about presenting truthful and multifaceted images of different groups of people in the media, if you work for a news organization, advertising company or TV or radio station. Look at what other media outlets are doing as a guide for what to do or not to do.
12Create advertising campaigns, TV shows or news programs where people, especially those from minority groups, are represented as well-rounded people instead of stock characters or stereotypical individuals to influence the public's views.
13Look at content closely for stereotypes to actively work to end stereotypes. When you see stereotypical or prejudiced language, take out words or phrases in scripts that have a potential influence over the public's perceptions.

Back to home VUsolutions

Shaadi.com: Just create ur account & find ur partner or EARN money, its reall & EASY

VUsolutions Followers (Join NOW and Get Extra Benefits)

Install LATEST toolbar having lot of features - GET solutions on Desktop

toolbar powered by Conduit
Caliplus 300x250 NoFlam VitoLiv 468x60 GlucoLo