انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

Understanding Windows NT Messages

الكلية كلية تكنولوجيا المعلومات     القسم قسم البرامجيات     المرحلة 4
أستاذ المادة سرى زكي ناجي علوان       08/03/2013 17:55:00
Understanding Windows NT Messages

There are a large number of Windows NT messages ,each message is represented a unique 32-bit integer value. Windows NT communicates with your program by sending it messages. Each message corresponds to some event. For example, there are messages to indicate that the user has pressed a key or clicked the mouse, that the mouse has moved, or that a window has been resized.
Although you could, in theory, refer to each message by its numeric value, in practice this is seldom done. Instead, there are macro names defined for all Windows NT messages. Typically, you will use the macro name, not the actual integer value, when referring to a message. The standard names for the messages are defined by including WINDOWS.H in your program. Here are some common Windows NT message macros:
WM_CHAR
WM_PAINT
WM_CLOSE
WM LBUTTONUP
WM_MOVE
WM_LBUTTONDOWN
WM_COMMAND
WM_HSCROLL
WM_SIZE
Two other values accompany each message and contain information related to it. One of these values is of type WPARAM, the other is of type LPARAM. For Windows NT, both of these types translate into 32-bit integers. These values are commonly called wParam and lParam, respectively. The contents of wParam and lParam are determined by which message is received. They typically hold things like mouse coordinates; the value of a key press; or a system-related value, such as window size. As each message is discussed, the meaning of the values contained in wParam, and lParam will be described.
As mentioned in chapter 2, the function that actually processes messages is your program s window function. As you should recall, this function is passed four parameters: the handle of the window that the message is for, the message itself, wParam, and lParam. Sometimes two pieces of information are encoded into the two words that comprise the wParam or lParam parameters. To provide easy access to each value, Windows defines two macros called LOWORD and HIWORD.


المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .