As a record structure transmitted to programs, message contains the type and other information. E.g. the message of clicking the mouse includes the cursor position when the mouse is clicked. The type of this record is named TMsg. It is defined as below:
type TMsg = packed record hwnd: HWND; //The handle of the window for which the message is intended message: UINT; //The message const identifier wParam: WPARAM; //32 bits of message-specific information lParam: LPARAM; //32 bits of message-specific information time: DWORD; //The time that the message was created pt: TPoint; //Mouse cursor position when the message end;
Do you think the message is too complicated and seems puzzle? Then, let me explain every parameters to you.
1. hwnd: 32-bit handle of the window, which is a screen object of any type. For Win32 can cope with handles of almost visible objects (windows, dialogs, buttons, edit dialogs and so on.) 2. message: This const is used to identify the message. It can be a predefined const in Windows Units as well as a custom const. 3. WParam: Usually, it is a const relevant to the message or the handle of a window or component. 4. LParam: It is a pointer that points to the data in the main memory (RAM). Because WParam, LParam and Pointer are all 32-bit, they can be converted from one to another.
William Jones has sinced written about articles on various topics from Baby Shower, Travel and Leisure and Software. PegasusMedia Software, Ltd.Video Converter,editor,splittor,recorder softwares for DVD,C. William Jones's top article generates over 12100 views. Bookmark William Jones to your Favourites.